On Oct 15, 2009, at 2:23 PM, Pavel Bucek wrote:
> Hello,
>
> I tried deploy Jersey sample app (bookmark) and I got NPE:
>
For the benefit of others here is the link:
http://download.java.net/maven/2/com/sun/jersey/samples/bookmark/1.1.3-ea/bookmark-1.1.3-ea-project.zip
And note the instructions in the README.html for setting up the DB.
We currently do not distribute this sample with the Jersey samples
package available from the update center.
Pavel, to be on the safe side it might be best not have the Jersey
jars in the war and change the dependency scope to provided. Did you
try that already?
Paul.
> [#|2009-10-15T14:03:22.297+0200|SEVERE|glassfish|
> javax.enterprise.system.core.com.sun.enterprise.v3.server|
> _ThreadID=28;_ThreadName=Thread-3;|Exception while deploying the app
> java.lang.NullPointerException
> at
> com
> .sun
> .enterprise
> .deployment
> .WebBundleDescriptor
> .combineInjectionTargets(WebBundleDescriptor.java:1937)
> at
> com
> .sun
> .enterprise
> .deployment
> .WebBundleDescriptor
> .combineEntityManagerFactoryReferenceDescriptors
> (WebBundleDescriptor.java:890)
> at
> com
> .sun
> .enterprise
> .deployment
> .WebBundleDescriptor.addWebBundleDescriptor(WebBundleDescriptor.java:
> 260)
> at
> com
> .sun
> .enterprise
> .deployment
> .archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:321)
> at
> com
> .sun
> .enterprise
> .deployment
> .archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:79)
> at
> com
> .sun
> .enterprise
> .deployment
> .archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:397)
> at
> com
> .sun
> .enterprise.deployment.archivist.Archivist.openWith(Archivist.java:
> 259)
> at
> com
> .sun
> .enterprise
> .deployment
> .archivist.ApplicationFactory.openWith(ApplicationFactory.java:222)
> at
> org
> .glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:
> 103)
> at
> org
> .glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:
> 41)
> at
> com
> .sun
> .enterprise
> .v3
> .server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:
> 581)
> at
> com
> .sun
> .enterprise
> .v3
> .server
> .ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:
> 523)
> at
> com
> .sun
> .enterprise
> .v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:233)
> at
> com
> .sun
> .enterprise
> .v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:169)
> at
> org
> .glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:
> 283)
> at com.sun.enterprise.v3.admin.CommandRunnerImpl
> $1.execute(CommandRunnerImpl.java:305)
> at
> com
> .sun
> .enterprise
> .v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
> at
> com
> .sun
> .enterprise
> .v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1154)
> at com.sun.enterprise.v3.admin.CommandRunnerImpl.access
> $900(CommandRunnerImpl.java:83)
> at com.sun.enterprise.v3.admin.CommandRunnerImpl
> $ExecutionContext.execute(CommandRunnerImpl.java:1213)
> at com.sun.enterprise.v3.admin.CommandRunnerImpl
> $ExecutionContext.execute(CommandRunnerImpl.java:1202)
> at
> com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:
> 362)
> at
> com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:
> 201)
> at
> com
> .sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:
> 166)
> at
> com
> .sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:
> 100)
> at
> com
> .sun
> .enterprise
> .v3.services.impl.ContainerMapper.service(ContainerMapper.java:241)
> at
> com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:
> 789)
> at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:
> 697)
> at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:
> 951)
> at
> com
> .sun
> .grizzly
> .http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:166)
> at
> com
> .sun
> .grizzly
> .DefaultProtocolChain
> .executeProtocolFilter(DefaultProtocolChain.java:135)
> at
> com
> .sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:
> 102)
> at
> com
> .sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:
> 88)
> at
> com
> .sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
> at
> com
> .sun
> .grizzly
> .ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
> at
> com
> .sun
> .grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
> at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
> at com.sun.grizzly.util.FixedThreadPool
> $BasicWorker.doWork(FixedThreadPool.java:431)
> at com.sun.grizzly.util.FixedThreadPool
> $BasicWorker.run(FixedThreadPool.java:410)
> at java.lang.Thread.run(Thread.java:637)
> |#]
>
> Is this already reported or should I file a new issue?
>
> steps to reproduce:
>
> env:
> gf build (rev 32738)
> build in jersey (1.1.3-ea); I tried with 1.1.5 (latest trunk) and
> got same exception.
>
> svn checkout https://jersey.dev.java.net/svn/jersey/trunk/jersey/samples/bookmark
> bookmark --username [username]
> cd bookmark
> mvn clean install
>
> $GF_HOME/bin/asadmin deploy ./target/bookmark.war
>
> Thanks,
> Pavel
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>