11 Replies Latest reply on Oct 18, 2008 6:43 AM by jaikiran pai

    Deployment problem

    Rogerio Baldini Newbie

      Hi,

      I am receiving this error above and I don't know what's hapenning.

      Can anybody help me ?

      Thanks a lot,
      Rogerio .

      My Classes:
      @Stateless(name="PlcBaseBO")
      @TransactionManagement(TransactionManagementType.CONTAINER)
      public class PlcBaseBO extends PlcBaseBC implements IPlcBO {
      ...
      }

      @Local
      public interface IPlcBO {
      ...
      }



      18:11:34,526 INFO [EJBContainer] STOPPED EJB: com.powerlogic.jcompany.modelo.PlcBaseBO ejbName: PlcBaseBO
      18:11:34,527 ERROR [AbstractKernelController] Error installing to Start: name=jboss.j2ee:ear=jcompany_jsf_ear.ear,jar=jcompany_modelo-5.1.3-SNAPSHOT.j
      ar,name=PlcBaseBO,service=EJB3 state=Create
      java.lang.NullPointerException
      at org.jboss.ejb3.proxy.factory.ProxyFactoryHelper.getRemoteAndBusinessRemoteInterfaces(ProxyFactoryHelper.java:608)
      at org.jboss.ejb3.proxy.factory.ProxyFactoryHelper.getJndiName(ProxyFactoryHelper.java:414)
      at org.jboss.ejb3.Ejb3Deployment.getEjbJndiName(Ejb3Deployment.java:424)
      at org.jboss.ejb3.EJBContainer.getEjbJndiName(EJBContainer.java:1497)
      at org.jboss.injection.EjbEncInjector.inject(EjbEncInjector.java:80)
      at org.jboss.ejb3.EJBContainer.lockedStart(EJBContainer.java:873)
      at org.jboss.ejb3.session.SessionContainer.lockedStart(SessionContainer.java:163)
      at org.jboss.ejb3.session.SessionSpecContainer.lockedStart(SessionSpecContainer.java:626)
      at org.jboss.ejb3.stateless.StatelessContainer.lockedStart(StatelessContainer.java:220)
      at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:858)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
      at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
      at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
      at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
      at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
      at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
      at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
      at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
      at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
      at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
      at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
      at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

        • 1. Re: Deployment problem
          jaikiran pai Master

          Is this the only EJB code that you have? Do you have any other place where you are trying to inject the bean? And which version of JBoss and Java are you using?

          • 2. Re: Deployment problem
            Rogerio Baldini Newbie

            I am trying to inject it in another EJB, but I don't know if it makes any sense in this context, because there is an explicity error in this line.

            I am trying to debug jboss source code and I discovered that container variable is null. I don't know why.

            I am using Java 6 and jBoss 5.0.0 RC2.

            Thanks a lot.

            Rogerio.

            • 3. Re: Deployment problem
              jaikiran pai Master

               

              I am trying to inject it in another EJB


              Please post that exact code. And how have you packaged the EJBs? Please provide more details about the application


              While posting the logs or xml content or code, remember to wrap it in a code block using the Code button in the message editor window and please hit the Preview button to make sure your post is correctly formatted

              • 4. Re: Deployment problem
                Rogerio Baldini Newbie

                Thanks a lot for your time.
                I will try to explain better my organization.

                I have a BO (EJB) where is injected a DAO (EJB) and this DAO has a injection of PersistenceContext.

                @Stateless(name="PlcBaseBO", mappedName="PlcBaseBO")
                @TransactionManagement(TransactionManagementType.CONTAINER)
                public class PlcBaseBO extends PlcBaseBC implements IPlcBO, IPlcBORemote {
                @EJB(name="PlcBaseJpaDAO") IPlcDAO plcDAO;
                ...
                }


                @Stateless(name="PlcBaseJpaDAO", mappedName="PlcBaseJpaDAO")
                @TransactionManagement(TransactionManagementType.CONTAINER)
                public class PlcBaseJpaDAO extends PlcBaseDAO implements IPlcDAO, IPlcDAORemote {
                @PersistenceContext protected EntityManager em;
                ....
                }


                I see in debug mode that the problem is occurring in
                Ejb3JBoss5Deployment(Ejb3Deployment).getEjbJndiName(Class)
                when it's trying to
                deploymentScope.getEjbContainer(businessIntf, relativePath);
                with parameters:
                interface com.powerlogic.jcompany.persistencia.IPlcDAO
                jcompany_modelo-5.1.3-SNAPSHOT.jar

                And an important thing: this ear is working fine in Glassfish.

                Thanks again.
                Rogerio.



                • 5. Re: Deployment problem
                  jaikiran pai Master

                  Can you post the code of IPlcDAO and IPlcDAORemote including the annotations on them? And while posting the logs or xml content or code, remember to wrap it in a code block using the Code button in the message editor window and please hit the Preview button to make sure your post is correctly formatted. That will make it easier to understand the code.

                  • 6. Re: Deployment problem
                    Rogerio Baldini Newbie

                     

                    @Remote
                    public interface IPlcDAORemote extends IPlcDAO {
                    
                    }
                    
                    
                    @Local
                    public interface IPlcDAO {
                    ...
                    }
                    
                    


                    • 8. Re: Deployment problem
                      jaikiran pai Master

                      Could you please let us know your packaging of the application? Do you have one EAR or more than one EAR? And what does each one contain? And what is the contents of application.xml? And post the output of:

                      jar -tf myapp.ear


                      Where myapp.ear is your ear filename (if you are deploying as a jar and not an ear then post the output of myapp.jar).


                      • 9. Re: Deployment problem
                        Rogerio Baldini Newbie

                        It's only one ear called jcompany_jsf_ear.ear generated by maven.

                        jar -tf jcompany_jsf_ear.ear
                        
                        
                        META-INF/
                        META-INF/MANIFEST.MF
                        asm-1.5.3.jar
                        asm-attrs-1.5.3.jar
                        aspectwerkz-2.0.jar
                        cglib-2.1_3.jar
                        commons-beanutils-1.7.0.jar
                        commons-collections-3.2.jar
                        commons-digester-1.7.jar
                        commons-lang-2.1.jar
                        commons-logging-1.0.4.jar
                        commons-logging-api-1.0.4.jar
                        dom4j-1.6.1.jar
                        ejb3-persistence-3.1.jar
                        hibernate-annotations-plc-3.2.0.jar
                        hibernate-entitymanager-3.2.0.jar
                        hibernate-plc-3.2.5.1-GA.jar
                        jboss-archive-browsing-5.0.0alpha.jar
                        jcompany_comuns-5.1.3-SNAPSHOT.jar
                        jcompany_doc-5.1.3-SNAPSHOT.jar
                        jcompany_jsf.war
                        jcompany_jsf_comuns.jar
                        jcompany_jsf_modelo.jar
                        jcompany_modelo-5.1.3-SNAPSHOT.jar
                        log4j-1.2.13.jar
                        META-INF/application.xml
                        META-INF/jboss-app.xml
                        META-INF/sun-application.xml
                        xml-apis-1.0.b2.jar
                        META-INF/maven/
                        META-INF/maven/powerlogic.app/
                        META-INF/maven/powerlogic.app/jcompany_jsf_ear/
                        META-INF/maven/powerlogic.app/jcompany_jsf_ear/pom.xml
                        META-INF/maven/powerlogic.app/jcompany_jsf_ear/pom.properties
                        



                        application.xml

                        <?xml version="1.0" encoding="UTF-8"?>
                        <application>
                        
                         <description>jcompany_jsf_ear</description>
                         <display-name>jcompany_jsf_ear</display-name>
                         <module>
                         <ejb>jcompany_modelo-5.1.3-SNAPSHOT.jar</ejb>
                         </module>
                         <module>
                         <ejb>jcompany_jsf_modelo.jar</ejb>
                         </module>
                         <module>
                         <java>jcompany_jsf_comuns.jar</java>
                         </module>
                         <module>
                         <java>jcompany_comuns-5.1.3-SNAPSHOT.jar</java>
                         </module>
                         <module>
                         <java>commons-beanutils-1.7.0.jar</java>
                         </module>
                         <module>
                         <web>
                         <web-uri>jcompany_jsf.war</web-uri>
                         <context-root>jcompany_jsf</context-root>
                         </web>
                         </module>
                        </application>
                        


                        • 10. Re: Deployment problem
                          Rogerio Baldini Newbie

                          Hi,

                          I post my simplifyed ear to help you help me.

                          http://rapidshare.com/files/155032504/jcompany_jsf_ear.ear.html

                          Thanks.
                          Rogerio.

                          • 11. Re: Deployment problem
                            jaikiran pai Master

                            Thanks, i could reproduce this with this EAR. There's some issue with the injection probably related to https://jira.jboss.org/jira/browse/EJBTHREE-1289 which causes that exception when an ejb-jar.xml file is present in the ejb jar file. So the workaround is to remove the ejb-jar.xml file from your jcompany_jsf_modelo.jar ejb jar and deploy the application. I guess that deleting that xml file should be OK for you since it does not contain anything except the display name:

                            <?xml version="1.0" encoding="UTF-8"?>
                            <ejb-jar>
                             <display-name>jcompany_jsf_modelo</display-name>
                            </ejb-jar>