9 Replies Latest reply on Jun 19, 2007 3:27 AM by dkane

    Mysterious Exception

    qpool.char

      Hello, searched for information but did not success...

      When i deploy my EJB3 application, JBoss 4.0.5 GA + RC9 patch says:

      11:58:37,109 WARN [Ejb3Configuration] Persistence provider caller does not implements the EJB3 spec correctly
      . PersistenceUnitInfo.getNewTempClassLoader() is null.
      11:58:37,140 WARN [ServiceController] Problem starting service persistence.units:ear=Ejb3Test.ear,unitName=Ej
      b3PU
      javax.persistence.PersistenceException: [PersistenceUnit: Ejb3PU] class or package not found
      at org.hibernate.ejb.Ejb3Configuration.addNamedAnnotatedClasses(Ejb3Configuration.java:1067)


      and later

      --- MBeans waiting for other MBeans ---
      ObjectName: persistence.units:ear=Ejb3Test.ear,unitName=Ejb3PU
      State: FAILED
      Reason: javax.persistence.PersistenceException: [PersistenceUnit: Ejb3PU] class or package not found
      I Depend On:
      jboss.jca:service=DataSourceBinding,name=Ejb3DS

      --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
      ObjectName: persistence.units:ear=Ejb3Test.ear,unitName=Ejb3PU
      State: FAILED
      Reason: javax.persistence.PersistenceException: [PersistenceUnit: Ejb3PU] class or package not found
      I Depend On:
      jboss.jca:service=DataSourceBinding,name=Ejb3DS


      But the DataSource is ok. And the source code too, as far as i can see. Worked for 2 days now on that problem. Any suggestions please?

      Thx very much!!!

        • 1. Re: Mysterious Exception
          te-bachi

          First of all, when I install JBoss 4.0.5 AS from the JEMS Installer with ejb3, I don't have to patch.

          Second, we (or I) would like to see your JAR-structure and the persistence.xml

          • 2. Re: Mysterious Exception
            qpool.char

            problem solved.... mistake in my build script.... wasted 2 days.... no comment

            • 3. Re: Mysterious Exception
              qpool.char

              You were totally right.... my build script did not package all of the .class files. I m sorry for stealing your time.... i will look at the easy things first when i face the next problem. :)

              • 4. Re: Mysterious Exception
                te-bachi

                No problem...

                • 5. Re: Mysterious Exception
                  dkane

                   

                  "QPool.Char" wrote:
                  You were totally right.... my build script did not package all of the .class files. I m sorry for stealing your time.... i will look at the easy things first when i face the next problem. :)



                  Could you please tell a bit more about that ?
                  Having the same problem. The exception is

                  javax.persistence.PersistenceException: [PersistenceUnit: telePUnit] class or package not found
                  
                  .....
                  
                  Caused by: java.lang.ClassNotFoundException: com.track.AutoCMP
                  


                  The AutoCMP.class is packaged. Breaking my head during the whole day, please help, what's wrong ?

                  Thank you !

                  • 6. Re: Mysterious Exception
                    dkane

                    Notable addition :
                    when I remove @Entity annotation from CMP class which is the root cause of exception, this class is not "ClassNotFound" anymore. But another packaged class, still with @Entity annotation, takes this place in exception report.

                    So, the problem is definitely related to entity beans and their persistence, not to absence of class file in my case.

                    • 7. Re: Mysterious Exception
                      waynebaylor

                      could you post some info on the persistence.xml

                      • 8. Re: Mysterious Exception
                        dkane

                        Thank you for attention.
                        I have solved that , but still don't understand the reason.
                        The project was created as "J2EE 1.4 project" in JBoss IDE and moved all sources there. I have re-created one as "EJB3.0 project" and now it works. The only difference was that "JBoss AOP 1.3 libraries" appeared in library list. In "J2EE 1.4 project" I were unable to select this library from the list of available libraries to attach.

                        • 9. Re: Mysterious Exception
                          dkane

                          Sorry for the typo, the correct text :

                          Thank you for attention.
                          I have solved that , but still don't understand the reason.
                          The project was created as "J2EE 1.4 project" in JBoss IDE. I have re-created one as "EJB3.0 project" and moved all sources there and now it works. The only difference was that "JBoss AOP 1.3 libraries" appeared in library list. In "J2EE 1.4 project" I were unable to select this library from the list of available libraries to attach.