Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I have the jar and dll in the Talend lib directory. The path and classpath are set. I also have downloaded and installed the VC++ 2005 redistribution sp 1 patch and the missing dlls that are supplied by SAP. I have tried to run this ETL job on a windows 2003 machine and on a XP machine with the same result. Can anyone help me out here.

Starting job Chargebacks at 13:57 03/10/2014.

[statistics] connecting to socket on port 3350
[statistics] connected
java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at com.sap.conn.jco.rt.DefaultJCoRuntime.loadLibrary(DefaultJCoRuntime.java:441)
    at com.sap.conn.jco.rt.DefaultJCoRuntime.registerNativeMethods(DefaultJCoRuntime.java:307)
    at com.sap.conn.jco.rt.JCoRuntime.registerNatives(JCoRuntime.java:969)
    at com.sap.conn.rfc.driver.CpicDriver.<clinit>(CpicDriver.java:955)
    at com.sap.conn.rfc.engine.DefaultRfcRuntime.getVersion(DefaultRfcRuntime.java:43)
    at com.sap.conn.rfc.api.RfcApi.RfcGetVersion(RfcApi.java:261)
    at com.sap.conn.jco.rt.MiddlewareJavaRfc.<clinit>(MiddlewareJavaRfc.java:200)
    at com.sap.conn.jco.rt.DefaultJCoRuntime.initialize(DefaultJCoRuntime.java:73)
    at com.sap.conn.jco.rt.JCoRuntimeFactory.<clinit>(JCoRuntimeFactory.java:23)
    at com.sap.conn.jco.rt.RuntimeEnvironment.<init>(RuntimeEnvironment.java:40)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at com.sap.conn.jco.ext.Environment.getInstance(Environment.java:121)
    at com.sap.conn.jco.ext.Environment.registerDestinationDataProvider(Environment.java:216)
    at jdi.chargebacks_0_1.Chargebacks.tSAPConnection_1Process(Chargebacks.java:361)
    at jdi.chargebacks_0_1.Chargebacks.runJobInTOS(Chargebacks.java:3718)
    at jdi.chargebacks_0_1.Chargebacks.main(Chargebacks.java:3577)
Exception in thread "main" java.lang.ExceptionInInitializerError: Error getting the version of the native layer: java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path
    at com.sap.conn.jco.rt.MiddlewareJavaRfc.<clinit>(MiddlewareJavaRfc.java:212)
    at com.sap.conn.jco.rt.DefaultJCoRuntime.initialize(DefaultJCoRuntime.java:73)
    at com.sap.conn.jco.rt.JCoRuntimeFactory.<clinit>(JCoRuntimeFactory.java:23)
    at com.sap.conn.jco.rt.RuntimeEnvironment.<init>(RuntimeEnvironment.java:40)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at com.sap.conn.jco.ext.Environment.getInstance(Environment.java:121)
    at com.sap.conn.jco.ext.Environment.registerDestinationDataProvider(Environment.java:216)
[statistics] disconnected
    at jdi.chargebacks_0_1.Chargebacks.tSAPConnection_1Process(Chargebacks.java:361)
    at jdi.chargebacks_0_1.Chargebacks.runJobInTOS(Chargebacks.java:3718)
    at jdi.chargebacks_0_1.Chargebacks.main(Chargebacks.java:3577)
Job Chargebacks ended at 13:57 03/10/2014. [exit code=1]
like image 472
user1082748 Avatar asked Sep 30 '22 17:09

user1082748


1 Answers

First make sure you have the .jar file in \lib\java\ If you're on windows, you should place the dll and the sapjco3.jar to PATH If you're on linux, you need to place the .so files into your path.

  • copy sapjco3.jar into talend lib/java folder and make sure that sapjco3.dll is in the %PATH% (quick and dirty place it in windows\system32\ )
  • test it by double clicking sapjco3.jar it should show information about the location of the jar and the location of the dll

Common problems with Talend OS and sapjco3: You need 32bit version if you're running a 32bit JAVA. 64bit version if you have 64bit java.

like image 114
Balazs Gunics Avatar answered Oct 07 '22 21:10

Balazs Gunics