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