dev@glassfish.java.net

Re: Default network config with GlassFish embedded

From: Nandini Ektare <Nandini.Ektare_at_Sun.COM>
Date: Tue, 28 Jul 2009 09:40:29 -0700

> Jerome Dochez wrote:
>> no the real fix would be to for Port implementation to stop using the
>> create-http-listener command and have the Port implementation
>> directly add the domain.xml elements.
Justin/Vivek, you may want to check the CLIs (create-protocol etc...)
for CRUD of these elements if you plan to use CLIs afterall.

Nandini
>>
>> Justin, would you have time to help with that ?
>>
>> jerome
>>
>> On Jul 27, 2009, at 6:42 PM, Vivek Pandey wrote:
>>
>>> 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_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net For
>>> additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>