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

Scenario 2: JCo is unable to find the JCORFC library in the system path

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' com/sap/mw/jco/JCO$MetaData$Type1Data at com.sap.mw.jco.JCO. (JCO.java:309)

Cause: This exception occurs when the directory containing sapjcorfc.dll cannot be found in the PATH environment variable. sapjcorfc.dll contains the middleware bridge between Java JCo and the C libraries that comprise SAP's RFCSDK. It must be made available to the JCo application through the system path.

Resolution: Add the directory containing sapjcorfc.dll to the PATH statement i.e. PATH = %PATH%;C:jco. If this directory is not explicitly called out within the PATH statement, JCo will look for the file in the same directory that contains sapjco.jar. However, this method can lead to confusion if the Java application is to be deployed within a Java application server. In that case, the application server would either need to recognize the system PATH statement that includes the sapjcorfc.dll directory or be configured to read the library directly off the file system.


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 last published in June 2005

Dig Deeper on SAP Basis administration and NetWeaver administration

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

SearchERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchHRSoftware

Close