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

Hello, I will try to answer your questions.

  • How are you building your service and how are you deploying it? 

I have a main JOB "test_callPortType_test_call" that is connected with a Services (port 8090) and it's executing subjobs based on parameter:

MainJObMainJObConnected ServiceConnected Service

To deploy it in Karaf:

  1. I created a KAR file exporting from the service
  2. I've executed Talend ESB Container (sudo ./trun)
  3. I've copied the KAR file into container/deploy folder 
  • Do you have another instance of that job deployed in your runtime?

NO, I've tested using Studio runtime (executing JOB), everything works has expected, but my goal is to use Karaf container as a service in my Ubuntu machine

 

  • What version of Talend are you using?

Talend ESB Ubuntu 64 bit - V.7.0.1.20171219_1109-M2

Anonymous
Not applicable
Author

On your Karaf server (Runtime) can you try the following URL?

 

http://localhost:8040/services

 

This should show you the services that you have running. It should link to your WSDL.

 

Also, from the command line, log-in to your Karaf and type ....

 

bundle:list

 

Your service bundle should be Active.

 

Also, try running the service (if it is up and running and available) after having typed ....

 

log:tail

 

This will show you what happens when you run the service.

 

Post about what you see doing all of that. 

 

It might also be an idea to add some logging in the job that fails as well.

 

My suspicion is that your child job is failing due to MySQL connection issues. Just because it worked in the Studio does not mean it will work in the Runtime. They are very different environments. You need to identify why it is failing in your Runtime and this will require some logging.

Anonymous
Not applicable
Author

Hello,

this are the http://localhost:8040/services outputs:

0683p000009LxT2.jpg0683p000009LxIl.jpgbundle:list output:

0683p000009LxPf.jpg

 

log:tail output:

0683p000009LxRH.jpg

it shows it generate the output LOG file, I've checked again the MySQL DB and I cannot figure out about any potential issue: it works as expected.

 

As I said, If I deploy on Karaf on Windows10-64 bit all works as expected.

I'm really lost.

Any other things I can do to debug?

Thx

Anonymous
Not applicable
Author

Ah, I didn't know (or didn't register) the bit about it working on another machine using Karaf. Did you say you are using Ubuntu (or some other flavour of Linux)? I think this could just be a communication issue with your MySQL box. The Karaf it works on isn't on the same box as the MySQL server is it? This could be an old (and rather annoying) "feature" of MySQL with user permissions per machine.

Anonymous
Not applicable
Author

Yes I'm using Ubuntu machine 16.04 64 bit on VM machine and I'm executing Karaf with sudo permission.

I'll try to create another dummy service to deploy and test, just simple log wirter to exclude any MySQL library.

 

Anonymous
Not applicable
Author

On the Ubuntu machine, can you install a MySQL client and use it to communicate with your MySQL instance using exactly the same login credentials as Talend? That should tell you quite quickly whether that is the issue. This is just a guess as I have experienced similar issues in the past.

Anonymous
Not applicable
Author

Hello,

there's absolutely no problem with the MySQL DB:

0683p000009LwqC.jpg

 

I'll try to investigate more creating a new Service, but I suspect it may be due permission issue on Ubuntu?

Keep you posted and thanks a lot

Anonymous
Not applicable
Author

Sorry for going back over old ground, but I want to make sure I am aware of everything. So the service works on the Windows machine, but not on Ubuntu? A MySQL client will work on both Ubuntu and Windows? 

What is NOT working? What is happening on Windows but not on Ubuntu? Is a database record being updated? Is a file being written? What indicates the failure on Ubuntu? 

Is there an error message that you can share?

Are you running the service as root (or sudo) on Ubuntu?

Have you configured the Runtimes the same? Do you have all of the same features installed in both? Are you using connection pooling? Do you have the same Jars in your deploy folders?

Anonymous
Not applicable
Author

Hello, my comments:

  • So the service works on the Windows machine, but not on Ubuntu? 

Service deployed on Karaf works only on my Windows Machine. In the EBS studio it works on both

  • MySQL client will work on both Ubuntu and Windows? 

Yes

  • What is NOT working? What is happening on Windows but not on Ubuntu? Is a database record being updated? Is a file being written? What indicates the failure on Ubuntu? 

When I export Service as KAR file to be runned inside Karaf OSGi in Ubuntu, it gives me the error: 

java.lang.RuntineException: Child job returns 1. It doesn't terminate normally.
Error: Could not find or load main class local_projec

 As I tryed to explain there's a Service listening for command, based on parameters it fires subjob.

SubJobs consist of inserting records in the MySQL DB

  • Is there an error message that you can share?

I've reported in the thread the error message that I got + Karaf LOG

 

  • Are you running the service as root (or sudo) on Ubuntu?

I've tryed everything, even running as sudo, granting 777 chmod right on the mail folder where all file are installed (jars, Talend files, etc...)

 

  • Have you configured the Runtimes the same? Do you have all of the same features installed in both? Are you using connection pooling? Do you have the same Jars in your deploy folders?

Absolutely everything configured equally.

 

 

Thank you

 

Anonymous
Not applicable
Author

Does exactly the same Kar file (from the same compilation....an exact copy of the file) work on the Windows box but not the Linux box? If so, it proves that there is nothing wrong with the Kar, but there is a difference between your environments.

 

Sorry for all of the questions, but this is something that I would spend a while picking apart in detail....because there will be a difference. My initial suspicion was your MySQL connectivity (since I have seen this many times), but that doesn't appear to be the case. I'm now curious about the version of Java installed. Do you have the same JDK installed on all environments? It must be the JDK and not the JRE as there are subtle differences between the JDK's runtime and the JRE's runtime.

 

The other thing that I would want to look at is to try to identify what is causing the child job to fail. This can be painful, but the best way to do this is to remove functionality from the child job (deactivate) and run it until it completes successfully. This is a pain, but when the error message tells you very little, this is all you can really do. Remember that when you remove functionality, the job still needs to be able to complete without nullpointerexceptions, etc. So make sure the flow is OK.

Sorry I can't give you an instant answer, but believe it or not, this sort of frustrating, bang your head against a wall problem is how I learnt some of the most useful things with the Karaf.