Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello there,
I have a job with a tRESTrequest entry point doing some json extract, parsing and launching other job depending on some parameters.
The job and subjobs are all running and ok when testing inside the studio (7.2) but when i deploy it as an OSGI bundle on a karaf server it doesn't work anymore, the main job is running ok but i get an error as soon as the subjob is called :
java.lang.RuntimeException: java.lang.NoClassDefFoundError ...
Caused by: java.lang.ClassNotFoundException: process.transfert_oracle_ged_1p_ts_ta_1_0.Transfert_Oracle_GED_1P_TS_TA cannot be found by process.WS_Transfert_Oracle_GED_Prod_1.0.0
If anyone can help that would be lovely!
Sincerely,
Nrd
Adding to my previous answer :
Job with subjobs is now working, but only with manual editing of the generated jar.
Step done :
1. build as OSGI like usual
2. extract all subjob jar from the bundle and put their content in the same folder as the main job in the bundle jar
3. add libs needed by subjobs in the lib folder of the bundle jar and edit manifest accordingly
i've been able to reproduce this with 2 jobs + subjobs.
explanation :
the OSGI bundle generated from Talend is not correct, imagine a job "job1" with your tRestRequest and 2 subjobs ("sub1" and "sub2"), talend will generate a bundle with inside
one solution is to move the folder contained in the subjob jar alongside the folder of the mainjobclass + add the required jar to the lib folder and edit the manifest.
Anyway it seems there's a bug with Talend and/or Maven here.
Hello,
The "Use an independent process to run subjob" option on tRunJob is not compatible with the Runtime. When this option is selected, the child Job will be executed as a separate application. It is a bundle installed on the Runtime after the Web Service or Route is deployed onto the Runtime, therefore it cannot find the executable class file for the child Job. To resolve this issue, please try to disable the "Use an independent process to run subjob" option on the tRunJob component and re-deploy the Web Service or Route onto Runtime server.
Let us know if it is OK with you.
Best regards
Sabrina
Hello Sabrina,
Thanks for your answer.
Problem is I did not enable the use of independent process for my subjobs. checkbox is cleared.
Problems seems to be in the way the .jar is built, when i open it with a jar explorer subjobs jar seems to be in the wrong place
Hello,
Are your studio and runtime on the same server? Did you run your .jar file in V 7.2 runtime as well?
Best regards
Sabrina
Hello,
Are the JAVA_HOME and PATH configured with the correct Java installed locations on the runtime server?
Best regards
Sabrina
Thanks for your support by the way, a pleasure to have answers that fast .
Yes they are, beside i have many ESB jobs (container) running on the server. Problem is only with this job, which is the only one with subjobs.
From what i see the problem seems to be the build OSGI function when there are subjobs : when i look inside the .jar created, subjobs jar are in the wrong place, the lib folder is missing the jar needed by the subjobs and the manifest file seems incomplete.
To check, I tried to manually edit the compiled OSGI jar by :
and the job is working now (main job launch subjob successfully on the server), though context variables are not passed on, so it seems there's still a problem or it's still missing something.
Anyway, it seems the build as OSGI function for a job with subjobs isn't working in v7.x, at least here.
Adding to my previous answer :
Job with subjobs is now working, but only with manual editing of the generated jar.
Step done :
1. build as OSGI like usual
2. extract all subjob jar from the bundle and put their content in the same folder as the main job in the bundle jar
3. add libs needed by subjobs in the lib folder of the bundle jar and edit manifest accordingly
i've been able to reproduce this with 2 jobs + subjobs.
explanation :
the OSGI bundle generated from Talend is not correct, imagine a job "job1" with your tRestRequest and 2 subjobs ("sub1" and "sub2"), talend will generate a bundle with inside
one solution is to move the folder contained in the subjob jar alongside the folder of the mainjobclass + add the required jar to the lib folder and edit the manifest.
Anyway it seems there's a bug with Talend and/or Maven here.
Hello @Breaker
Are you getting this issue in v 7.2 as well on-premise solution? Could you please create a support case on talend support portal? In this way, our colleagues from support team will check it to see if there is a fixed patch for you.
Best regards
Sabrina