[seam-issues] [JBoss JIRA] Commented: (SEAMSERVLET-29) Deployment to Glassfish AS 3.1 fails with java.lang.NullPointerException

Dan Allen (JIRA) jira-events at lists.jboss.org
Sun Mar 13 23:26:45 EDT 2011


    [ https://issues.jboss.org/browse/SEAMSERVLET-29?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587640#comment-12587640 ] 

Dan Allen commented on SEAMSERVLET-29:
--------------------------------------

The problem is that application servers are assuming that a web fragment exists if it's referenced from another web fragment. Seam Servlet's web-fragment.xml references the Weld Servlet web fragment in the ordering stanza:

   <ordering>
      <after>
         <name>WeldServlet</name>
      </after>
      <before>
         <others/>
      </before>
   </ordering>

The Weld Servlet web-fragment.xml is only present if you are using Weld Servlet to provide CDI in a Servlet environment. Actually, Weld Servlet doesn't even have a web-fragment.xml yet. That was just the plan, which hasn't been implemented.

You may wonder why we need the reference at all. In an EE application server, we can assume that CDI will be available when the context initialized event is fired. However, when using CDI in a Servlet container, as provided by Weld Servlet, the ordering is not guaranteed. We hoped to be able to include an ordering hint so that Seam Servlet web components would be registered after the Weld Servlet web components.

Clearly we can't do it this way atm :(

> Deployment to Glassfish AS 3.1 fails with java.lang.NullPointerException
> ------------------------------------------------------------------------
>
>                 Key: SEAMSERVLET-29
>                 URL: https://issues.jboss.org/browse/SEAMSERVLET-29
>             Project: Seam Servlet
>          Issue Type: Bug
>    Affects Versions: 3.0.0.CR1
>         Environment: Glassfish 3.1 (release), Linux (Ubuntu 10.10), Java 1.6.0_20
>            Reporter: Craig Ringer
>
> Deployment of an empty skeleton application to a Glassfish AS 3.1 server fails with java.lang.ClassNotFoundException: org.jboss.seam.solder.beanManager.BeanManagerAware . It appears that the 3.0.0.CR1 release depends on Seam Solder, but the maven pom doesn't declare that, so the dependency decaration:
>         <dependency>
>             <groupId>org.jboss.seam.servlet</groupId>
>             <artifactId>seam-servlet</artifactId>
>             <version>3.0.0.CR1</version>
>         </dependency>
> causes failure. If I explicitly add a dependency on Seam Solder:
>         <dependency>
>             <groupId>org.jboss.seam.servlet</groupId>
>             <artifactId>seam-servlet</artifactId>
>             <version>3.0.0.CR1</version>
>         </dependency>
>         <dependency>
>             <groupId>org.jboss.seam.solder</groupId>
>             <artifactId>seam-solder</artifactId>
>             <version>3.0.0.CR1</version>
>         </dependency>
> , the failure changes to a NPE that looks like it's deep in the Glassfish deployment code, as shown below. Deploying Seam Solder alone, without Seam Servlet, works fine, but when both are present the deployment log shows:
> SEVERE: Exception while deploying the app [com.mycompany_dummy_war_1.0-SNAPSHOT]
> SEVERE: The log message is null.
> java.lang.NullPointerException
> 	at com.sun.enterprise.deployment.OrderingDescriptor$Node.access$300(OrderingDescriptor.java:434)
> 	at com.sun.enterprise.deployment.OrderingDescriptor.sort(OrderingDescriptor.java:169)
> 	at com.sun.enterprise.deployment.archivist.WebArchivist.readStandardFragments(WebArchivist.java:438)
> 	at com.sun.enterprise.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:350)
> 	at com.sun.enterprise.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:89)
> 	at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:409)
> 	at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:383)
> 	at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:246)
> 	at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:255)
> 	at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:216)
> 	at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:165)
> 	at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:180)
> 	at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:93)
> 	at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:826)
> 	at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:768)
> 	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:368)
> 	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
> 	at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:370)
> 	at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
> 	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
> 	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1067)
> 	at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
> 	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1247)
> 	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
> 	at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:465)
> 	at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:222)
> 	at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
> 	at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
> 	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:234)
> 	at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
> 	at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
> 	at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
> 	at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
> 	at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
> 	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
> 	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
> 	at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
> 	at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
> 	at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
> 	at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
> 	at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
> 	at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
> 	at java.lang.Thread.run(Thread.java:636)
> SEVERE: Exception while deploying the app [com.mycompany_dummy_war_1.0-SNAPSHOT]

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the seam-issues mailing list