Ok, I am inching forward here, but I am stuck with setting up a WAR file. I tried
String name = "ch01-login";
String root = "/home/apps/glassfish-v3/glassfish/domains/domain1/eclipseApps/ch01-login";
// just reusing an exploded WAR that I happened to have already
ScatteredArchive archive = new ScatteredArchive.Builder(name, new File(root)).buildWar();
And I get a NPE; trace below. I tried a bunch of permutations, but without success. Clearly I have the wrong idea here somewhere. What is "name" supposed to be?
Thanks,
Cay
Exception in thread "main" java.lang.NullPointerException
at org.glassfish.api.embedded.ScatteredArchive.exists(ScatteredArchive.java:184)
at org.glassfish.deployment.common.DeploymentUtils.isEAR(DeploymentUtils.java:137)
at org.glassfish.javaee.full.deployment.EarHandler.handles(EarHandler.java:102)
at com.sun.enterprise.v3.server.ApplicationLifecycle.getArchiveHandler(ApplicationLifecycle.java:158)
at com.sun.enterprise.v3.server.ApplicationLifecycle.getContext(ApplicationLifecycle.java:927)
at com.sun.enterprise.v3.server.ApplicationLifecycle.getContext(ApplicationLifecycle.java:922)
at com.sun.enterprise.v3.server.ApplicationLifecycle.getContext(ApplicationLifecycle.java:917)
at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:164)
at GFEmbed.main(GFEmbed.java:25)
[Message sent by forum member 'cayhorstmann' (cayhorstmann)]
http://forums.java.net/jive/thread.jspa?messageID=357964