Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
I am trying to connect SAP/R3 in Talend Open Studio 8.0.1.
When I used tSAPConnection component which was specified SAP JCO version "sap jco 3.*", I met following error:
======
Starting job simple_job_SAP at 12:14 15/10/2022.
[statistics] connecting to socket on port 3527
[statistics] connected
Exception in thread "main" java.lang.ExceptionInInitializerError: JCo initialization failed with java.lang.ExceptionInInitializerError: Illegal JCo archive "sapjco3-6.0.0.jar". It is not allowed to rename or repackage the original archive "sapjco3.jar".
at com.sap.conn.jco.rt.MiddlewareJavaRfc.<clinit>(MiddlewareJavaRfc.java:226)
at com.sap.conn.jco.rt.DefaultJCoRuntime.initialize(DefaultJCoRuntime.java:98)
at com.sap.conn.jco.rt.JCoRuntimeFactory.<clinit>(JCoRuntimeFactory.java:23)
at com.sap.conn.jco.rt.RuntimeEnvironment.<init>(RuntimeEnvironment.java:43)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at java.base/java.lang.Class.newInstance(Class.java:584)
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 local_project.simple_job_sap_0_1.simple_job_SAP.tSAPConnection_1Process(simple_job_SAP.java:414)
at local_project.simple_job_sap_0_1.simple_job_SAP.runJobInTOS(simple_job_SAP.java:1621)
at local_project.simple_job_sap_0_1.simple_job_SAP.main(simple_job_SAP.java:1426)
[statistics] disconnected
Job simple_job_SAP ended at 12:14 15/10/2022. [Exit code = 1]
======
This error occurs when running on TOS8.0.1, and does not occur when the built job is executed from the startup batch file.
Please tell me how to prevent Illegal JCo archive "sapjco3-6.0.0.jar" error from occurring.
Hello,
It does not occur when the built job is executed from the startup batch file (TOS 7.x)?
You did add the jar to the studio libraries and sapjco3.dll under c:/windows/system32?
As we checked with RD team that they changed sapjco3.jar to com.sap.conn.jco.sapjco.jar, could you please try to remove sapjco3.jar from the .m2 folder and when the component asking to import the sapjco3.jar then upload com.sap.conn.jco.sapjco jar?
Here are following steps:
1. remove "sapjco3.jar" from studio\configuration\.m2\repository\org\talend\libraries\com.sap.conn.jco.sapjco
2. restart studio and import "sapjco3.jar" again (there should be a warning message ask you to import driver)
3. import sapjco3.jar again (no need tLibraryLoad because the component tSAPTableInput will ask for it)
4. run your job
Reference:
https://help.talend.com/r/en-US/8.0/sap/installing-sap-java-connector-on-windows-7-64-bit-unzip
Feel free to let us know if it helps.
Best regards
Sabrina
Hello, thanks for your response.
(Ans.1) Yes. When the built job by TalendV8.0.1 started from batch file (TOS8.0.1), I had no error.
(Ans.2) No. I set sapjco3.jar at Preferences -> Java -> Build Path -> User Libraries.
And sapjco3.dll was placed in C:\Windows\System32 folder.
I attach the simple_job_SAP.zip created in TalendV8.
Best regards
Sabrina-san,
I will notify you of the result after executing the STEP you notified.
Please wait a moment. Thank you.
Hi sabrina-san,
I executed following step, but I encounted same error.
Are the steps below I performed wrong?
(1) Place sapjco.jar to C:\Windows\System32 folder
(2) Remove sapjco3.jar path from Preferences -> Java -> Build Path -> User Libraries
(3) Remove studio\configuration\.m2\repository\org\talend\libraries\com.sap.conn.jco.sapjco folder
(Because sapjco3.jar file could not found in com.sap.conn.jco.sapjco folder)
(4) restart TalendV8 and open tSAPconnection component in simple_job_SAP
-> I didn't see warning message ask to import driver
(5) run simple_job_SAP job
-> I met same error "ExceptionInInitializerError".
Best regards, Jas
I found sapjco-3.6.0.0.jar file. So I did followinfg steps, but I encounted same error.
(1) Delete studio\configuration\.m2\repository\org\talend\libraries\sapjco3 folder which contain sapjco-3.6.0.0.jar file
(2) Restart TalendV8 and open tSAPconnection component in simple_job_SAP
(3) Push "Install" button in warning message "This component tSAPConnection requires at least one external jar to be installed."
(4) Import "com.sap.conn.jco.sapjco3-1.3.0.RELEASE.jar" file downloaded from Maven
(5) Run simple_job_SAP job in TOS8.0.1 (same error has occurred)
I push "Install" button specify another "sapjco3.jar" file In step(4), but I met same error.
Hello,
Please check in https://mvnrepository.com/artifact/com.sap.conn.jco/sapjco3, the jar's version is 3.0.14 and then download the jar, run the job to see if you are able to run job and bat file OK with sapjco3.jar 3.0.14.
Best regards
Sabrina
Hello,
I can not access notified link.
Please notify the direct link of sapjco3.jar 3.0.14.
thanks.
Forbidden
You don't have permission to access /nexus/content/repositories/public/com/sap/conn/jco/sapjco3/3.0.14 on this server.
Hello,
I uploaded a sapjco3.jar 3.0.14 into community and I made a testing about this issue and able to run job and bat file OK with sapjco3.jar 3.0.14 in V 7.2.1 and will try it on V 8.0.1 later.
What's JDK version are you using?
Best regards
Sabrina
Hello,
Thank you for uploading sapjco3.jar 3.0.14.
I installed sapjco3.jar 3.0.14 and run job in TOS8.0.1, but I met same error.
JDK version is openjdk version "11.0.16.1" 2022-08-12. (Adoptium OpenJDK11U-jdk_x64_windows_hotspot_11.0.16.1_1)
On my TOS7.3.1 environment, jobs using the original sapjco3 .jar do not fail and complete normally.
So, I'm thinking this error caused by TOS8.0.1 environment.
Best regards, Jas