4 Replies Latest reply on Mar 19, 2008 10:24 AM by jaikiran pai

    4.2.2- Injection of PersistenceUnit in a different jar not w

    jaikiran pai Master

      I am trying out a sample application on JBoss-4.2.2 with Java 1.5. I have a stateless session bean which expects an entitymanager to be injected:

      package org.myapp.ejb.impl;
      
      import javax.ejb.Remote;
      import javax.ejb.Stateless;
      import javax.persistence.EntityManager;
      import javax.persistence.PersistenceContext;
      
      import org.jboss.annotation.ejb.RemoteBinding;
      import org.myapp.ejb.AppManager;
      
      @Stateless
      @Remote ({AppManager.class})
      @RemoteBinding (jndiBinding = "AppManagerBean")
      public class AppManagerBean implements AppManager {
      
       @PersistenceContext (unitName="myapp_ejb3.jar#EJB3Persistence")
       private EntityManager em;
      
       public String getVersion() {
       System.out.println("EM is " + em);
       return "1.0";
       }
      
      
      }
      

      The entitymanager is configured in a jar named myapp_ejb3.jar and the EJB is packaged in a jar named another_ejb3.jar. Both these jars are then packaged in a ear name EJB3Persistence.ear:

      EJB3Persistence.ear
       |
       |--- META-INF
       | |
       | |--- application.xml
       | |
       | |--- jboss-app.xml
       |
       |
       |--- another_ejb3.jar
       | |
       | |--- org.myapp.ejb.impl.AppManagerBean
       |
       |
       |--- myapp_ejb3.jar
       | |
       | |--- META-INF
       | | |
       | | |--- persistence.xml
      
      
      


      The contents of application.xml is:
      <?xml version="1.0" encoding="UTF-8"?>
      
      <application>
       <display-name>MyEJB3</display-name>
      
       <module>
       <ejb>myapp_ejb3.jar</ejb>
       </module>
      
      
       <module>
       <ejb>another_ejb3.jar</ejb>
       </module>
      
      
      </application>


      The contents of persistence.xml:
      <persistence>
       <persistence-unit name="EJB3Persistence">
       <jta-data-source>java:/EJB3PersistenceDS</jta-data-source>
       <class>blah.blah.blah</class>
      
       </persistence-unit>
      </persistence>


      Now when i deploy this ear file, i get a deployment exception saying that the persistenceunit EJB3Persistence is not installed and hence the bean cannot be deployed:
      12:41:59,332 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
      
      --- MBeans waiting for other MBeans ---
      ObjectName: jboss.j2ee:ear=EJB3Persistence.ear,jar=another_ejb3.jar,name=AppManagerBean,service=EJB3
       State: NOTYETINSTALLED
       I Depend On:
       persistence.units:jar=pp_ejb3.jar,unitName=EJB3Persistence
      
      --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
      ObjectName: persistence.units:jar=pp_ejb3.jar,unitName=EJB3Persistence
       State: NOTYETINSTALLED
       Depends On Me:
       jboss.j2ee:ear=EJB3Persistence.ear,jar=another_ejb3.jar,name=AppManagerBean,service=EJB3


      A bit of debugging led me to the DeploymentPersistenceUnitResolver class which has this getPersistenceUnitDeployment(String unitName) method. This internally calls the findRelativeDeployment(String relativeName) method on JmxDeploymentScopeImpl which has this piece of code:

      public Ejb3Deployment findRelativeDeployment(String relativeName)
       {
       String relativeShortName = relativeName.substring(3);
       return deployments.get(relativeShortName);
       }
      


      The relativeName parameter that's been passed, has the value "myapp_ejb3.jar". However the substring(3) (not sure why this is being done) incorrectly changes this to "pp_ejb3.jar" and then uses this to look in the deployments map. As a result this always returns null which effectively means that the PersistenceUnit named myapp_ejb3.jar#EJB3Persistence could not be found.

      To get around this, i changed the findRelativeDeployment method to:
      public Ejb3Deployment findRelativeDeployment(String relativeName)
       {
      
       return deployments.get(relativeName);
       }


      This worked and the entitymanager was successfully injected in the bean.

      2008-03-11 13:03:33,208 DEBUG [org.jboss.ejb3.Ejb3Module] Starting jboss.j2ee:service=EJB3,module=another_ejb3.jar
      2008-03-11 13:03:47,505 DEBUG [org.jboss.injection.PersistenceUnitHandler] ***** adding PU dependency from located persistence unit: persistence.units:ear=EJB3Persistence.ear,jar=myapp_ejb3.jar,unitName=EJB3Persistence
      .....
      13:03:49,802 INFO [EJBContainer] STARTED EJB: org.myapp.ejb.impl.AppManagerBean ejbName: AppManagerBean
      13:03:49,865 INFO [EARDeployer] Started J2EE application: file:/D:/JBoss-4.2.2/jboss-4.2.2.GA/server/jaikiran/deploy/EJB3Persistence.ear/
      
      



      Has this been reported before? If not, should i report this in the JIRA?


        • 1. Re: 4.2.2- Injection of PersistenceUnit in a different jar n
          Rashid Limbada Newbie

          HI

          Have you reported this bug. I am having the same problem and I am surprised that nobody else has commented on this topic. Could you please tell me in which class the findRelativeDeployment(String relativeName) method is found. I cannot seem to trace it.

          Thanks

          • 2. Re: 4.2.2- Injection of PersistenceUnit in a different jar n
            jaikiran pai Master

             

            Have you reported this bug.


            No, not yet. I'm waiting for someone from JBoss to confirm that this indeed is a bug and has not yet been reported.

            Could you please tell me in which class the findRelativeDeployment(String relativeName) method is found. I cannot seem to trace it.


            This method is available in the org.jboss.ejb3.JmxDeploymentScopeImpl class.

            I am having the same problem


            Can you please explain more about your application packaging, JBoss server version, java version and post the exception logs? That will help in determining if it's the same issue or some other problem.


            • 3. Re: 4.2.2- Injection of PersistenceUnit in a different jar n
              Rashid Limbada Newbie

              Hi

              I have an EAR file which was deployed correctly on JBoss 4.2.1. However, since upgrading to JBoss4.2.2 I cannot seem to deploy my application. The structure of my EAR is as follows

              wpca.ear
              |
              |--- META-INF
              | |
              | |--- application.xml
              | |
              | |--- jboss-app.xml
              |
              |
              |--- ejbArchive.jar
              | |
              | |--- META-INF
              | | |
              | | |--- persistence.xml
              | |--- Classes
              |
              |
              |--- webArchive.jar


              I am using JBoss4.2.2GA and java1.6.0_02. My ejbArchive contains many EJB's. The onl ones that dont get deployed are the ones with dependencies. The rest of my EJB's are deployed correctly. Here are some of the error logs. I have only copied parts thereof:

              15:33:10,400 WARN [ServiceController] Problem starting service jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=ViewLogsBean,service=EJB3
              java.lang.RuntimeException: could not resolve global JNDI name for @EJB for container ViewLogsBean: reference class: wpca.model.dao.TeamDAO ejbLink: not used by any EJBs
              at org.jboss.injection.EjbEncInjector.inject(EjbEncInjector.java:88)
              at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:566)
              at org.jboss.ejb3.SessionContainer.start(SessionContainer.java:154)
              at org.jboss.ejb3.stateful.StatefulContainer.start(StatefulContainer.java:92)
              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.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:103)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
              at sun.reflect.GeneratedMethodAccessor85.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
              at $Proxy0.start(Unknown Source)
              at org.jboss.system.ServiceController.start(ServiceController.java:417)
              at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
              at $Proxy56.start(Unknown Source)
              at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:120)
              at org.jboss.ejb3.Ejb3Deployment.registerEJBContainer(Ejb3Deployment.java:301)
              at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:362)
              at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:91)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
              at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
              at $Proxy0.start(Unknown Source)
              at org.jboss.system.ServiceController.start(ServiceController.java:417)
              at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
              at $Proxy33.start(Unknown Source)
              at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:512)
              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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
              at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
              at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
              at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
              at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
              at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
              at $Proxy34.start(Unknown Source)
              at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
              at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
              at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
              at $Proxy9.deploy(Unknown Source)
              at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
              at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
              at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
              at $Proxy0.start(Unknown Source)
              at org.jboss.system.ServiceController.start(ServiceController.java:417)
              at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
              at $Proxy4.start(Unknown Source)
              at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
              at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
              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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
              at $Proxy5.deploy(Unknown Source)
              at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
              at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
              at org.jboss.Main.boot(Main.java:200)
              at org.jboss.Main$1.run(Main.java:508)
              at java.lang.Thread.run(Thread.java:619)
              15:33:10,432 INFO [EJB3Deployer] Deployed: file:/C:/Program Files/jboss-4.2.2.GA/server/default/tmp/deploy/tmp26762wpca.ear-contents/ejbArchive.jar
              15:33:10,541 INFO [TomcatDeployer] deploy, ctxPath=/WPCA, warUrl=.../tmp/deploy/tmp26762wpca.ear-contents/webArchive-exp.war/
              15:33:11,900 INFO [BasicTilesContainer] Initializing Tiles2 container. . .
              15:33:12,010 INFO [BasicTilesContainer] Tiles2 container initialization complete.
              15:33:12,010 INFO [TilesAccess] Publishing TilesContext for context: org.apache.catalina.core.ApplicationContextFacade
              15:33:13,072 INFO [XmlConfigurationProvider] Parsing configuration file [struts-default.xml]
              15:33:13,354 INFO [XmlConfigurationProvider] Parsing configuration file [struts-plugin.xml]
              15:33:13,369 INFO [XmlConfigurationProvider] Parsing configuration file [struts.xml]
              15:33:13,369 WARN [Settings] Settings: Could not parse struts.locale setting, substituting default VM locale
              15:33:14,744 INFO [ResolverUtil] Scanning for classes in [/C:/Program Files/jboss-4.2.2.GA/server/default/tmp/deploy/tmp26762wpca.ear-contents/webArchive-exp.war/WEB-INF/classes/wpca/controller/action/] matching criteria: org.apache.struts2.config.ClasspathConfigurationProvider$1@158fa97
              15:33:16,463 INFO [ObjectTypeDeterminerFactory] Setting DefaultObjectTypeDeterminer as default ...
              15:33:16,510 INFO [EARDeployer] Started J2EE application: file:/C:/Program Files/jboss-4.2.2.GA/server/default/deploy/wpca.ear
              15:33:16,510 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

              --- MBeans waiting for other MBeans ---
              ObjectName: jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=CreateHumanEntityBean,service=EJB3
              State: FAILED
              Reason: java.lang.RuntimeException: could not resolve global JNDI name for @EJB for container CreateHumanEntityBean: reference class: wpca.model.dao.PersonDAO ejbLink: not used by any EJBs
              Depends On Me:
              jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=CreateClubBean,service=EJB3
              jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=CreateFixtureBean,service=EJB3
              jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=CreatePlayerBean,service=EJB3
              jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=CreateTeamBean,service=EJB3

              ObjectName: jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=CreateInningsBean,service=EJB3
              State: FAILED
              Reason: java.lang.RuntimeException: could not resolve global JNDI name for @EJB for container CreateInningsBean: reference class: wpca.model.dao.InningsDAO ejbLink: not used by any EJBs
              Depends On Me:
              jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=CreateMatchBean,service=EJB3

              ObjectName: jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=CreateMatchBean,service=EJB3
              State: NOTYETINSTALLED
              I Depend On:
              persistence.units:ear=wpca.ear,jar=ejbArchive.jar,unitName=WPCA_Cricket
              jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=CreateInningsBean,service=EJB3
              jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=CreateMatchStatBean,service=EJB3

              ObjectName: jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=CreatePenaltyBean,service=EJB3
              State: FAILED
              Reason: java.lang.RuntimeException: could not resolve global JNDI name for @EJB for container CreatePenaltyBean: reference class: wpca.model.dao.FixtureDAO ejbLink: not used by any EJBs
              I Depend On:
              persistence.units:ear=wpca.ear,jar=ejbArchive.jar,unitName=WPCA_Cricket

              ObjectName: jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=CreatePlayerBean,service=EJB3
              State: NOTYETINSTALLED
              I Depend On:
              persistence.units:ear=wpca.ear,jar=ejbArchive.jar,unitName=WPCA_Cricket
              jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=CreateHumanEntityBean,service=EJB3

              ObjectName: jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=CreatePointsBean,service=EJB3
              State: FAILED
              Reason: java.lang.RuntimeException: could not resolve global JNDI name for @EJB for container CreatePointsBean: reference class: wpca.model.dao.PointsDAO ejbLink: not used by any EJBs
              I Depend On:
              persistence.units:ear=wpca.ear,jar=ejbArchive.jar,unitName=WPCA_Cricket

              ObjectName: jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=CreateTeamBean,service=EJB3
              State: NOTYETINSTALLED
              I Depend On:
              persistence.units:ear=wpca.ear,jar=ejbArchive.jar,unitName=WPCA_Cricket
              jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=CreateHumanEntityBean,service=EJB3

              ObjectName: jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=ViewLogsBean,service=EJB3
              State: FAILED
              Reason: java.lang.RuntimeException: could not resolve global JNDI name for @EJB for container ViewLogsBean: reference class: wpca.model.dao.TeamDAO ejbLink: not used by any EJBs
              I Depend On:
              persistence.units:ear=wpca.ear,jar=ejbArchive.jar,unitName=WPCA_Cricket

              --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
              ObjectName: jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=CreatePenaltyBean,service=EJB3
              State: FAILED
              Reason: java.lang.RuntimeException: could not resolve global JNDI name for @EJB for container CreatePenaltyBean: reference class: wpca.model.dao.FixtureDAO ejbLink: not used by any EJBs
              I Depend On:
              persistence.units:ear=wpca.ear,jar=ejbArchive.jar,unitName=WPCA_Cricket

              ObjectName: jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=ViewLogsBean,service=EJB3
              State: FAILED
              Reason: java.lang.RuntimeException: could not resolve global JNDI name for @EJB for container ViewLogsBean: reference class: wpca.model.dao.TeamDAO ejbLink: not used by any EJBs
              I Depend On:
              persistence.units:ear=wpca.ear,jar=ejbArchive.jar,unitName=WPCA_Cricket

              ObjectName: jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=CreatePointsBean,service=EJB3
              State: FAILED
              Reason: java.lang.RuntimeException: could not resolve global JNDI name for @EJB for container CreatePointsBean: reference class: wpca.model.dao.PointsDAO ejbLink: not used by any EJBs
              I Depend On:
              persistence.units:ear=wpca.ear,jar=ejbArchive.jar,unitName=WPCA_Cricket

              ObjectName: jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=CreateHumanEntityBean,service=EJB3
              State: FAILED
              Reason: java.lang.RuntimeException: could not resolve global JNDI name for @EJB for container CreateHumanEntityBean: reference class: wpca.model.dao.PersonDAO ejbLink: not used by any EJBs
              Depends On Me:
              jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=CreateClubBean,service=EJB3
              jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=CreateFixtureBean,service=EJB3
              jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=CreatePlayerBean,service=EJB3
              jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=CreateTeamBean,service=EJB3

              ObjectName: jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=CreateInningsBean,service=EJB3
              State: FAILED
              Reason: java.lang.RuntimeException: could not resolve global JNDI name for @EJB for container CreateInningsBean: reference class: wpca.model.dao.InningsDAO ejbLink: not used by any EJBs
              Depends On Me:
              jboss.j2ee:ear=wpca.ear,jar=ejbArchive.jar,name=CreateMatchBean,service=EJB3



              I hope this helps

              Thanks


              • 4. Re: 4.2.2- Injection of PersistenceUnit in a different jar n
                jaikiran pai Master

                sharkey,

                This does not look related to what i reported in my first post. Can you please open a new topic in this forum so that we can discuss this issue there? Also, while posting the logs, code or xml content, please 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.