Exception: Exception in thread "main" java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC' default_cpc_mode at com.sap.mw.jco.JCO.<clinit>(JCO.java:309)
Exception: Exception in thread "main" 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 [C:devcu rrjcosapjcorfc.dll]. Required version "2.1.5 (2005-02-15)". at com.sap.mw.jco.JCO.<clinit>(JCO.java:735)
Exception: Exception in thread "main" 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.0.11 (2005-01-21)" but required version "2.1.5 (2005-02-15)". at com.sap.mw.jco.JCO.<clinit>(JCO.java:735)
Cause: These exceptions typically occur when different versions of sapjcorfc.dll and sapjco.jar have been installed. Anytime the JCo connector is upgraded to a new version, you need to ensure that
Requires Free Membership to View
Resolution: Extract sapjcorfc.dll and sapjco.jar from the original JCo archive. Copy these files to the appropriate locations, overwriting the originally installed versions. Ensure that the PATH statement is updated to reflect the directory location of the DLL files and the Java CLASSPATH points to sapjco.jar.
TROUBLESHOOTING JCO EXCEPTIONS
Home: Introduction
Scenario 1: JCo is unable to find the RFCDSK API library in the system path
Scenario 2: JCo is unable to find the JCORFC library in the system path
Scenario 3: JCo cannot load its RFC middleware layer (3 exceptions)
Scenario 4 JCo finds the wrong version of the librfc library
Scenario 5 JCo exceeds the number of SAP-allocated work processes
Scenario 6 Installing/porting JCo to other operating systems
Review: Conclusion and more resources
This was first published in June 2005

Join the conversationComment
Share
Comments
Results
Contribute to the conversation