Five Stars

java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path

Hi,

 

I was using tSAPConnection component in Talend DI studio 5.4 but recently I have upgraded DI studio to 6.2 and I am getting error as "java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path" while using tSAPConnection even though I have install the sapjco3.jar in Modules. Also, I see  tSAPOutput and tSAPInput are no longer available.

 

Please advise....

 

 

Regards,

Chandam

1 ACCEPTED SOLUTION

Accepted Solutions
Five Stars

Re: java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path

For Windows add sapjco3.dll  in C:\Windows\System32

 

For Linux add libsapjco3.so and sapjco3.jar under java.library.path

steps:  edit .bashrc or profile file add:

 export LD_LIBRARY_PATH=/dir/dir/lib files

export CLASSPATH=/dir/dir/sapjco3.jar

 

export LD_LIBRARY_PATH

export CLASSPATH

 

Restart the jobServer.......

 

 

 

5 REPLIES
Five Stars

Re: java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path

Also, I see message in Component tab as: 

The selected SAP JCO version does not allow you to share this SAP connection with tSAPBAPI and tSAPTableInput.

 

I am using sapjco3.jar. Please let me know which version I need to use for tSAPConnection component for Talend DI 6.2.1

 

 

Thanks

Five Stars

Re: java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path

For Windows add sapjco3.dll  in C:\Windows\System32

 

For Linux add libsapjco3.so and sapjco3.jar under java.library.path

steps:  edit .bashrc or profile file add:

 export LD_LIBRARY_PATH=/dir/dir/lib files

export CLASSPATH=/dir/dir/sapjco3.jar

 

export LD_LIBRARY_PATH

export CLASSPATH

 

Restart the jobServer.......

 

 

 

Moderator

Re: java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path

Hello,

Here are online documents about:TalendHelpCenter:Installing the SAP Java Connector on Windows 7 64-bit and TalendHelpCenter:Installing the SAP Java Connector on Red Hat 64-bit.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star dc
One Star

Re: java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path

I am not able to get this to work - I tried on Mac and Linux.

Here are my settings for Mac:

 

$ java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

TOS installed in /home/dc/Downloads/TOS_DI-20170623_1246-V6.4.1

MacOS 64-bit sapjco3 installed in /home/dc/Downloads/TOS_DI-20170623_1246-V6.4.1/lib/java

(I also tried in .TOS[...]/lib [without java subdir...], no difference)

 

$ ll lib/java
total 12336
-rw-r--r--@ 1 derek  staff  4830232 17 Jul 22:17 libsapjco3.jnilib <= this is the Mac equivalent of .so in linux
-rw-r--r--@ 1 derek  staff  1480268 17 Jul 22:17 sapjco3.jar

Test JCo - it should print:

$ java -jar sapjco3.jar -stdout
--------------------------------------------------------------------------------------
|                                 SAP Java Connector                                 |
|                Copyright (c) 2000-2017 SAP SE. All rights reserved.                |
|                                Version Information                                 |
--------------------------------------------------------------------------------------
Java Runtime:
 Operating System:       Mac OS X 10.10.5 for x86_64
 Java VM:                1.8.0_121 Oracle Corporation
 Default charset:        UTF-8
Versions:
 JCo API:                3.0.17 (2017-07-17)
 JCo middleware:         JavaRfc 2.2.20
 JCo library:            721.913
Library Paths:
 Path to JCo archive:    /Users/dc/Downloads/TOS_DI-20170623_1246-V6.4.1/lib/java/sapjco3.jar
 Path to JCo library:    /Users/dc/Downloads/TOS_DI-20170623_1246-V6.4.1/lib/java/libsapjco3.jnilib
--------------------------------------------------------------------------------------
|                                      Manifest                                      |
--------------------------------------------------------------------------------------
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.4
Implementation-Title: com.sap.conn.jco
Implementation-Version: 20170717 2117 [3.0.17 (2017-07-17)]
Specification-Vendor: SAP SE, Walldorf
Specification-Title: SAP Java Connector v3
Implementation-Vendor-Id: com.sap
Created-By: 20.65-b04-462 (Apple Inc.)
Specification-Version: 3.0.17
Implementation-Vendor: SAP SE, Walldorf
Main-Class: com.sap.conn.jco.rt.About

Name: com/sap/tc/logging/Version.class
SHA-256-Digest: GunSJkXli9aWX2ZZc72PopCj2t2FMP8XPOH9AJQgbn8=

Name: com/sap/conn/jco/util/Jarm.class
SHA-256-Digest: JogYdty/7GS3rnH9A8jN+G1Ef/KmPP7gZFyh4Btv8Ag=
... [snip remaining log] ...

In TOS I pointed the Module for sapjco3.jar to the location above.

A simple Job with tSAPConnection fails:

Starting job saptest at 15:11 16/11/2017.

[statistics] connecting to socket on port 3465
[statistics] connected
java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
	at java.lang.Runtime.loadLibrary0(Runtime.java:870)
	at java.lang.System.loadLibrary(System.java:1122)
	at com.sap.conn.jco.rt.DefaultJCoRuntime.loadJCoLibrary(DefaultJCoRuntime.java:875)
	at com.sap.conn.jco.rt.DefaultJCoRuntime.registerNativeMethods(DefaultJCoRuntime.java:444)
	at com.sap.conn.jco.rt.JCoRuntime.registerNatives(JCoRuntime.java:1386)
	at com.sap.conn.rfc.driver.CpicDriver.<clinit>(CpicDriver.java:867)
	at com.sap.conn.rfc.engine.DefaultRfcRuntime.getVersion(DefaultRfcRuntime.java:36)
	at com.sap.conn.rfc.api.RfcApi.RfcGetVersion(RfcApi.java:236)
	at com.sap.conn.jco.rt.MiddlewareJavaRfc.<clinit>(MiddlewareJavaRfc.java:214)
	at com.sap.conn.jco.rt.DefaultJCoRuntime.initialize(DefaultJCoRuntime.java:99)
	at com.sap.conn.jco.rt.JCoRuntimeFactory.<clinit>(JCoRuntimeFactory.java:23)
	at com.sap.conn.jco.rt.RuntimeEnvironment.<init>(RuntimeEnvironment.java:43)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[statistics] disconnected
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at java.lang.Class.newInstance(Class.java:442)
	at com.sap.conn.jco.ext.Environment.getInstance(Environment.java:155)
	at com.sap.conn.jco.ext.Environment.registerDestinationDataProvider(Environment.java:260)
	at org.talend.sap.impl.AbstractSAPFactory.<clinit>(AbstractSAPFactory.java:43)
	at test_project.saptest_0_1.saptest.tSAPConnection_1Process(saptest.java:369)
	at test_project.saptest_0_1.saptest.runJobInTOS(saptest.java:632)
	at test_project.saptest_0_1.saptest.main(saptest.java:481)
Exception in thread "main" java.lang.ExceptionInInitializerError: JCo initialization failed with java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path
	at com.sap.conn.jco.rt.MiddlewareJavaRfc.<clinit>(MiddlewareJavaRfc.java:226)
	at com.sap.conn.jco.rt.DefaultJCoRuntime.initialize(DefaultJCoRuntime.java:99)
	at com.sap.conn.jco.rt.JCoRuntimeFactory.<clinit>(JCoRuntimeFactory.java:23)
	at com.sap.conn.jco.rt.RuntimeEnvironment.<init>(RuntimeEnvironment.java:43)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at java.lang.Class.newInstance(Class.java:442)
	at com.sap.conn.jco.ext.Environment.getInstance(Environment.java:155)
	at com.sap.conn.jco.ext.Environment.registerDestinationDataProvider(Environment.java:260)
	at org.talend.sap.impl.AbstractSAPFactory.<clinit>(AbstractSAPFactory.java:43)
	at test_project.saptest_0_1.saptest.tSAPConnection_1Process(saptest.java:369)
	at test_project.saptest_0_1.saptest.runJobInTOS(saptest.java:632)
	at test_project.saptest_0_1.saptest.main(saptest.java:481)
Job saptest ended at 15:11 16/11/2017. [exit code=1]
One Star dc
One Star

Re: java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path

Finally, I found this post that gave me a solution: 

 

Adding these lines to .bashrc worked for me:

 

export DYLD_LIBRARY_PATH=/Users/dc/Downloads/TOS_DI-20170623_1246-V6.4.1/lib/java
export CLASSPATH=/Users/dc/Downloads/TOS_DI-20170623_1246-V6.4.1/lib/java/sapjco3.jar

I hope that helps someone... :/