Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a very simple service I deployed in Karaf, when I run it I raise following error code:
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:
Hello, I will try to answer your questions.
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:
MainJOb
Connected Service
To deploy it in Karaf:
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
Talend ESB Ubuntu 64 bit - V.7.0.1.20171219_1109-M2
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.
Hello,
this are the http://localhost:8040/services outputs:
bundle:list output:
log:tail output:
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
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.
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.
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.
Hello,
there's absolutely no problem with the MySQL DB:
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
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?
Hello, my comments:
Service deployed on Karaf works only on my Windows Machine. In the EBS studio it works on both
Yes
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
I've reported in the thread the error message that I got + Karaf LOG
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...)
Absolutely everything configured equally.
Thank you
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.