Discussion:
Using Hibernate 3.6 with Jonas 5.1
Thomas Walraet
2011-09-20 15:18:43 UTC
Permalink
Hi

I'm using Hibernate 3.6 on my webapp. Hibernate jars are bundled in the
WAR archive.

The app works when deployed on Tomcat, but failed if I use Jonas.

If I log the Hibernate version using
org.hibernate.Version.getVersionString(), I got those results :
Tomcat 6 : 3.6.3.Final
Jonas 5.1.5 : 3.3.2.GA

Obviously, Hibernate 3.3 is bundled with Jonas 5.1

Is there a way to use a more recent version of Hibernate ?


Regards,
--
Thomas Walraet - Knowmore
***@knowmore.fr - 01 46 72 27 03
Guillaume Sauthier (OW2)
2011-09-20 15:38:03 UTC
Permalink
You can filter some packages exported by JOnAS using the
filtering-default-classloader.xml file in your conf/ folder.
Simply adapt the package patterns list until you have something working.

--G
Hi
I'm using Hibernate 3.6 on my webapp. Hibernate jars are bundled in the WAR
archive.
The app works when deployed on Tomcat, but failed if I use Jonas.
If I log the Hibernate version using org.hibernate.Version.**getVersionString(),
Tomcat 6 : 3.6.3.Final
Jonas 5.1.5 : 3.3.2.GA
Obviously, Hibernate 3.3 is bundled with Jonas 5.1
Is there a way to use a more recent version of Hibernate ?
Regards,
--
Thomas Walraet - Knowmore
Thomas Walraet
2011-09-21 12:29:35 UTC
Permalink
Post by Guillaume Sauthier (OW2)
You can filter some packages exported by JOnAS using the
filtering-default-classloader.xml file in your conf/ folder.
Simply adapt the package patterns list until you have something working.
It works. Thanks.

If somebody have the same problem, following filters exclude all classes
from Hibernate and its dependencies :
<filter-name>org.hibernate.*</filter-name>
<filter-name>antlr.*</filter-name>
<filter-name>com.mchange.*</filter-name>
<filter-name>org.dom4j.*</filter-name>
<filter-name>javax.persistence.*</filter-name>
<filter-name>javassist.*</filter-name>
<filter-name>javax.transaction.*</filter-name>
<filter-name>org.slf4j.*</filter-name>


To avoid server-wide configuration, I've tried to change the
java2-delegation-model using |WEB-INF/jonas-web.xml| file. Surprisingly
it doesn't work : org.hibernate.Version indicate that Hibernate 3.6 is
used, but I still have weird bugs as if Hibernate 3.3 was used.

Using filtering-default-classloader.xml do the trick. Thanks again for
the tip.
--
Thomas Walraet - Knowmore
S. Ali Tokmen
2011-09-21 19:40:12 UTC
Permalink
Hi Thomas

To avoid server-wide configuration, you can also place the XML file in
the deployable, |META-INF/classloader-filtering.xml|
(|WEB-INF/classloader-filtering.xml| for a web application).

Read more on:
http://jonas.ow2.org/JONAS_5_2_0/doc/doc-en/html/j2eeprogrammerguide.html#id1093872

Cheers

S. Ali Tokmen
http://ali.tokmen.com/

GSM (ch): +41 79 207 29 22 [Swisscom]
GSM (fr): +33 66 43 00 555 [Orange]
GSM (tr): +90 555 266 52 73 [Avea]

My AIM, ICQ, MSN Messenger and Yahoo IM
contact details are on http://contact.ali.tokmen.com
Post by Thomas Walraet
Post by Guillaume Sauthier (OW2)
You can filter some packages exported by JOnAS using the
filtering-default-classloader.xml file in your conf/ folder.
Simply adapt the package patterns list until you have something working.
It works. Thanks.
If somebody have the same problem, following filters exclude all
<filter-name>org.hibernate.*</filter-name>
<filter-name>antlr.*</filter-name>
<filter-name>com.mchange.*</filter-name>
<filter-name>org.dom4j.*</filter-name>
<filter-name>javax.persistence.*</filter-name>
<filter-name>javassist.*</filter-name>
<filter-name>javax.transaction.*</filter-name>
<filter-name>org.slf4j.*</filter-name>
To avoid server-wide configuration, I've tried to change the
java2-delegation-model using |WEB-INF/jonas-web.xml| file.
Surprisingly it doesn't work : org.hibernate.Version indicate that
Hibernate 3.6 is used, but I still have weird bugs as if Hibernate 3.3
was used.
Using filtering-default-classloader.xml do the trick. Thanks again for
the tip.
--
Thomas Walraet - Knowmore
Loading...