Six Stars

compilation build Java syntax error from input XML file

Hello

I am developing new Talend DI job (version 6.4.1, Java 1.8)

It generates the following code which is a java syntax error, the is a comma after the open ( bracket:

 

org.dom4j.XPath xTmp29_tFileInputXML_1 = org.dom4j.DocumentHelper.createXPath(nsTool_tFileInputXML_1.addDefaultNSPrefix(,"/root/row/body/root/hits/hits"));

 

This is not a run-time error but a compile error.

What am I likely to be doing wrong?

thanks!

 

  • Data Integration
1 ACCEPTED SOLUTION

Accepted Solutions
Moderator

Re: compilation build Java syntax error from input XML file

Hi,

Thanks for your suggestion. Can we consider this topic as resolved?

Best regards

Sabrina

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

Re: compilation build Java syntax error from input XML file

Hello,

When you get some compile errors, have you already checked your "Code" tab in your job?

There will be your compile error highlighted in red line.

Screenshots of job setting will be helpful for us to address your issue.

Many thanks.

Best regards

Sabrina

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

Re: compilation build Java syntax error from input XML file

yes, by looking at Code tab I saw the Java syntax error reported which is what I posted on my question as you can see.

Unfortunately I changed a few settings and the error disappeared so I dont exactly know what caused it.
I suspect it was due to incorrect XML path passed to the component but Talend DI does not really tell you much. It simply generates bad code and then Java compiler complains.
This is quite typical with any code generator solutions I have seen to date, this is not specific to Talend.
I live and learn.
Thanks
Moderator

Re: compilation build Java syntax error from input XML file

Hi,

Thanks for your suggestion. Can we consider this topic as resolved?

Best regards

Sabrina

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

Re: compilation build Java syntax error from input XML file

yes, we should close it as "not reproducible"
Thank you.