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. Found version "2.1.6 (2005-06-20)" but required version "2.1.8 (2006-12-11)".

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Coderanch by Ethiraj Palchuru, 1 year ago
JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC' JCO.nativeInit(): Could not initialize dynamic link library sapjcorfc. Found version "2.1.6 (2005-06-20)" but required version "2.1.8 (2006-12-11)".
via Google Groups by Andy K, 1 month ago
JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC' access denied (java.lang.RuntimePermission loadLibrary.sapjcorfc)
via Oracle Community by Rbaig-Oracle, 1 year ago
JCO.classInitialize(): Could not load mid dleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC' no sapjcorfc in java.library.path
via Oracle Community by Pamato-Oracle, 1 year ago
JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC' JCO.nativeInit(): Could not initialize dynamic link library sapjcorfc [export/home/oracle/midtier/jdk/jre/lib/i386/libsapjcorfc.so: /export/home/oracle/midtier
via Oracle Community by 17928, 1 year ago
JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC' JCO.nativeInit(): Could not initialize dynamic link library sapjcorfc [Native Library /opt/jco/lib/libsapjcorfc.so already loaded in another classloader
via Oracle Community by tmrabet - oracle, 11 months ago
JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC' JCO.nativeInit(): Could not initialize dynamic link library sapjcorfc [apps/oracle/products/10g/as/portal/lib/libsapjcorfc.sl: specified file is not a shared
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. Found version "2.1.6 (2005-06-20)" but required version "2.1.8 (2006-12-11)".
at com.sap.mw.jco.JCO.(JCO.java:776)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
at com.ibm.sap.bapi.jco.JCOUtil$Client.init(JCOUtil.java:420)
at com.ibm.sap.bapi.jco.JCOUtil$Client.(JCOUtil.java:250)
at com.ibm.sap.bapi.jco.RfcConnectionFactory.createConnection(RfcConnectionFactory.java:70)
at com.ibm.connector2.sap.SAPManagedConnection.(SAPManagedConnection.java:107)
at com.ibm.connector2.sap.SAPManagedConnectionFactory.createManagedConnection(SAPManagedConnectionFactory.java:233)
at com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1751)
at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1518)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2141)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:846)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:585)
at com.ibm.connector2.sap.SAPConnectionFactory.getConnection(SAPConnectionFactory.java:227)
at saer.com.sapconnector.GenSapConnection.execute(GenSapConnection.java)
at saer.servlet.SaerLogon.performTask(SaerLogon.java)
at saer.servlet.SaerLogon.doPost(SaerLogon.java:81)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.