-
1. Re: Seam 2.2.0.CR1 and Hibernate and Ear deployment.
tony.herstell1 Jul 11, 2009 9:49 AM (in response to tony.herstell1) -
2. Re: Seam 2.2.0.CR1 and Hibernate and Ear deployment.
cjalmeida Jul 11, 2009 9:49 AM (in response to tony.herstell1)The hibernate jars are used by JBoss in order to do ejb3 deployment. If you can afford, it's better to replace jboss/server/config/lib/[hibernate*.jar,ejb3-persistence.jar] with the ones in your project's lib.
I always got burned when puting hibernate's jar inside the EAR.
-
3. Re: Seam 2.2.0.CR1 and Hibernate and Ear deployment.
tony.herstell1 Jul 12, 2009 7:05 AM (in response to tony.herstell1)Welcome to red belt java.
http://www.jboss.org/community/wiki/jbossclassloadingusecases
Now all I got to do is really understand it!
-
4. Re: Seam 2.2.0.CR1 and Hibernate and Ear deployment.
tony.herstell1 Jul 14, 2009 1:34 AM (in response to tony.herstell1)Still trying to figure this out...
-
5. Re: Seam 2.2.0.CR1 and Hibernate and Ear deployment.
swd847 Jul 14, 2009 1:47 AM (in response to tony.herstell1)I package my hibernate jars and all dependencies (slfj,javassist etc) inside the ear. According to the console output the correct hibernate version gets used. You need to make sure you are using isolated classloading:
<jboss-app> <loader-repository> seam.jboss.org:loader=@PROJECTNAME@.ear <loader-repository-config> java2ParentDelegation=false </loader-repository-config> </loader-repository> </jboss-app>
-
6. Re: Seam 2.2.0.CR1 and Hibernate and Ear deployment.
tony.herstell1 Jul 14, 2009 1:56 AM (in response to tony.herstell1)Cheers,
And er... which of the hibernate files are now required?
It PROBABLY used to be hibernateall but now it's a whole myriad of them.
Worringly IDE seems not to care to much if they are there! -
7. Re: Seam 2.2.0.CR1 and Hibernate and Ear deployment.
swd847 Jul 14, 2009 2:06 AM (in response to tony.herstell1)For the actual build process you can probably get by with your old hibernate jar, as long as you don't use any API's that have changed. I just bendle all of them
<module> <java>javassist.jar</java> </module> <module> <java>hibernate-annotations.jar</java> </module> <module> <java>hibernate-commons-annotations.jar</java> </module> <module> <java>hibernate-validator.jar</java> </module> <module> <java>hibernate3.jar</java> </module> <module> <java>hibernate-entitymanager.jar</java> </module> <module> <java>slf4j-api-1.5.2.jar</java> </module> <module> <java>slf4j-log4j12-1.5.2.jar</java> </module>
-
8. Re: Seam 2.2.0.CR1 and Hibernate and Ear deployment.
tony.herstell1 Jul 14, 2009 2:11 AM (in response to tony.herstell1)Thanks Stuart:
In the lib area of the seam download there used to be a hibernate.jar
This is no longer present in 2.2.0.CR1.
I now see various hiberante jars. (core, entitymanager, validator etc.).
-
9. Re: Seam 2.2.0.CR1 and Hibernate and Ear deployment.
tony.herstell1 Jul 14, 2009 2:13 AM (in response to tony.herstell1)Also I don't have any kind of build process.
Use MyEclipse and exploded deployment to develop in (really really fast!).
So if the IDE cant figure it out... then there cant be a dependence to my code (humm..) -
10. Re: Seam 2.2.0.CR1 and Hibernate and Ear deployment.
tony.herstell1 Jul 14, 2009 2:15 AM (in response to tony.herstell1)<?xml version="1.0" encoding="UTF-8"?> <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" version="5"> <display-name>SEC</display-name> <module> <web> <web-uri>SecWeb.war</web-uri> <context-root>/site</context-root> </web> </module> <module> <ejb>SecEJB.jar</ejb> </module> <module> <ejb>jboss-seam.jar</ejb> </module> <module> <java>jboss-el.jar</java> </module> <module> <java>richfaces-api-3.3.2-20090526.040422-5.jar</java> </module> </application>
-
11. Re: Seam 2.2.0.CR1 and Hibernate and Ear deployment.
swd847 Jul 14, 2009 2:31 AM (in response to tony.herstell1)Myeclipse would have hibernate somewhere on it's build classpath. As long as you are not using's hibernate API's that change between versions it is possible to build against one version and deploy against another (although if you do use a changed API you will get class loading errors, so it is not the best idea).
At deployment time AFAIK you need the new hibernate, so you have three options:
1) Upgrade to a newer jboss that comes with a newer hibernate
2) upgrade the hibernate libs in your current jboss
3) bundle hibernate in your ear. -
12. Re: Seam 2.2.0.CR1 and Hibernate and Ear deployment.
tony.herstell1 Jul 14, 2009 3:29 AM (in response to tony.herstell1)Hi Stuart,
Thanks for support.
Will go option 3 but not sure what Libs I need from the hibernate bunch (just will have to experiment to find out... as no info in new Seam release notes (other than to say the version of hibernate changed)).
So will the take hib jar out of Jar project and put in Ear Project, add others, and alter application.xml (as above).
Will do a little research on MyEclipse and see how to override (ignore) their default ones.
Will have to add this (below) somewhere (I hope its also in projects application.xml) as apposed to the server.xml as then I can make change as apposed to all the team having to update their obscure machines (Mac, PAC, Linux etc.)!
<jboss-app> <loader-repository> seam.jboss.org:loader=@PROJECTNAME@.ear <loader-repository-config> java2ParentDelegation=false </loader-repository-config> </loader-repository> </jboss-app>
Then will see what effects it has.
Cheers.