Here is a nice conflict between Oracle products. I installed “Oracle Database 10g Express Edition” along with “Oracle Containers 4 Java” as the application server to run my J2EE app on. I installed the database engine first and then configured OC4J. OC4J needs an environment variable called ORACLE_HOME in order to run. This needs to point to the folder where you unzipped it. Everything worked just fine at this stage .
However, then I rebooted my machine and noticed that the database engine did not start up. I figured out that this is because of the ORACLE_HOME environment variable. At startup the database engine checks if this variable exist and uses this folder as its home directory. I removed the environment variable and the database engine started just fine. Interestingly enough, OC4J doesn’t start without it.
So, I had to create this environment variable “on-the-fly” whithin OC4J’s startup script.