tJobRun with dynamic job run throws Exception on Karaf
Hi,
I have a problem with tRunJob component set to use dynamic job on Apache Karaf Server.
Project description: I have one Camel route (named DummyRoute) with cTimer, sending messages from cSetBody to cTalendJob. cTalendJob calls job (named DummyJob) that performs a subjob (named DummySubJob) via tRunJob component. Important note here -
tRunJob settings
"Use Dynamic Job" is checked and dynamic job mapping active. Subjob makes logging and project ends here. Simple.
Issue description: Project above works just fine in Talend Open Studio (both in Run and Debug mode). Runs every second and outputs the log message. Issue occures after deploying built .kar file to the Apache Karaf server. (OGSI container Apache Karaf). Camel Route is registered properly but execution fails and throws Exception on every run. Exception message is written below. Is says class file for DummySubJob couldn't be found, but .kar file includes
ALL neccesarry files - also DummySubJob.class file. This issue can be fixed by changing dynamic job mapping to static by unchecking "Use Dynamic Job", but this behaviour is highly undesirable. It seems that the dynamically-called class loaded by tRunJob cannot be instantiated in OGSI container, because it is not exported in OGSI manifest.
I read the help for tRunJob component already but didn't find any useful information regarding this issue.
Exception in component tRunJob_1 java.lang.RuntimeException: Child job returns 1. It doesn't terminate normally. Error: Could not find or load main class dummyproject.dummysubjob_0_1.DummySubJob
Software version: Talend Open Studio for ESB v5.6.2.2.20150508_1414
Hello Sabrina, I've read bug you sent carefully, but issue you've sent is different from mine. The problem I've described relates to checkbox "Use dynamic job" solely. With the "Use dynamic job" checked I my code fails on Karaf. Any ideas?