[jboss-jira] [JBoss JIRA] (AS7-6861) Stateful session bean causes NPE when using container interceptor

jaikiran pai (JIRA) jira-events at lists.jboss.org
Wed Apr 10 08:03:53 EDT 2013


     [ https://issues.jboss.org/browse/AS7-6861?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

jaikiran pai resolved AS7-6861.
-------------------------------

    Fix Version/s: 8.0.0.Alpha1
       Resolution: Done

    
> Stateful session bean causes NPE when using container interceptor
> -----------------------------------------------------------------
>
>                 Key: AS7-6861
>                 URL: https://issues.jboss.org/browse/AS7-6861
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: EJB
>    Affects Versions: EAP 6.1.0.Alpha (7.2.0.Final)
>            Reporter: Kiran Anantha
>            Assignee: jaikiran pai
>             Fix For: 8.0.0.Alpha1
>
>         Attachments: testtx.zip
>
>
> Add a container interceptor in jboss-ejb3.xml and deploy. The deployment fails with a NPE. 
> The issue occurs for a stateful session bean (that contains no timer methods, please see the forum thread)
> 11:24:29,490 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.unit."testtx.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."testtx.war".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment "testtx.war"
>           at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.0.Final.jar:7.2.0.Final]
>           at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
>           at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
>           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]
>           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]
>           at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]
> Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011030: Could not configure component sample.RemoteStateful
>           at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:91)
>           at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.2.0.Final.jar:7.2.0.Final]
>           ... 5 more
> Caused by: java.lang.NullPointerException
>           at org.jboss.as.ejb3.component.EJBContainerInterceptorsViewConfigurator.doConfigure(EJBContainerInterceptorsViewConfigurator.java:143)
>           at org.jboss.as.ejb3.component.EJBContainerInterceptorsViewConfigurator.configure(EJBContainerInterceptorsViewConfigurator.java:104)
>           at org.jboss.as.ee.component.ComponentDescription$DefaultComponentConfigurator.configure(ComponentDescription.java:929)
>           at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:80)
>           ... 6 more
>  
> It seems to happen when I configure the timeout in ejb-jar.xml which looks like this:
>  
> <?xml version="1.0" encoding="UTF-8"?>
> <ejb-jar version="3.1" xmlns="http://java.sun.com/xml/ns/javaee"
>           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>           xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd">
>           <display-name>Test Server</display-name>
>  
>  
>           <enterprise-beans>
>                     <session>
>                               <ejb-name>sample.RemoteStateful</ejb-name>
>                               <ejb-class>sample.StatefulSample</ejb-class>
>                               <session-type>Stateful</session-type>
>                               <stateful-timeout>
>                                         <timeout>30</timeout>
>                                         <unit>Seconds</unit>
>                               </stateful-timeout>
>                     </session>
>           </enterprise-beans>
> </ejb-jar>
>  
> My jboss-ejb3.xml looks like this:
>  
> <?xml version="1.0" encoding="UTF-8"?>
> <jboss:ejb-jar xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
>     xmlns="http://java.sun.com/xml/ns/javaee"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xmlns:ci ="urn:container-interceptors:1.0"
>     version="3.1">
>     <assembly-descriptor xmlns="http://java.sun.com/xml/ns/javaee">
>         <ci:container-interceptors>
>             <!-- Default interceptor -->
>             <interceptor-binding>
>                 <ejb-name>*</ejb-name>
>                 <interceptor-class>sample.EjbContainerInterceptor</interceptor-class>
>             </interceptor-binding>           
>         </ci:container-interceptors>
>     </assembly-descriptor>   
> </jboss:ejb-jar>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list