cancel
Showing results for 
Search instead for 
Did you mean: 

Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'

Former Member
0 Kudos

Hi,

I have developed an application in Web Module Project and when deployed and the run the application, it is giving the following error :

500 Internal Server Error

SAP J2EE Engine/6.40

Application error occurs during processing the request.

Details: java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'

JCO.nativeInit(): Could not initialize dynamic link library sapjcorfc [Native Library D:\usr\sap\J2E\JC00\j2ee\os_libs\sapjcorfc.dll already loaded in another classloader]. java.library.path [C:\j2sdk1.4.2_09\jre\bin\server;C:\j2sdk1.4.2_09\jre\bin;C:\j2sdk1.4.2_09\bin;D:\usr\sap\J2E\JC00\j2ee\os_libs;c:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\usr\sap\J2E\SCS01\exe;D:\usr\sap\J2E\JC00\exe;D:\usr\sap\J2E\SYS\exe\run]

at com.sap.mw.jco.JCO.<clinit>(JCO.java:733)

at myPackage.HRServlet.doGet(HRServlet.java:22)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:340)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:318)

at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:821)

at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:239)

at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)

at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)

at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162).

After this error, when i restart the j2ee engine the application is working fine. But when I redeploy and run the same application, it is throwing the above error.

Please, let me know how to resolve this issue.

Thanks,

Sri.

Message was edited by: Sriram Ponna

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

This is very old post, closed.

Former Member
0 Kudos

Hi Sriram

This is a problem of the JVM. Its not guaranteed that if your

application uses dlls, they will be correctly realoaded after reboot

That is why it is recommended to use shutdown and restart the whole

virtual mashine.

The general reason for this exception

is that if dll-s and any native libraries are once loaded you cannot

load them again until the java virtual machine is restarted, meaning

that if you do start and stop of an application, or start and stop

of a dbpool and the application or the pool use native libraries

you get this exception. Another thing that might cause this exception

is having the jco.jar in your application ear and at the same time

having a reference from your application to jco in reference.txt

Please, check if some of the above cases describe the situation.

Reward with points if it solves your problem

0 Kudos

hi, we met the same problems also, any experts to answer it.