Six Stars

Xpath function max is not working in talend runtime container


I have a very simple talend mediation route which reads a xml file and applied xpath on it.

Xpath is : "max(/Employees/Employee/DateOfJoining/dateTime(.))"

To get this working, I had to load external jar 'saxon-he-'. This route runs fine in talend open studio but when I deploy it in talend runtime container, it is throwing error "javax.xml.transform.TransformerException: Could not find function: max"


I know that external jar files are not embedded in OSGI bundle by default and to configure it, we need to edit route manifest.

So in 'Dependencies' tab in talend studio i checked the checkbox for this jar file and exported the route(see screenshot). But getting the same error.


I put the saxon jar file in lib folder of container also tried putting it in lib\ext folder of container but no luck.


FYI : I am using talend open studio 6.1.0 and same runtime. I also tried it in talend open studio 5.6.2 and same runtime but the issue is same over there.


I checked the manifest file after the route is exported and I can see following

Bundle-ClassPath: .,lib/saxon-he-,...


Please help!


Re: Xpath function max is not working in talend runtime container


Here exists a jira issue:

It has been fixed on V 6.1

Could you please a look at this related topic about: to see if it is OK with you?

Best regards


Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.