Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I'm running talend 6.4.1 with JDK8 on a Mac and was running fine until I installed another JDK. So I now have JDK8 and JDK12.
I use jenv to manage my JAVA_HOMEs and all works well with the studio, using JDK8, apart from when I run a route within the studio.
I get the error
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlRootElement
as the route process is called via the PATH variable and the process running is off the back of...
/usr/bin/java
and that is JDK12....
Post JDK9, javax.xml.bind libs are no longer part of the JDK, so that is why I see the original error.
I have tired:
1) Adding the jaxb-api-2.2.2.jar through the Talend "Modules" view
2) Adding the jaxb dependency jaxb-api-2.2.2.jar to various poms under Talend/Project Properties.
3) Changing the sh Shell script under Talend/Project Properties to use a JDK8 java command
4) Adding the jaxb package javax.xml.bind within the "Dependencies" tab in the Route window
But to no avail. I get the same error each time as if my changes make no difference.
If there any way to either control which java the studio uses to start the route? Or is there a better way to add the dependencies?
Otherwise I am looking at a new (virtual) machine to run my studio..
thanks for any help
Hi,
Could you please check the Java edition which is being used by the Studio by going to WIndows -> Preference?
It should point to your Java 8 path.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved
Yes - That setting says JDK8.
As stated All works well in the studio apart from running routes.
This is because the Studio is running these routes outside of the Studio by using the command "java". So the operating system looks at the PATH env variable and reconciles this to /usr/bin/java on my machine which is JDK12.
So the issue is with how routes are run from the studio...
Hi,
Could you please uninstall Java 12 and see whether it has started working fine after that?
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved
Sorry I need JDK12 for other work so can't do that.
I've found a work around by starting Talend from the command line in a terminal session:
./Talend-Studio-macosx-cocoa.app/Contents/MacOS/Talend-Studio-macosx-cocoa
and this seems to pick up JAVA_HOME set by the jenv tool and then passes it (somehow...) to the route run command.
Calling
ps eww <PID>
on the route process seems to confirm this as I can see JAVA_HOME when using the command line start from a terminal session, and can't see it when starting Talend from the mac Applications menu.