4 Replies Latest reply on Dec 18, 2008 12:05 PM by Alejandro Ayuso

    Failed to find persistence unit

    Alejandro Ayuso Newbie

      Hi

      I'm currently migrating a working JBoss 4.0.5.GA EAR to 5.0.0.GA. The ear is structured as this:

      EAR
       |- Servlet WAR
       |- Utility JAR
       |- MDB (jms)
       |- EJB_3 (stateless/no entities, no persistence)
       |- EJB_1 (stateless/entities)
       |-1PU
       |- EJB_2 (stateless/entities)
       |-2PU
      


      Each of the EJB3 with entities have their own persistence.xml

      The EJB_3 with no entities, uses the EJB_1 and EJB_2 by Local interfaces.

      When I deploy on JBoss 5, a "failed to resolve persistence unit 1PU" error is thrown. No for 2PU, only for 1PU.

      So, I copy the 1PU persistence.xml file into the troublesome bean EJB_3 and deployments goes fine. But now, I get "Cannot open connection" errors.

      Each of this beans are independent of each other.

      The workflow is something like
      x-->servlet-->jms_queue-->MDB-->EJB_3-->EJB_1
      

      Any help? Thanks