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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
jkrfs
Creator
Creator

[resolved] Routines not found when running job outside of Talend

I created a simple job that uses routines created by the tWebServiceInput component. (BasicHttpStub, IService, etc). I exported the job with the routines as an autonomous job to run it in command prompt. I've exported jobs to run in command without user routines with no problem, but I have never exported a job using user routines. This is the error that I am getting:
Exception in thread "main" java.lang.Error: java.lang.Error: java.lang.NoClassDefFoundError: routines/TradeServiceLocator
at brokerspecificjobs.blotteruploader_0_1.BlotterUploader.tJava_1Process(BlotterUploader.java:346)
at brokerspecificjobs.blotteruploader_0_1.BlotterUploader.runJobInTOS(BlotterUploader.java:810)
at brokerspecificjobs.blotteruploader_0_1.BlotterUploader.main(BlotterUploader.java:690)
Caused by: java.lang.Error: java.lang.NoClassDefFoundError: routines/TradeServiceLocator
at brokerspecificjobs.blotteruploader_0_1.BlotterUploader.tWebServiceInput_1Process(BlotterUploader.java:645)
at brokerspecificjobs.blotteruploader_0_1.BlotterUploader.tJava_1Process(BlotterUploader.java:338)
... 2 more
Caused by: java.lang.NoClassDefFoundError: routines/TradeServiceLocator
at brokerspecificjobs.blotteruploader_0_1.BlotterUploader.tWebServiceInput_1Process(BlotterUploader.java:530)
Caused by: java.lang.ClassNotFoundException: routines.TradeServiceLocator
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 4 more

Any help would be greatly appreciated!
Labels (3)
1 Solution

Accepted Solutions
jkrfs
Creator
Creator
Author

Annnnnnnnd I found the issue. I did not copy the userRoutines.jar file into my global lib directory (all my jobs share a directory).
After I exported the job, I copied the userRoutines.jar file it creates in the lib directory and put it in the lib directory where I am running the job from.

View solution in original post

2 Replies
jkrfs
Creator
Creator
Author

By the way, I did a search for routines and found this post: https://community.talend.com/t5/Design-and-Development/resolved-tWebServiceInput-NoClassDefFoundErro... - which is similar to my issue. I have already explicitly added my routines to the job as mentioned in the post, however I am still getting the error.
jkrfs
Creator
Creator
Author

Annnnnnnnd I found the issue. I did not copy the userRoutines.jar file into my global lib directory (all my jobs share a directory).
After I exported the job, I copied the userRoutines.jar file it creates in the lib directory and put it in the lib directory where I am running the job from.