3 Replies Latest reply on Nov 25, 2010 6:39 AM by thomasgo

    Persistence unit doesn't start but no exception

    thomasgo

      Hi,

       

      I have a persistence unit that worked before but after some restructuring it won't start anymore.

       

      The log says it is starting the persistence unit, then loads the entities but the starting does not finish.

      From another application that is deployed in parallel I see that the "Starting persistence unit" message is printed twice before and after loading the entities.

       

      However, the second message is missing, instead I get the incomplete deployment listing telling me the persistence unit is the root cause (NOTYETINSTALLED).

       

      That's all I get, no exception or warning that provides any hint.

       

       

      Do you have an idea of what I might be missing or what I could do to track the error (besides debugging JBoss)?

       

      Btw, we're using JBoss 4.2.3.GA and Hibernate 3.3.2.GA.

       

       

      Thanks in advance.

        • 1. Re: Persistence unit doesn't start but no exception
          thomasgo

          I got it to work, but there's still a question:

           

          We're using a single persistence.xml for all included jars, i.e. the entity-jars are declared using <jar-file>.

          However, If i correctly understand the specification, it doesn't matter whether there are entities in the jar that contains the persistence.xml.

          That did cause the problem, though.

           

          When I moved the persistence.xml to a separate jar and added the jar that contained it previously via <jar-file> it is working.

           

          Any thoughts on this?

          • 2. Re: Persistence unit doesn't start but no exception
            wdfink

            Hi,

            I'm not sure whether exactly your problem match ..

            but I have also problems with the persistence.xml, detecting entities and locating the entity.jar within the <jar-file> element.

             

            After some skills and helpful hints it was clear that some of this strange effects are fixed with JB 5.1.

            I think this is better version to use for EJB3 (also some jboss annotation packages are changed ;-( )

            • 3. Re: Persistence unit doesn't start but no exception
              thomasgo

              Thanks for the hint.

              I already successfully ported the project to JB 5.1 some time ago, however it's not that easy to switch over since our infrastructure mostly constists of JB 4.2.3 instances.

               

              Anyway, if JB 5.1 really solves that problem that's one more reason to press on to the switch.