One Star

[resolved] Exception while calling MessagingEndpoint with talend:// scheme

Hi all.
After trying some of the examples mentioned within the TESB documentation, I am facing a new problem!
I created a simple sample job that displays a warning in the TESB console (tWARN via tLogCatcher and tLogRow). After deploying the job to our TESB instance, I created a sample route that should call this job (see attached images).
For the start of my route I used a Timer component that send out messages ervery 10 seconds. These Messages should be passed to the cTalendJob component. After investigating this procedure I realized that the cTalendJob component acts as a messaging endpoint (talend://<job_class>?<args>).
Seemed very easy so far. :-( But the problems began as I started to deploy the route to our TESB instance via console with the osgi:install command.
The route could bei installed, but as soon as i started the route (via start <bundle_id>) I got the exception that the scheme talend:// wouldn't be recognized.
The exception I got was:
Failed to create route cMessagingEndpoint_1 at: >>> To <<< in route: Route] -> [To... because of Failed to resolve endpoint: talend://spappsesb.samplejob_0_1.SampleJob?context=Default due to: No component found with scheme: talend
Until now, I'm stuck looking for the bundle that contains the talend:// scheme definition or the cTalendJob component.
Maybe somebody could help me to figure out, what went wrong?
Thanks in advance.
Regards
Alexander
1 ACCEPTED SOLUTION

Accepted Solutions
Employee

Re: [resolved] Exception while calling MessagingEndpoint with talend:// scheme

Hello Alexander,
Yes, it's another issue Smiley Happy. Apparently the older version of the camel-tis JAR file we delivered with the studio does not support that kind of context propagation. You could try to patch your studio so that it works, for that you need to find all files with name camel-tis-2.7.1.0.jar and replace the content of these files with that one:
http://dl.dropbox.com/u/218306/camel-tis-2.8.2.0.jar
Please make sure that you name your newly replaced files with the same name: 'camel-tis-2.7.1.0.jar'
After that you could try to re-run your sample, or just import mine:
Job called from Route which have a context parameter 'hasi': http://dl.dropbox.com/u/218306/JobCalledFromRoute.zip
Route that calls a job with context parameter 'hasi': http://dl.dropbox.com/u/218306/RouteCallsJob.zip
Renat
10 REPLIES
Employee

Re: [resolved] Exception while calling MessagingEndpoint with talend:// scheme

Hi,
Apparently the JAR file providing the talend component for Camel is missing in our default delivery, please try to drop that JAR file
http://dl.dropbox.com/u/218306/camel-tis-2.8.2.0.jar
To your TESB_HOME/container/deploy directory and try again.
Renat
One Star

Re: [resolved] Exception while calling MessagingEndpoint with talend:// scheme

Thanks.
Now, it works without any problems! The osgi bundle camel-tis has not been registered!
But now I 've got some other question: Is it possible to use the IN message of the route as Parameter for the cTalendjob component? And if it should be possible, how does it work? Wich expression, parameter or whatever ... do I need to set in- and output parameter of the cTalendJob Endpoint?
Thanks in advance.
Regards,
Alexander
Employee zbe
Employee

Re: [resolved] Exception while calling MessagingEndpoint with talend:// scheme

Anybody volunteering to file a bug? The camel-tis bundle should be included in the runtime out of the box. This is good candidate for a 5.0.2.
Zsolt
One Star

Re: [resolved] Exception while calling MessagingEndpoint with talend:// scheme

Hi Zsolt.
I'd like to learn how to fill in a bug fom!
I just created myself a JIRA Account. Should I just fill in the "New Issue" form?
Regards
Alexander
Employee

Re: [resolved] Exception while calling MessagingEndpoint with talend:// scheme

Hello Aleander,
Concerning the IN/OUT messages it's complicated right now. Currently cTalendJob component is able to start a Talend job. For that start it will copy all camel message headers as context parameters, however there is no OUT message. Technically speaking one job is just a java class with 'public static main' method, it returns an integer value, and nothing more.
However we definitely thinking about improving that in future, and for that your feedback is very important for us. What are the use-cases you have in mind where you would like to call a Talend job from the route? What properties the solution you are looking for should have?
Renat
P.S. Good luck with JIRA, our goal is to make bug submission as simple and painless as possible.
One Star

Re: [resolved] Exception while calling MessagingEndpoint with talend:// scheme

Hi Renat.
How would I access this initial job parameters / context within the job itself?
Regards.
Alexander
Employee

Re: [resolved] Exception while calling MessagingEndpoint with talend:// scheme

Hi
You need to declare a Talend Context in the job that will have the same name as one of your message headers. Then you could use it in your Job configuration like any normal Talend Job Context. See that screencast http://www.screenr.com/IGns for more details about how to configure Talend Context variables.
Renat
Employee zbe
Employee

Re: [resolved] Exception while calling MessagingEndpoint with talend:// scheme

Hi Alexander,
just saw http://jira.talendforge.org/browse/TESB-4536. Thx for filing it. I hope you don't mind I raised the priority to Critical Smiley Happy I assume we will include a fix in the next maintenance release.
Regards,
Zsolt
One Star

Re: [resolved] Exception while calling MessagingEndpoint with talend:// scheme

Hi Renat.
Never mind. ;-)

I just watched your screencast about the usage of contexts within routes and jobs. I also tried to implement a context within my "route-to-job" example. I changed my example in the way that it should pass the route message header to the job via the context, but no success.
Maybe it's just a matter of not to see the wood for the trees. ;-(
If anyone else might help, or even know the answer? I attached my TESB Studio configuration sreenshots.

Within my route I set the message Header "Item" to contain the value the job should use later on. Then I called the cTalendJob component.
Wihtin the cTalendJob I used a cJavaFlex2 component to print all context variables to stdout.
The context ist generated for the whole project and contains an entry called "Item" of type java.lang.Object.
Regarding to your last answer I assumed that the camel route would propagate all message headers to the job via the context. But I had no success.
Any help to solve this problem is appreciated.
Regards.
Alexander
Employee

Re: [resolved] Exception while calling MessagingEndpoint with talend:// scheme

Hello Alexander,
Yes, it's another issue Smiley Happy. Apparently the older version of the camel-tis JAR file we delivered with the studio does not support that kind of context propagation. You could try to patch your studio so that it works, for that you need to find all files with name camel-tis-2.7.1.0.jar and replace the content of these files with that one:
http://dl.dropbox.com/u/218306/camel-tis-2.8.2.0.jar
Please make sure that you name your newly replaced files with the same name: 'camel-tis-2.7.1.0.jar'
After that you could try to re-run your sample, or just import mine:
Job called from Route which have a context parameter 'hasi': http://dl.dropbox.com/u/218306/JobCalledFromRoute.zip
Route that calls a job with context parameter 'hasi': http://dl.dropbox.com/u/218306/RouteCallsJob.zip
Renat