cancel
Showing results for 
Search instead for 
Did you mean: 

Java Connector Could not initialize dynamic link library librfc

Former Member
0 Kudos

Hi, I am a new Java Connector user. I wrote a simple ConnectSetup java class to test my SAP system connection. But I got the following error:..

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 librfc. Found version "640.0.94" but required at least version "640.0.161".

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

        at ConnectSetup .<init>(ConnectSetup .java:11)

        at ConnectSetup .main(ConnectSetup .java:28)

Java Result: 1

How do I update the version of my librfc?

Thanks for the help.

Carlo

Accepted Solutions (0)

Answers (1)

Answers (1)

vijay_kumar49
Active Contributor
0 Kudos

Dear Carlo,

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.

Please go through this link http://scn.sap.com/thread/461279

Hope this help full !!!

Regards

Vijay K