Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Java.Lang.RuntimeException - Talend ESB - Karaf OSGi

Hello,

I have a very simple service I deployed in Karaf, when I run it I raise following error code:

 

0683p000009LxM2.jpg

 

 

Exception in component tRun]ob_3 (test_callPortype_test_calloperation)
java.lang.RuntineException: Child job returns 1. It doesn't terminate normally.
Error: Could not find or load main class local_project.test_message_0_1.test_message

My configuration is:

Talend ESB on Ubuntu machine 16.04 64 bit on VM machine

Java ver:

0683p000009Lx7v.jpg

 

Labels (1)
  • Other

19 Replies
Anonymous
Not applicable
Author

This is due to your "test_callPortype_test_calloperation" job failing for whatever reason. You need to show us what your "test_callPortype_test_calloperation" job looks like to give us any idea of why this might be.

Anonymous
Not applicable
Author

Hello,

this is how jobs looks like:

0683p000009LxGd.jpg

I made a dummy Job3 (a simple message box) and it works fine in the Talend ESB environment:

After exporting the service, creating a *.KAR file, and after deploying it to the OSGi Karaf environment everythig seems to work as expected:

0683p000009LxM3.jpg

Anonymous
Not applicable
Author

You can't have a message box running within a service unless it is in the Studio. Where would the message box pop-up when running somewhere other than the Studio? It is completely redundant apart from within the Studio environment for testing. This will be why the job failed. Remove the message box and I would expect the service to work.

Anonymous
Not applicable
Author

Sorry I don't get you: I made intentionally a "dummy" service as the other 2 subjob are not working too.

Maybe my bad not to have explained correctly:

  • I have a main JOB that is a web service calling subjobs (based on parameter)
  • I have a Service that is connected to Test_call mainJOB
  • If I deploy on Karaf in Windows I don't have any problem: everything work as expected (including the dummy message)

So it seems this error is dependent on platform?

Thank you

Regs

 

Anonymous
Not applicable
Author

Yeah I got that your web service is calling child jobs. The problem is caused by where the code is actually running. On your Studio, all of the code is running via a graphical user interface (Eclipse). It is a pseudo Talend runtime and works very differently from the Talend Runtime (Apache Karaf). The Talend Runtime runs on another machine WITHOUT a graphical user interface. A web service does not support pop-up windows or any graphical interfaces like that. The only reason it works on your Studio is because the Studio is a graphical user interface that runs the service within it in a debug state. This will never work on the Talend Runtime. You should NEVER use the message box in a web service. You shouldn't really use it very much with a DI job either. If you want to  output messages, use a a tJava and the System.out.

Anonymous
Not applicable
Author

First really thanks for your support, I do really appreciate.

Got your suggestion about GUI/WebService, but even I exclude the dummy job (messagebox) other jobs are not containing any GUI (basically they receive parameters, they open MySQL and does certain operation on DB) and they are not working as well.

As I said, Karaf container on another PC using Windows works as expected as a charm.

I did check all settings, JAVA, path, etc... but I cannot figure out what else to check.

Thx

Anonymous
Not applicable
Author

The error you had previously was caused by the message box. You will need to raise a new issue regarding other problems. Can you look in your log folder  of your Runtime when you try to run the service (mine is here, as an example "E:\Talend\6.2.1\esb\container-app\log") and take a look in the tesb log file (you will likely see about 11 files in this folder). You need to send us the error messages you receive. My guess is that your MySQL database connection is not working.

Anonymous
Not applicable
Author

Hello, I just have 1 file in the ESBRuntime/Log folder (see attached).

MySQL DB was working ok as I did cross checked using the Studio job execution.

 

This is my application log:

Exception in component tRunJob_1 (test_callPortType_test_callOperation)
java.lang.RuntimeException: Child job returns 1. It doesn't terminate normally.
Error: Could not find or load main class local_project.esb_fb_post_0_1.ESB_fb_post

	at local_project.test_callporttype_test_calloperation_0_1.test_callPortType_test_callOperation.tRunJob_1Process(test_callPortType_test_callOperation.java:1432)
	at local_project.test_callporttype_test_calloperation_0_1.test_callPortType_test_callOperation.tESBProviderRequest_1_LoopProcess(test_callPortType_test_callOperation.java:4182)
	at local_project.test_callporttype_test_calloperation_0_1.test_callPortType_test_callOperation.tJava_1Process(test_callPortType_test_callOperation.java:2823)
	at local_project.test_callporttype_test_calloperation_0_1.test_callPortType_test_callOperation.runJobInTOS(test_callPortType_test_callOperation.java:4654)
	at org.talend.esb.job.controller.internal.RuntimeESBProviderCallback.run(RuntimeESBProviderCallback.java:120)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Thx

Regs

SL

 


tesb.log
Anonymous
Not applicable
Author

This seems to suggest that one of your child jobs (esb_fb_post_0_1) cannot be found or loaded. How are you building your service and how are you deploying it? Do you have another instance of that job deployed in your runtime? Also, what version of Talend are you using?