OC4J Seam Archetype Update
Thursday, October 25, 2007 |Well, that wasn’t hard. I think I have the redeploy issue fixed, and a shared library was the trick.
It appeared that the redeployment issue was due to some odd class loading issue, so I decided to try a shared library. To do that, I create the directory in j2ee/home/shared-lib/hibernate/3.2
and put these jars there:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
antlr-2.7.6.jar
asm-1.5.3.jar
asm-attrs-1.5.3.jar
cglib-2.1_3.jar
commons-collections-3.2.jar
commons-logging-1.1.jar
dom4j-1.6.1-jboss.jar
hibernate-3.2.4.sp1.jar
hibernate-annotations-3.3.0.ga.jar
hibernate-commons-annotations-3.0.0.ga.jar
hibernate-entitymanager-3.3.1.ga.jar
hsqldb-1.8.0.7.jar
javassist-3.3.ga.jar
jboss-archive-browsing-5.0.0alpha-200607201-119.jar
jta-1.0.1B.jar
log4j-1.2.14.jar
To be candid, I’m not 100% sure that all of these classes belong in a Hibernate library, but it works and I’m afraid to breathe on it. :) To describe the shared library to OC4J, I added the following XML to j2ee/home/config/server.xml
:
1
2
3
<shared-library name="hibernate" version="3.2" library-compatible="true">
<code-source path="../shared-lib/hibernate/3.2/"/>
</shared-library>
And that’s it. I created the project and immediately built and deployed, verified that the application worked, then repeatedly redeployed and tested the app without failure. That’s not to say that the archetype is complete or perfect in any way, but it’s Good Enough for Now. :) Any fixes/enhancements/etc. are, of course, very welcome.