Search code examples
talendkaraf

Talend ESB - Error deploying OSGI Buldle job to Karaf


I have this project in Talend ESB:

  • 1 main JOB Exposing tRESTfull method gathering parameter and passign to n°3 subjob
  • 3 subjob executing task based on parameters

Everything works ok in Talend Studio, but when I try to export main JOB (1) as OSGI Bundle for Karaf, I receive following error:

 Exception in component tRunJob_1 (Karaf_global_service)
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

This is the main JOB configuration: enter image description here

Any idea/suggestion? How can I manually add subjob as building process is completely automated?

Thx

Regs


Solution

  • After some research I discovered Dynamic Job functionality is not supported in the Runtime (Karaf): therefore, for OpenSource Edition, you need to adapt with some workaround. I did create 3 separate RunIF link to call subjob: in this way Karaf accep deployment and params are correctly passed: enter image description here

    Syntax for the RunIF Link:

    globalMap.get("command")!=null && ((String)globalMap.get("command")).equals("SUBJOB_name")