Four Stars

[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!
1 ACCEPTED SOLUTION

Accepted Solutions
Four Stars

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

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.
2 REPLIES
Four Stars

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

By the way, I did a search for routines and found this post: http://www.talendforge.org/forum/viewtopic.php?id=12915 - 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.
Four Stars

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

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.