If you are running a Job on 6.4.1, and you have a tFileInputJSON component in that Job, you may encounter an issue where the Job runs locally, but it fails when running remotely. You may build the Job locally, or using CommandLine, and there won't be any issues reported. However, upon reviewing the execution logs for TAC, you will find an error that is the same as or similar to the following:
### Job STARTED at 2017/09/27 19:10:35 (jobId=20170927_191008_C3Shp, jobExecutionId=20170927191035_keJcU) ### ### Job ENDED WITH ERROR at 2017/09/27 19:10:35 (jobId=20170927_191008_C3Shp, jobExecutionId=20170927191035_keJcU) ### java.lang.NoClassDefFoundError: com/jayway/jsonpath/PathNotFoundException at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) at java.lang.Class.privateGetMethodRecursive(Class.java:3048) at java.lang.Class.getMethod0(Class.java:3018) at java.lang.Class.getMethod(Class.java:1784) at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526) Caused by: java.lang.ClassNotFoundException: com.jayway.jsonpath.PathNotFoundException at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 7 more Error: A JNI error has occurred, please check your installation and try again Exception in thread "main"
The issue is that you may have all the components for the tFileInputJSON component, but Maven is referencing the wrong library for that component. When you build the Job, that component may exist locally, but it doesn't exist and/or is mapped differently in your Nexus and Jobserver. When the Job runs, it will try to reference the old library, searching for the new jar file. This will cause the component to not run properly, causing an issue with the Job.
To resolve this issue:
Scroll down to line 170, where you will see the following line:
<IMPORT NAME="json-path-2.1.0.jar" MODULE="json-path-2.1.0.jar" MVN="mvn:org.talend.libraries/json-path-1.2.0/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.json/lib/json-path-2.1.0.jar" REQUIRED_IF="(READ_BY == 'JSONPATH')" />
Change the filepath so that it reflects the correct jar that needs to be referenced:
<IMPORT NAME="json-path-2.1.0.jar" MODULE="json-path-2.1.0.jar" MVN="mvn:org.talend.libraries/json-path-2.1.0/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.json/lib/json-path-2.1.0.jar" REQUIRED_IF="(READ_BY == 'JSONPATH')" />
This issue has been addressed and will be fixed in future version of Talend. For more information about the issue, see TDI-39432.
If you have issues applying this fix to your environment, reach out to Talend Support for additional assistance.