Wednesday, December 14, 2005

Running Cocoon with Oracle OC4J

After testing AXIS , I quickly moved on to check the latest Cocoon 2.1.8 release. I'd tried getting earlier versions running with OC4J but given up due to the xerces, xalan and jdk certification mix - it was hell. Fortunately Cocoon 2.1.8 worked (almost) perfectly first time with Oracle Application Server Containers for J2EE 10g (10.1.2.0).

After building Cocoon, I simply used a manual installation with the standalone version, which simply required $ORACLE_HOME/j2ee/home/config/application.xml and $ORACLE_HOME/j2ee/home/config/http-web-site.xml to include the Cocoon webapp.

The only "fixup" required - and this is for a non-fatal SAX processing error - is to force Cocoon to use the XML parsers etc that are included in the Cocoon distribution instead of the default (Oracle) parsers included in the OC4J distribution. The fix is to force "search-local-classes-first. To do this edit $ORACLE_HOME/j2ee/home/application-deployments/<your Cocoon deployment path>/orion-web.xml. Uncomment the line:
<web-app-class-loader search-local-classes-first="true" include-war-manifest-class-path="true" />

3 comments:

christophergibson2293 said...

I read over your blog, and i found it inquisitive, you may find My Blog interesting. My blog is just about my day to day life, as a park ranger. So please Click Here To Read My Blog

http://www.juicyfruiter.blogspot.com

buttso said...

Hey paul -- was that success with 10.1.2 or 10.1.3? The use of xerces, xalan, etc. which are all inextricably linked into cocoon is somewhat complex with 10.1.2. With the classloading model in 10.1.3 its a whole lot simpler.

Paul said...

Buttso .. confirmed, 10.1.2.0 (I was using stand-alone OC4J). Version by version its getting easier;) I found 10.1.2 not too bad as long as you aren't scared of the deployment files.