Fond the root cause:
INFO: GlassFish v3 startup time : Embedded(441ms) startup
services(226ms) total(667ms)
Jul 27, 2009 6:32:32 PM AppServerStartup run
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started
Jul 27, 2009 6:32:32 PM com.sun.enterprise.v3.admin.CommandRunnerImpl
getCommand
INFO: Command create-http-listener not found
server.createPort() execute create-http-listener command. This command
is part of web-cli.jar. I defined the explicit dependency on web-cli
and everything works fine.
The real fix will be to include this in glassfish-embedded-nucleus
package on which I depend.
-vivek.
Vivek Pandey wrote:
The jruby
uses of GlassFish embedded API bases on glassfish-embedded-nucleus,
which is pretty much nucleus distribution with hk2 and grizzly.
The server starts up fine however there is no default network
configuration, so during grizzly adapter registration I am getting an
NPE. Am I supposed to add a NetworkConfigu element on the Config
myself? I would guess it is provided as part of default embedded
implementation. Here is the exception thrown:
SEVERE: Exception while loading the app
java.lang.NullPointerException
at
com.sun.enterprise.v3.services.impl.GrizzlyService.getPortsFromVirtualServers(GrizzlyService.java:614)
at
com.sun.enterprise.v3.services.impl.GrizzlyService.registerEndpoint(GrizzlyService.java:527)
at
com.sun.enterprise.v3.services.impl.GrizzlyService.registerEndpoint(GrizzlyService.java:512)
at
com.sun.enterprise.v3.services.impl.GrizzlyService.registerEndpoint(GrizzlyService.java:490)
at
org.glassfish.scripting.jruby.JRubyApplication.start(JRubyApplication.java:214)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:126)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:217)
at
org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:193)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:304)
This is how I am starting the server:
Server.Builder builder = new Server.Builder("ruby");
Server server = builder.build();
server.addContainer(new JRubyContainerBuilder());
server.createPort(3000);
DeployCommandParameters params = new DeployCommandParameters();
params.name = "depot";
Properties props = new Properties();
props.put("jruby.home", jrubyInstalDir);
params.property = props;
EmbeddedDeployer dep = server.getDeployer();
dep.deploy(new File(appDir), params);
-vivek.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: dev-help@glassfish.dev.java.net