4 Replies Latest reply on Jun 29, 2005 12:34 PM by darranl

    How to integrate a sar of Hibernate in a JBoss EAR

    moghrabi

      Hello,

      I try to use Hibernate deployed as a SAR in a JBoss application (EAR).

      So all the libraries needed have been put into the $JBoss_home/server/all/lib. I build the Sar and the Jar. The 2 archives are correct because I can use them well when they are not deployed in the same EAR.

      When I try to pack them in a EAR, it doesn't work well. I got the following ERROR :

      17:06:26,250 ERROR [STDERR] javax.naming.NameNotFoundException: hibernate not bound

      In fact my hibernate SAR is not deployed. I don't understand why.

      Here is the composition of my EAR :

      Hibernate.ear :
      /Hibernate.jar
      /hibernate.sar
      /META-INF/application.xml
      /META-INF/jboss-app.xml
      /META-INF/Manifest.mf

      Here is my file application.xml :

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
       "http://java.sun.com/dtd/application_1_3.dtd">
      <application>
       <display-name>Hibernate</display-name>
       <module>
       <ejb>Hibernate.jar</ejb>
       </module>
      </application>
      


      Here's my jboss-app.xml :

      <?xml version="1.0"?>
      <jboss-app>
       <loader-repository>hibernate:loader=Hibernate.ear</loader-repository>
      
       <module>
       <service>hibernate.sar</service>
       </module>
      
      </jboss-app>
      


      Does someone look at something wrong ?

      -----------------------
      Xavier MOGHRABI
      http://www.enstimac.fr/~moghrabi/