0

i've got a problem when i try to deploy a job to my talend enterprise server. When i run the job in the talend administration center i get the following error:

java.lang.NoClassDefFoundError: javax/xml/rpc/encoding/SerializerFactory
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

In this job im using some external jar files (axis.jar and jaxrpc.jar) and i added a tLibraryLoad in the job but without any import commands. I used a locate on the Talend Server to ensure that the needed files are located on the server. I found them in different directories and now im not sure if they have to be relocated. The directories are the followed:

  • {Talend-Installation}/cmdline/studio/commandline-workspace/.Java/lib/jaxrpc.jar
  • {Talend-Installation}/cmdline/studio/configuration/lib/java/jaxrpc.jar
  • {Talend-Installation}/cmdline/studio/plugins/javax.xml.rpc_[version]/lib/jaxrpc.jar
  • {Talend-Installation}/studio/plugins/javax.xml.rpc_[version]

On my client the job runs without any errors. Can someone help me with that?

Don't hesitate to ask me for additional content if needed.

Cheers.

user2742409
  • 315
  • 5
  • 21
  • Did you checked this link - https://www.talendforge.org/forum/viewtopic.php?id=31780 ? – Techidiot Sep 14 '15 at 10:25
  • Also check this 1. http://stackoverflow.com/questions/11290609/how-to-add-third-party-libraries-to-talend-project 2. http://www.vikramtakkar.com/2013/03/importing-external-jar-or-library-files.html – Techidiot Sep 14 '15 at 10:26
  • Thx for the suggestions but they dont help me much in my case. The external libraries are added correctly in the client environment but im not sure where i have to add them on the talend server. – user2742409 Sep 14 '15 at 10:39
  • Have you tried to re-generate the task and deploy? Did you try to run the job in studio and see if it works? Also, check if the installation path has spaces in it. It may cause issues as well. – Techidiot Sep 14 '15 at 10:46
  • I have re-generated the job several times in the TAC. The job works fine in studio on my client. the installation path has no spaces. – user2742409 Sep 14 '15 at 11:30

1 Answers1

1

External libreries have to be in the same machine where the job will be executed, therefore in order to make it run,

  • Use a context variable in the component tLibraryLoad : context.my_jar_path+"/jaxrpc.jar"
  • Put the jars files in the execution server
  • Depending to how you load your context, make the context variable have the value of the jar path: context.my_jar_path = /Data/Talend/ExtJars/
54l3d
  • 3,913
  • 4
  • 32
  • 58
  • Thank you very much, that answer helped a lot. Do u know if i have to define the import parameter or will he just load everything if its not specified? – user2742409 Sep 16 '15 at 13:06
  • And just a little hint it should be "/[Path]/[File]" else it won't work on linux. – user2742409 Sep 16 '15 at 13:07