Get started Bring yourself up to speed with our introductory content.

Scenario 3: JCo cannot load its RFC middleware layer

Misleading or even indecipherable exception messages seem to be the rule of the day when it comes to debugging JCo connector installation exceptions. This checklist by veteran Java expert Austin Sincock sets the record straight on a number of bewildering and headache-inducing exceptions.

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. (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 all three libraries are updated (librfc32.dll, sapjcorfc.dll, and sapjco.jar). If any are left at the older version, one of the above exceptions is likely to occur.

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

This was last published in June 2005

Dig Deeper on SAP application integration

PRO+

Content

Find more PRO+ content and other member only offers, here.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchManufacturingERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchFinancialApplications

Close