Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-8103

Entity (annotations) not being scanned in jars configured through jar-file in persistence.xml

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 6.0.0.M4
    • None
    • Deployers
    • None

    Description

      This looks related to JBAS-8060 - some of the persistence unit testcases in EJB3 testsuite are failing due to entities not being mapped. The packaging is a .ear file with 2 (or more) jars:

      app.ear

      — puone.jar
       
        — META-INF
          ---- persistence.xml
      — util.jar

      The util.jar contains some classes mapped as @Entity and the persistence.xml points to this jar, through jar-file element:

      <jar-file>util.jar</jar-file>

      The testcase fails with:

      Caused by: org.hibernate.MappingException: Unknown entity: org.jboss.ejb3.test.factory.Util
      at org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:704)

      The org.jboss.ejb3.test.factory.Util resides in util.jar and is as follows:

      package org.jboss.ejb3.test.factory;

      import java.io.Serializable;
      import javax.persistence.Entity;
      import javax.persistence.Id;

      /**

      • Comment
        *
      • @author <a href="mailto:bill@jboss.org">Bill Burke</a>
      • @version $Revision$
        */
        @Entity
        public class Util implements Serializable
        {
        ...

      Attachments

        Issue Links

          Activity

            People

              ajustin@redhat.com Ales Justin
              jaikiran Jaikiran Pai (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: