1 Reply Latest reply on Apr 19, 2006 4:38 PM by chijb

    Persistent classes in second ejb module are not bound.

    chijb

      The case is that myApp uses 2 ejb modules and 1 web module.

      Here is what i did:

      //application.xml

       <application>
       <display-name>myAppEAR</display-name>
       <description>my Application</description>
       <module>
       <web>
       <web-uri>myApp.war</web-uri>
       <context-root>myApp</context-root>
       </web>
       </module>
       <module>
       <ejb>myApp-server.jar</ejb>
       </module>
       <module>
       <ejb>core-server.jar</ejb>
       </module>
      </application>
      


      //both of server jar files have the same structure , different content, looks ok.
      myApp-server.jar/core-server.jar
      myApp/core
      META-INF //ejb-jar.xml and jboss.xml with the correct contents
      hibernate.cfg.xml //same s , different s, see the followings :


      //hibernate.cfg.mxl in myApp-server.jar
      <hibernate-configuration>
      ...
       <mapping resource="myApp/vo/MyClass1.hbm.xml"/>
       <mapping resource="myApp/vo/MyClass2.hbm.xml"/>
      ...
      

      //hibernate.cfg.xml in core-server.jar
      <hibernate-configuration>
      ...
       <mapping resource="core/vo/CoreClass1.hbm.xml"/>
      <mapping resource="core/vo/CoreClass2.hbm.xml"/>
      ...
      

      However on the server startup i didn't see something like : Mapping resource: core/vo/CoreClass1.hbm.xml... It might be the reason for "no persistent classes found for query class: from core.vo.CoreClass1..... when calling/query on it.

      i looked into log, the ejbs in core-server.jar are deployed , however the persistent classes in core-server.jar are not bound since nothing showing up like : Mapping resource: core/vo/CoreClass1.hbm.xml,Mapping class: core.vo.CoreClass1 -> ....

      //server log
      ....
      11:01:38,537 INFO [EjbModule] Deploying myApp/ReservationServiceEjb
      11:01:38,928 INFO [EjbModule] Deploying core/CalendarServiceEjb
      ...
      11:02:11,334 INFO [Configuration] Mapping resource: myApp/vo/MyClass1.hbm.xml
      11:02:11,397 INFO [Binder] Mapping class: myApp.vo.MyClass1 -> test_table1
      ...
      i didn't see anything related to core like : Mapping resource: core/vo/CoreClass1.hbm.xml,

      So, first, i'd like to figure out what could cause the persistent classes are not mapped/bound, e.g. Mapping resource ..., Mapping class ... are not invoked. am i missing some configs here?

      Thanks.