1 Reply Latest reply on Oct 27, 2006 12:50 AM by joeyli

    Can I reference or inheritance between two jar files?

    joeyli Newbie

      I have two EJB3 subsystem:
      Auth system: was packed in auth.jar file
      Order system: was packed in order.jar file

      Now, I have a entity bean that's name is EOlocation, and it was packed in auth.jar:

      @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
      public class EOlocation implements Serializable {
      @JoinColumn(name = "eoaccount_id")
      private EOaccount account;

      Another entity bean is EOorderLocation, it's a subclass for EOlocation, but was packed in order.jar

      public class EOorderLocation extends EOlocation {

      I am deploy the auth.jar before than deploy the order.jar file.
      Than I get the exception like the following:

      15:15:15,897 WARN [ServiceController] Problem starting service persistence.units:unitName=EatOutDS
      org.hibernate.AnnotationException: @OneToOne or @ManyToOne on com.tweatout.auth.domain.EOlocation.account references an unknown entity: com.tweatout.auth.domain.EOaccount
      at org.hibernate.cfg.FkSecondPass.doSecondPas(FkSecondPass.java:40)
      at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(Annotatio
      at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1034
      at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.j
      at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerCo
      at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Co

      How can I implement the reference or inheritance entity bean between two jar files?