Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm trying to use tRestClient with TOS 7.3.1.
As a sample, i created a new job with only empty tRestClient component, and i have this error when i run this job:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
at fvma_lex.test_jerome_0_1.test_Jerome.tRESTClient_1Process(test_Jerome.java:733)
at fvma_lex.test_jerome_0_1.test_Jerome.runJobInTOS(test_Jerome.java:5815)
at fvma_lex.test_jerome_0_1.test_Jerome.main(test_Jerome.java:5590)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
I initially use Zulu 11 OpenJDK, i tried also with Oracle JDK 11.
My TOS_DI-win-x86_64.ini config file contains this:
-vm
C:\Program Files\Java\jdk-11.0.7\bin
I also tried to download all TOS additional packages, with no luck.
Do you have any idea how to resolve this ?
It is blocking my project
I'm using Windows 10.
I found out that some libraries were depecrated with Java 11.
https://blog.codefx.org/java/java-11-migration-guide/
There used to be a lot of code in Java SE that was actually related to Java EE. It ended up in six modules that were deprecated for removal in Java 9 and removed from Java 11. Here are the removed technologies and packages:
- the JavaBeans Activation Framework (JAF) in javax.activation
- CORBA in the packages javax.activity, javax.rmi, javax.rmi.CORBA, and org.omg.*
- the Java Transaction API (JTA) in the package javax.transaction
- JAXB in the packages javax.xml.bind.*
- JAX-WS in the packages javax.jws, javax.jws.soap, javax.xml.soap, and javax.xml.ws.*
- Commons Annotation in the package javax.annotation
tRestClient use JAXB libraries, it is necessary to manually import it.
To do this, i create a dummy "REST" routine, including 3 JAXB libaries delivered with Talend.
In jobs which are using tRestClient component, i linked job with "REST" routine.
Is there a cleaner way to do this ?
I try to add dependancies in maven project file (in "Project properties") but it did not work.
Mabye this should be added to tRestClient documentation.
look at here: https://community.talend.com/s/feed/0D73p000004sLsNCAU