Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Jas1
Contributor
Contributor

JCo initialization failed with java.lang.ExceptionInInitializerError: Illegal JCo archive "sapjco3-6.0.0.jar" in TOS8.0.1

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.

Labels (3)
26 Replies
Jas1
Contributor
Contributor
Author

Sure. We will wait for the results. Thank you.

Anonymous
Not applicable

Hello,

So far, there is no detailed steps to set up SAP's KBA in TOS 8.0.1.

After checked with our component experts, SAP components should not be in Talend open studio V 8.0.1.

Could you please show us your job design so that we could know how you work with talend open studio V 8.0.1.

 

And there is a solution for this initialization error via renaming the "sapjco3.jar" to "com.sap.conn.jco.sapjco.jar". It works fine from our end.

if (!jarname.equals("sapjco3.jar") &&

!jarname.startsWith("com.sap.conn.jco") &&

Package.getPackage("org.apache.maven.surefire.booter") == null &&

Package.getPackage("org.eclipse.jdt.internal.junit.runner") == null)

throw new ExceptionInInitializerError("Illegal JCo archive \"" + jarname + "\". It is not allowed to rename or repackage the original archive \"" + "sapjco3.jar" + "\".");

}

Best regards

Sabrina

 

 

Jas1
Contributor
Contributor
Author

Hello,

Thank you your reply, but I could not avoid this error.

 

We use SAP components in TOSV 6.4.1 and 7.3.1 as user plugin component , which was gotten from Talend Exchange.

Does your reply mean that free SAP components of Talend Exchange are not available in Talend V8.0.1?

 

About my job design, check the previously attached job export file named "simple_job_SAP.zip". I attached screenshot of this job's design.(1_simple_job_SAP.png)

 

I installed "com.sap.conn.jco.sapjco.jar" into SAP componets required module dialog (see attached 2_SAP_required_module.png).

Subsequently, when I ran my simple_job_SAP job on TOS8.0.1, I got an ExceptionInInitializerError as usual.

When I chenged SAP version "salend sap api", I encount compile error (ee attached 3_CompileError.png and 4_line873.png).

Even after renaming the "sapjco3.jar" file to "com.sap.conn.jco.sapjco.jar" and then installing it, I got the same error.

Are there mistaked with my steps or is the free SAP components not working with TOS 8.0.1?

 

Best regards

 

 

 

 

 

Anonymous
Not applicable

Hello,

As we are able to use above solution to fix this issue in talend subscription product(official tSapXXX components), we are supposing that the custom components tSapXXX from exchange might be not compatible with talend open studio 8.0.

The third party custom components on Talend Exchange are not supported by Talend (we cannot provide an SLA and technical support for them), since we don't have the source code of these components.  It is the ownership of the person who built it.

Sorry for not being able to help further.

Best regards

Sabrina

 

Jas1
Contributor
Contributor
Author

Hello,

OK, I understood we have to engage subscription to use public SAP component in Talend V8.0.1.

 

At last, please let me know status about bug issue `TDI-48545`.

Could you conclude that TDI-48545 is not a bug in TalendV8?

Or maybe it was a bug issue about another initialization error in `public` SAP component?

 

Best regards

Anonymous
Not applicable

Hello,

This jira issue could be rejected as we haven't added support for SAP components officially in talend open source.

Due to our RD team changed sapjco3.jar to com.sap.conn.jco.sapjco.jar which causes this initialization error, the solution of renaming the "sapjco3.jar" to "com.sap.conn.jco.sapjco.jar" works fine in talend subscription solution and there might be some patch for it later, I suppose.

Don't hesitate to post your issue here.

Best regards

Sabrina

Jas1
Contributor
Contributor
Author

Hello,​

I see. I understood this issue will maybe reject.

If I will find any issues else, I will post a topic here.

Thank you for your kindness. 😄

Best regards, Jas