cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP JCo initializer error

Andrea_LH
Explorer
0 Likes
3,836

Hi All,

I'm trying to run a function module from Eclipse but I'm getting the following initializer errors:

Execute failed: JCo initialization failed with java.lang.UnsatisfiedLinkError ...KNIME\configuration\org.eclipse.osgi\705\0\.cp\sapjco3.dll: Can't find dependent libraries

Execute failed: Could not initialize class com.sap.conn.jco.rt.JCoRuntimeFactory

I'm using Windows 11, running on Java 17 and I've already installed the Microsoft Visual C++ 2015-2022 Redistributable (x64). I've also tried putting the JAR and the dll in the same directory but it didn't work. 

Any help would be highly appreciated.

View Entire Topic
HAL9000
Product and Topic Expert
Product and Topic Expert

If you have an issue, the first thing to do is always to check if you are using the latest JCo patch level.
Do you use JCo 3.1.10? And do you use SapMachine 17 (64-bit)?

Andrea_LH
Explorer
0 Likes
Thank you for your reply, I'm using JCo 3.1.6 (2022-05-18) and I am using SapMachine 17 (64-bit). Is there any workaround if installing version 3.1.10 is not an option for business reasons?)
HAL9000
Product and Topic Expert
Product and Topic Expert

For "business reasons" it is not an option to install JCo 3.1.10?
Because only the latest JCo standalone patch level is supported by SAP, using an older patch level assures not to be eligible to get support from SAP for your scenario.
Anyway, if you wish to use an older patch level, do so at your own risk, but then you also have to follow the installation instructions of the old version and not the ones for the latest patch level.
JCo 3.1.6 required the Microsoft Visual Studio 2013 C/C++ runtime libraries to be installed on the system, and not the Microsoft Visual Studio 2015-2022 C/C++ runtime libraries. Note that these 2013 libraries are meanwhile out of support by Microsoft and therefore also won't get any security patches anymore.
Not only because of this, using an older JCo version usually implies to accept security risks for your installation.

Andrea_LH
Explorer
0 Likes
By business reasons I mean I do not have access to actually download the latest version but seeing that there is no viable workaround, I'll see what I can do regarding that. I also previously tried using Microsoft Visual Studio 2013 C/C++ runtime libraries and I still got the same errors. Thank you for your support!
HAL9000
Product and Topic Expert
Product and Topic Expert

Well, it's not forbidden to use an older JCo patch level. I only tried to outline the consequences of doing so. I do not recommend it.
But of course, also JCo 3.1.6 worked. The only reason for that error message on Windows
"sapjco3.dll: Can't find dependent libraries"
that I know, is that the VS 2013 C/C++ runtime libs are not installed at all, or the wrong version is installed (x64 vs x86), or maybe also the installed runtime libs are too old.
So, I recommend to double check that once again and reinstall their latest available patch level.
The download link from the JCo 3.1.6 documentation was: Visual C++ 2013 Redistributable Package

Andrea_LH
Explorer
0 Likes
You're right, I just noticed i had the Microsoft Visual C++ 2013 Redistributable (x86) instead of the x64 version, I'll try with the correct one.
Andrea_LH
Explorer
0 Likes
Yes, the problem was indeed that I was using x86 instead of x64, such a silly mistake from me. Thank you so much!
HAL9000
Product and Topic Expert
Product and Topic Expert

Glad to hear that you could get it working.
Possible errors for native library loading issues are also described in the JavaDoc at <JCoSDKDir>/javadoc/configuration.html

Anyhow, I strongly recommend to get the latest JCo patch level 3.1.10 nevertheless.
It's free of charge for SAP customers and partners.