dev@glassfish.java.net

Re: Deploying a Rails app throws NPE

From: <Jan.Luehe_at_Sun.COM>
Date: Thu, 07 Aug 2008 10:09:35 -0700

Peter Williams wrote:

> I reproduced this issue easily with promoted build 18 this evening.
>
> JRuby tests have been failing with this error since July 29th (first
> occurrence first started at run 338 -
> http://hudson.sfbay.sun.com/job/jruby-glassfish-BAT/338/ )
>
> No issue filed on it so far. I assume this is because Vivek is still
> on vacation and no one else looks at these results? I don't know if
> it's possible to determine what integration occurred in the 12 hours
> that preceeded this particular test, but that's probably when it
> broke. The previous test, #337, was successful. Grizzly upgrade maybe?
>
> -Peter
>
> Peter Williams wrote:
>
>> Good to know I guess. I played a little with 17B today, but not
>> much. Use V3M1 15B if you want things to work.
>>
>> -Peter
>>
>> Arun Gupta wrote:
>>
>>> Deploying a Rails application with the latest build gives the
>>> following error. This error has been coming pretty much since m1a
>>> branch was created.
>>>
>>> Any suggestions on what might be causing this ?
>>>
>>> INFO: Loading application foo at /foo
>>> Aug 6, 2008 9:19:04 PM org.glassfish.api.ActionReport failure
>>> SEVERE: Exception while invoking class
>>> org.glassfish.scripting.rails.RailsDeployer prepare method
>>> java.lang.NullPointerException
>>

Looks like this is a side-effect of the changes for

  https://glassfish.dev.java.net/issues/show_bug.cgi?id=4761
  ("V3 Container Mapper broken for double context path, mapping redone
  by the web container")

The new ContainerMapper endpoint registration API requires a
collection of virtual server names ("vs"), which defaults to an
empty collection (which may be a problem in that an endpoint
registered using the version of GrizzlyService.registerEndpoint()
that does not take any "vsServers" argument will not be registered
at all), so you should never be getting an NPE here:

        for (String host : vs) {

unless you were explicitly passing a "null" collection to
GrizzlyService.registerEndpoint().

Can you check the args you are passing to

    GrizzlyService.registerEndpoint()?

Thanks,


Jan



>>> at
>>> com.sun.enterprise.v3.services.impl.ContainerMapper.register(ContainerMapper.java:119)
>>>
>>> at
>>> com.sun.enterprise.v3.services.impl.GrizzlyEmbeddedHttp.registerEndpoint(GrizzlyEmbeddedHttp.java:333)
>>>
>>> at
>>> com.sun.enterprise.v3.services.impl.GrizzlyProxy.registerEndpoint(GrizzlyProxy.java:197)
>>>
>>> at
>>> com.sun.enterprise.v3.services.impl.GrizzlyProxy.registerEndpoint(GrizzlyProxy.java:58)
>>>
>>> at
>>> com.sun.enterprise.v3.services.impl.GrizzlyService.registerEndpoint(GrizzlyService.java:344)
>>>
>>> at
>>> com.sun.enterprise.v3.services.impl.GrizzlyService.registerEndpoint(GrizzlyService.java:329)
>>>
>>> at
>>> org.glassfish.scripting.rails.RailsDeployer.load(RailsDeployer.java:87)
>>> at
>>> org.glassfish.scripting.rails.RailsDeployer.load(RailsDeployer.java:45)
>>> at
>>> com.sun.enterprise.v3.server.ApplicationLifecycle.load(ApplicationLifecycle.java:641)
>>>
>>> at
>>> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:280)
>>>
>>> at
>>> com.sun.enterprise.v3.deployment.DeployCommand.execute(DeployCommand.java:279)
>>>
>>> at
>>> com.sun.enterprise.v3.admin.CommandRunner.doCommand(CommandRunner.java:286)
>>>
>>> at
>>> com.sun.enterprise.v3.admin.CommandRunner.doCommand(CommandRunner.java:114)
>>>
>>> at
>>> com.sun.enterprise.v3.admin.CommandRunner.doCommand(CommandRunner.java:94)
>>>
>>> at
>>> com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:230)
>>>
>>> at
>>> com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:156)
>>> at
>>> com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:148)
>>>
>>> at
>>> com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:621)
>>>
>>> at
>>> com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:552)
>>>
>>> at
>>> com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:800)
>>>
>>> at
>>> com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:152)
>>>
>>> at
>>> com.sun.enterprise.v3.services.impl.GlassfishProtocolChain.executeProtocolFilter(GlassfishProtocolChain.java:70)
>>>
>>> at
>>> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
>>>
>>> at
>>> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
>>>
>>> at
>>> com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67)
>>>
>>> at
>>> com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56)
>>>
>>> at
>>> com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:169)
>>> Aug 6, 2008 9:19:04 PM org.glassfish.api.ActionReport failure
>>> SEVERE: Exception while deploying the app
>>> java.lang.NullPointerException
>>> at
>>> com.sun.enterprise.v3.services.impl.ContainerMapper.register(ContainerMapper.java:119)
>>>
>>> at
>>> com.sun.enterprise.v3.services.impl.GrizzlyEmbeddedHttp.registerEndpoint(GrizzlyEmbeddedHttp.java:333)
>>>
>>> at
>>> com.sun.enterprise.v3.services.impl.GrizzlyProxy.registerEndpoint(GrizzlyProxy.java:197)
>>>
>>> at
>>> com.sun.enterprise.v3.services.impl.GrizzlyProxy.registerEndpoint(GrizzlyProxy.java:58)
>>>
>>> at
>>> com.sun.enterprise.v3.services.impl.GrizzlyService.registerEndpoint(GrizzlyService.java:344)
>>>
>>> at
>>> com.sun.enterprise.v3.services.impl.GrizzlyService.registerEndpoint(GrizzlyService.java:329)
>>>
>>> at
>>> org.glassfish.scripting.rails.RailsDeployer.load(RailsDeployer.java:87)
>>> at
>>> org.glassfish.scripting.rails.RailsDeployer.load(RailsDeployer.java:45)
>>> at
>>> com.sun.enterprise.v3.server.ApplicationLifecycle.load(ApplicationLifecycle.java:641)
>>>
>>> at
>>> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:280)
>>>
>>> at
>>> com.sun.enterprise.v3.deployment.DeployCommand.execute(DeployCommand.java:279)
>>>
>>> at
>>> com.sun.enterprise.v3.admin.CommandRunner.doCommand(CommandRunner.java:286)
>>>
>>> at
>>> com.sun.enterprise.v3.admin.CommandRunner.doCommand(CommandRunner.java:114)
>>>
>>> at
>>> com.sun.enterprise.v3.admin.CommandRunner.doCommand(CommandRunner.java:94)
>>>
>>> at
>>> com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:230)
>>>
>>> at
>>> com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:156)
>>> at
>>> com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:148)
>>>
>>> at
>>> com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:621)
>>>
>>> at
>>> com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:552)
>>>
>>> at
>>> com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:800)
>>>
>>> at
>>> com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:152)
>>>
>>> at
>>> com.sun.enterprise.v3.services.impl.GlassfishProtocolChain.executeProtocolFilter(GlassfishProtocolChain.java:70)
>>>
>>> at
>>> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
>>>
>>> at
>>> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
>>>
>>> at
>>> com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67)
>>>
>>> at
>>> com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56)
>>>
>>> at
>>> com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:169)
>>> Aug 6, 2008 9:19:04 PM
>>> com.sun.enterprise.v3.server.ApplicationLifecycle unload
>>> SEVERE: Failed to unload from container type : jruby
>>> java.lang.NullPointerException
>>> at
>>> org.glassfish.scripting.rails.RailsDeployer.unload(RailsDeployer.java:96)
>>>
>>> at
>>> org.glassfish.scripting.rails.RailsDeployer.unload(RailsDeployer.java:45)
>>>
>>> at
>>> com.sun.enterprise.v3.server.ApplicationLifecycle.unload(ApplicationLifecycle.java:763)
>>>
>>> at
>>> com.sun.enterprise.v3.server.ApplicationLifecycle$1.actOn(ApplicationLifecycle.java:263)
>>>
>>> at
>>> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:300)
>>>
>>> at
>>> com.sun.enterprise.v3.deployment.DeployCommand.execute(DeployCommand.java:279)
>>>
>>>
>>> Peter is waiting for a fix from GlassFish Scripting workspace and
>>> I'd rather see a working build (at least from JRuby perspective)
>>> before I integrate any further changes.
>>>
>>> Thanks,
>>> -Arun
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>