One Star

[resolved] After export: ClassNotFoundException com.ibm.db2.jcc.DB2Driver

Hi,
my Talend jobs are structured as follows:
-job "RUN_ALL"
-job "RUN_SUBPROJECT1"
-job "RUN_SUBPROJECT2"
--sub project 1
---job x
---job y
--sub project 2
---job a
---job b
So, basically I have folders for several projects that contain several jobs. Furthermore, I have jobs that execute all jobs of a project, and on top of that a job that runs all jobs. That "RUN_ALL" job calls each "RUN_SUBPROJECTx" job.
Now I wanted to export RUN_ALL - so I can execute all jobs by executing one .bat. I checked everything in the export wizard and also included every file (in the file selection window on the left side). However, once I start the RUN_ALL.bat, it fails saying " ClassNotFoundException com.ibm.db2.jcc.DB2Driver".
When I export just the particular job at which the error occurs it runs fine. I also compared the export of the single job with the export of all jobs: It seems that there are some files missing in the "lib" folder in the export of all jobs. The export of the single job contains files like "db2.jcc.jar" and so on, which are missing in the "lib" folder of the export of all jobs.
I dont know....is it a problem that I nest the actual jobs? Because basically I call ALL_RUN which calls RUN_SUBPROJECTx which calls JOBx. So maybe when I export ALL_RUN it doesnt recognize the dependencies of the actual job files?
How can I solve the problem?
Best regards
1 ACCEPTED SOLUTION

Accepted Solutions
Community Manager

Re: [resolved] After export: ClassNotFoundException com.ibm.db2.jcc.DB2Driver

Hi
Can you try again - but this time you do "2)" too? Maybe then the problem can be reproduced

Yes, I got the same problem if I click on '>>' and select all jobs, the driver for DB2 component are missing, please report a bug on our bugtracker.
Anyway, you don't need to select all jobs in your case, and you get the correct export of job script now.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
20 REPLIES
One Star

Re: [resolved] After export: ClassNotFoundException com.ibm.db2.jcc.DB2Driver

Oh, just FYI: If I export RUN_SUBPROJECTx it works as well.
So basically the problem seems to be only in case of a "2nd-degree-dependency" (meaning "RUN_ALL" > "RUN_SUBPROJECTx" > "job x")
Community Manager

Re: [resolved] After export: ClassNotFoundException com.ibm.db2.jcc.DB2Driver

Hi
Which version of TOS are you using? Have you checked the box 'export dependencies' when export the job script?
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] After export: ClassNotFoundException com.ibm.db2.jcc.DB2Driver

I'm running the latest version, as far as I know. v4.1.2.r53616 on "Windows XP Professional Version 2002 SP3".
Here's what I did:
1. Rightclick on the RUN_ALL job in the repository -> Export Job
2. Archive file location: Desktop; Job version "0.1" (the only available); Export type "autonomous job", checkbox "extract the zip file" NOT checked; Options: checked everything except "source files". Shell launcher is "all" and context scripts is "default"
3. Then I expanded the "items to export" frame on the left side and clicked "select all"
And then I hit "finish"
One Star

Re: [resolved] After export: ClassNotFoundException com.ibm.db2.jcc.DB2Driver

Wait.....now that you mention it....there is no checkbox "export dependencies" in that wizard. Am I using the right one?
I found "export dependencies" in that other export wizard ("export items") - but this wizard doesnt create executable .bat files, does it?
Community Manager

Re: [resolved] After export: ClassNotFoundException com.ibm.db2.jcc.DB2Driver

Hi
I don't understand why you do the step 3? All the dependency jobs will be included once the 'export dependencies' option is checked.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Community Manager

Re: [resolved] After export: ClassNotFoundException com.ibm.db2.jcc.DB2Driver

Wait.....now that you mention it....there is no checkbox "export dependencies" in that wizard. Am I using the right one?
I found "export dependencies" in that other export wizard ("export items") - but this wizard doesnt create executable .bat files, does it?

Yes? You don't see the 'export dependencies' option?
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] After export: ClassNotFoundException com.ibm.db2.jcc.DB2Driver

Ohhh wait. Now I'm confused. You're right, there is that box, but it's grey. Thats why I oversaw it.
The steps I described in my last posting were those I performed last time (after experimenting with several settings). I figured that I dont need the source files, so I unticked the checkbox.
Just to get everything straight, I just performed another export - and this time I checked every checkbox available. So, I also checked "export dependencies" and "source files".
Still, the required .jar doesnt appear in the export :-/
One Star

Re: [resolved] After export: ClassNotFoundException com.ibm.db2.jcc.DB2Driver

So, is it a bug or am I doing sth wrong?
Community Manager

Re: [resolved] After export: ClassNotFoundException com.ibm.db2.jcc.DB2Driver

Hi
If it is the case, it should be a bug, but I can't reproduce it. Please to do:
1. Simplify your jobs and export the job items.
2. Create a bug on our bugtracker and upload the job item.
And then, we will try to reproduce the problem with your job.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] After export: ClassNotFoundException com.ibm.db2.jcc.DB2Driver

phew...alright, I'll do my best
One Star

Re: [resolved] After export: ClassNotFoundException com.ibm.db2.jcc.DB2Driver

Hi shong,
I just sent you an email with an example project. I used the name of this topic as subject so you can relate it to this issue.
Hope it helps.
Thanks!
One Star

Re: [resolved] After export: ClassNotFoundException com.ibm.db2.jcc.DB2Driver

Hi!
Whats the status on this issue? You got my email the other day?
Community Manager

Re: [resolved] After export: ClassNotFoundException com.ibm.db2.jcc.DB2Driver

Hi
Sorry for delay, I have imported your project and tried to export the job script from job All_RUN, I can see all the required drive jars are included in the lib folder. Please see what I do and what is not the same as your.
Maybe you have installed some patch cause the problem? If so, try to test it again on new studio.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] After export: ClassNotFoundException com.ibm.db2.jcc.DB2Driver

Hi!
No problem - just wanted to make sure that you got the email Smiley Happy
Thanks for your response!
Back to topic. Well, I sent you the whole export, right? So please have a look at \ALL_RUN_0.1\lib\. It includes the following files:
advancedPersistentLookupLib-1.0.jar
commons-collections-3.2.jar
jboss-serialization.jar
jt400_V5R3.jar
jtds-1.2.5.jar
log4j-1.2.15.jar
systemRoutines.jar
talend_DB_mssqlUtil.jar
trove.jar
userRoutines.jar
after DELETING the call of the job Run_Ewim, the export contains MORE files in \lib\, new files are:
db2jcc.jar
db2jcc_license_cisuz.jar
db2jcc_license_cu.jar
So basically the missing db2 libraries.
I dont know, is there anything I can do? Doesnt seem reproducible at your machine, does it?
Community Manager

Re: [resolved] After export: ClassNotFoundException com.ibm.db2.jcc.DB2Driver

Hi
Yes, I can NOT reproduce the problem. see the screenshots in my previous post,
1. Right click on the job All_RUN, select 'export job' item.
2. Browse a path for archive file, click on the 'Finish' button.
After exporting the job script, I can see all the required drive jars are include in \ALL_RUN_0.1\lib\.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] After export: ClassNotFoundException com.ibm.db2.jcc.DB2Driver

Addition: Just saw that you added screenshots. Will check on a new Talend. Had no patches installed afaik.
Based on your screenshots I already saw 2 differences:
1) I checked "Context scripts" and "Apply to children"
2) I expanded the list of jobs (clicked ">>") and selected all jobs
But that wont do the trick I guess? Maybe you can try - I'll work on a fresh Talend in the meantime Smiley Wink
Community Manager

Re: [resolved] After export: ClassNotFoundException com.ibm.db2.jcc.DB2Driver

Hi
1. If the job contains context variables, check the 'context scripts' and select the script file from the list when exporting the job script, I tested and it works, the job script include all the jars.
2. You don't need to click '>>' and select all jobs, because all the dependencies will be exported also when the 'Export dependencies' option is checked by default.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] After export: ClassNotFoundException com.ibm.db2.jcc.DB2Driver

HA! I think "2)" is our culprit!
If I dont select all jobs it seems like all libraries are getting exported correctly. Can you try again - but this time you do "2)" too? Maybe then the problem can be reproduced
Edit: Yes, can definitely reproduce it at my machine. If I select all jobs, the files are missing. If I just select ALL_RUN, the libraries get exported
Community Manager

Re: [resolved] After export: ClassNotFoundException com.ibm.db2.jcc.DB2Driver

Hi
Can you try again - but this time you do "2)" too? Maybe then the problem can be reproduced

Yes, I got the same problem if I click on '>>' and select all jobs, the driver for DB2 component are missing, please report a bug on our bugtracker.
Anyway, you don't need to select all jobs in your case, and you get the correct export of job script now.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] After export: ClassNotFoundException com.ibm.db2.jcc.DB2Driver

Alright, at least we've got this figured out and I have a suitable workaround I can use in the meantime Smiley Happy
Thanks for your help! Really great support!