OC4J applib problems

Even though we’re supposed to be getting a bright new JEE container (WebLogic) in app server 11g, we’ll probably be working with OC4J for a while yet.

As you know, all OC4J instances has an applib subdirectory intended for general libaries (JARs) lik XML parsers, Log4J, etc. That means they don’t go in the EAR file (which gets much smaller) and deployment is faster.

This generally works well – except that I suddenly came across a site where it didn’t work. After some troubleshooting, it dawned on me that in some standard installations (BPEL in this case), the normal reference to the applib directory is missing from config/application.xml. This means that the content of the applib directory is simply ignored!

To get applib to work the way it’s supposed to, add the following line next to the other <library path…> tags:
<library path=”../applib”>

Presto!