1 Reply Latest reply on Jun 22, 2011 2:53 PM by shelly.mcgowan

    Upgrating Hibernate in JBoss 6.0 Final

    mechtatel

      Hi,

       

      I'm trying to upgrade to Hibenrate 3.6.3 (with Hibernate search 3.4) two WAR applications with Seam 2.2.2 on Jboss 6.0 final. This upgrade is needed because there will be third WAR developed with Seam 3 and will be sharing functionality on Hibernate search and Leucen indexed entities.

       

      There are some attempts on the WEB but only few successfully on JBoss 5.1.

       

      The main point to accomplish this upgrade remains on Isolation (because JBoss 6.0 Final integrate Hibernate in common/lib).

       

      My first try was configuring jboss-web.xml to achieve proper classloading, but no matter what I try I can't accomplish the desired classloading (I used this article http://community.jboss.org/wiki/ClassLoadingConfiguration).

       

      So I moved to jboss-classloading.xml and finally  JBoss start well without any cast exception or errors. That proved to me that is possible to have Hibhernate upgrated.

       

      Then I stuck with another problem. When I deployed both  WARs I get NameAlreadyBoundException related to JNDI at TimerServiceDispatcher/local. This is the link for the thread: http://seamframework.org/Community/MultipleStandaloneWAR

       

      Basically I can't deploy both WARs.  There is a JIRA (https://issues.jboss.org/browse/JBSEAM-4803?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel) for this bug  but having in mind that all the resources are concentrated

      on Seam 3 and JBoss AS 7, at least I'd like to see any workaround or patch to resolve this issue.

       

      At this point I decided to try packaging the two WARs to an EAR and see if this way is working out. Since configuring jboss-web.xml didn't help in the past I went again with jboss-classloading.xml. I tried several configurations placing jboss-classloading.xml  in META-INF of the EAR and also jboss-classloading .xml for every WAR in WAR/WEB-INF whitout success (I used this link for base http://phytodata.wordpress.com/2010/10/21/demystifying-the-jboss5-jboss-classloading-xml-file/) .

       

      There is a very little and confusing documentation about classloading in JBoss, and it seems that every version has differences.

      So I'd like to know how to configure classloding in Jboss 6 final for the next use case:

       

      One EAR having all libraryes in EarContent/lib. Two WARs packaged to the EAR. All modules inside the EAR will use hibenate libraries form EarContent/lib and this libraries will be loaded first resolving CastExceptions related to the Hibernate libraries in JBoss/common/lib.

       

      Any help will be appreciated!