Six Stars

[resolved] TAC Doesn't Seem to Bring In DB2 Jars?

So, I am trying to test out the DB2 connection object running on our TAC. I’m getting an error that looks like the jdbc jar is missing. 
 The zip has the jars in it. The way I moved this job to the TAC is by zipping it up and importing it. 
 
My question is: do you think that we will need to manually add the jars to the TAC/Job Servers? If so, which folder?
Details:
I took the DB2 Connection Test job and built it into the file. Then I unzipped it here in this folder to check that it had the jars for DB2 (which it does)

I brought it into the TAC, deploy it to Job Server 1 and run it. The failure says java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver
I put the asterisks (*) in to mask sensitive info

: ***********.db2connectiontest_0_1.DB2ConnectionTest - TalendJob: 'DB2ConnectionTest' - Start.
: ***********.db2connectiontest_0_1.DB2ConnectionTest - tDB2Connection_1 - Start to work.
: ***********.db2connectiontest_0_1.DB2ConnectionTest - tDB2Connection_1 - Parameters:HOST = "***********.com" | PORT = "*****" | DBNAME = "*********" | TABLESCHEMA = "" | USER = "*******" | PASS = ******... | ENCODING = "ISO-8859-15" | USE_SHARED_CONNECTION = false | SPECIFY_DATASOURCE_ALIAS = false | PROPERTIES = "" | AUTO_COMMIT = false | 
: ***********.db2connectiontest_0_1.DB2ConnectionTest - tDB2Connection_1 com.ibm.db2.jcc.DB2Driver
Exception in component tDB2Connection_1
java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at ***********.db2connectiontest_0_1.DB2ConnectionTest.tDB2Connection_1Process(DB2ConnectionTest.java:461)
at ***********.db2connectiontest_0_1.DB2ConnectionTest.runJobInTOS(DB2ConnectionTest.java:1380)
at ***********.db2connectiontest_0_1.DB2ConnectionTest.main(DB2ConnectionTest.java:1182)
Thanks!
Croix
1 ACCEPTED SOLUTION

Accepted Solutions
Six Stars

Re: [resolved] TAC Doesn't Seem to Bring In DB2 Jars?

Hi Sabrina,
I found out from Talend Support that there is a patch for this issue. The patch name is Patch_20161124_TPS-1685_v2-6.2.1. 
Once I installed the patch this issue was fixed.
Thanks!
Croix
4 REPLIES
Moderator

Re: [resolved] TAC Doesn't Seem to Bring In DB2 Jars?

Hi,


Could you please follow up these steps to sync up these external libraries with commandline?


1: Open a remote project from studio (make sure that your SVN/ Nexus is running well at the same time)


2: Install your required external libraries by using Module view(Window-->Show View-->Talend-->Modules)


In this way, SVN/ Nexus will sync up your required external libraries automatically and then commandline will get them from .m2 repository to deploy your job.


Please take a look at my screenshots and let us know if it works.


Best regards


Sabrina



--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Six Stars

Re: [resolved] TAC Doesn't Seem to Bring In DB2 Jars?

Hi Sabrina,
The error comes from when I click the run button, not when I deploy this job. Deployment works 100% without error.
Any ideas why I could deploy without any problems but then running the job causes this error?
Thanks!
Croix
Moderator

Re: [resolved] TAC Doesn't Seem to Bring In DB2 Jars?

Hi Croix,
Can you run your job successfully in studio?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Six Stars

Re: [resolved] TAC Doesn't Seem to Bring In DB2 Jars?

Hi Sabrina,
I found out from Talend Support that there is a patch for this issue. The patch name is Patch_20161124_TPS-1685_v2-6.2.1. 
Once I installed the patch this issue was fixed.
Thanks!
Croix