Monday, September 10, 2007

Oracle Rule Author on Stand-Alone OC4J 10.1.3.x

For quite a while I could not use Rule Author anymore on my stand-alone OC4J, the reason being that I was not able to connect because of the error '[code=CANT_CONNECT_LOOPBACK] Cannot connect due to potential loopback problems'. I thought, as the loopback problems are only potential, why not give it a try and see how far we get. But my computer thought differently and refused to cooperate.

So I Googled this error, found quite a few links, none of them useful to resolve my issue. As issues like this can easily take a lot of time, and as I had the SOA Suite with Rule Author already running in a virtual machine, I decided to leave it as it was and used that instead. That was, until my virtual machines started to freeze every now and then, especially in the middle of the heat. You can run, but you cannot hide, can you?

For some stupid reason it never occurred to me to search for the loopback problem on OTN, probably because I never associated this error message with Oracle Software. As such that assumption appeared to be correct, but a colleague of mine did nevertheless and found this topic on one of the forums. Boy, how silly I found myself to learn that it was related to the proxy exception list of my web browser! I must have checked that at some stage, but probably at the wrong moment. Arrgggh!

Anyway, as I now can connect again to my stand-alone OC4J again, I thought it would be nice to be able to avoid crashing virtual machines and all that. So I redeployed Rule Author like I was used to, that is using the ruleauthor.ear and rulehelp.ear files from my SOA Suite installation, only to discover that this did not work at all. Right. So, being a clever guy I searched OTN to see how to deploy Rule Author on a stand-alone OC4J, only to find ... nothing! But no panic, Google is still in the air, helping me to a topic that offered me the missing pieces on the IT-eye blog.

Difference with my situation is that I didn't want to install it on the embedded OC4J that comes with JDeveloper, as I want to be able to upgrade JDeveloper without needing to redeploy Rule Author again. So the following instructions are somewhat different to those of the IT-eye version:

  • ruleauthor_s.ear and rulehelp_s.ear
  • rl.jar, rulesdk.jar, webdavrc.jar, jr_dav.jar
The ruleauthor_s.ear and rulehelp_s.ear I got from the /rules folder of the SOA Companion CD 2, the jar files can be found in the [JDEV_HOME]/integration/lib folder of that same CD.

Steps to deploy (all paths relative to /j2ee/home):
  1. Using the Application Server Control, (re)deploy both the Rule Author and the help file with that.
  2. Create a /rules/lib folder and copy the jar files to that
  3. Configure a rules library in the /config/server.xml file of your OC4J instance, by adding the following code snippet to the shared libraries already configured:
    <shared-library name="oracle.rules" version="10.0" 
    <code-source path="../rules/lib/"/>
    <import-shared-library name="oracle.http.client"/>
    <import-shared-library name="oracle.xml"/>
  4. Add the oracle.rules library just created to the default set of shared libraries available, by adding the following line to the /config/system-application.xml file:
    <imported-shared-library name="oracle.rules">
  5. (Re)start your OC4J instance
Rule Author should now be up and running!

By the way did I already told you that I was able to fix the problem with my virtual machines by upgrading to the latest Workstation 5 version? No? OK, I was able to fix the problem with my virtual machines by upgrading to the latest Workstation 5 version. I hope.