Tuesday, July 24, 2007

OC4J Fails to come up after restart - Win 2005

Problem:
OC4J succeeds only when installed first time, but fails with the following error message in opmn.log after a restart.

Stack trace:

-------- Start process--------
Error initializing server: Unable to initialize transport managers: java.net.UnknownHostException: localhost: localhost
OC4J startup failed
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invokeDelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at oracle.classloader.util.MainClass.invoke(MainClass.java:94)
at oracle.oc4j.loader.boot.BootStrap.main(BootStrap.java:30)

Caused by: java.lang.NullPointerException
at oracle.oc4j.admin.management.mbeans.J2EEServer.notifyServerReady(J2EEServer.java:1864)
at com.evermind.server.ApplicationServer.launchCommandline(ApplicationServer.java:654)
at com.evermind.server.OC4JServer.launchOC4JCommandline(OC4JServer.java:202)
at com.evermind.server.OC4JServer.main(OC4JServer.java:399) ... 6 more


Resolution:
OC4J's javaw.exe is looking for the following dlls under"C:/Documents and Settings/${user}/Windows/System32" directory instead of"C:/Windows/System32" directory.


Copy the following from C:/Windows/System32 to the above user specific directory to fix this issue.

- mswsock.dll
- winrnr.dll
- wshtcpip.dll

OC4J Fails to Deploy Applications on Windows 2005 Server

Application deployment console(em) spins its wheel but fails to complete deployment.

Resolution:
This happens because of missing temp directory.
Check ias-instance/environment/variable@value in opmn/conf/opmn.xml for id="TMP".
If this directory does not exist on the server, then the console fails to complete,but does not error out while deploying an application.

A more descriptive message can be seen while deploying from command line.