Can't see errors in generated java code

One Star

Can't see errors in generated java code

Hello, I have a problem in a single Talend job. When I try to visualize the code for a particular job, I can see the generated code, but unlikely other jobs I can't see job errors. I can even build the job and execute it, and I don't get errors until it reaches the point with the error.

 

I faced this particular issue when I used 2 string variable without declare them (as you can see in the screenshot, where I commented the declaration). As you can see, no error is listed in the generated java code. Now I discovered my error and fixed it, but it took me hours, and I'm afraid there can be other errors I'm missing.

Is there something I can do to fix this?

 

I'm using Talend Open Studio for Data Integration, version 6.2.1, with JDK 1.8.

 

talend_issue_1.png

 

talend_issue_2.png

Thank you

Community Manager

Re: Can't see errors in generated java code

With Java you have runtime errors and compile time errors. A Java IDE will catch compile time errors and warn you of them before you try to compile. This is where you would see red blocks next to your code in the Talend code window. If your job is running and then failing, that means you have a runtime error. This is completely different and harder to solve without an error message. I suspect that it will likely be a NullPointerException. This is caused by the job trying to do something with an object that is nothing, that has no value. 

 

Can you post your error from the run window for us?

One Star

Re: Can't see errors in generated java code

It's not a runtime error... I already found the error (and fixed it), I was trying to use 2 variables without declaring them. But I didn't get any error while compiling. Usually, making mistake like these, lead you to get error while compiling (or building). But whatever I do, whatever I change in the job design, I never get any error (only when running it).

In the screenshot you can see the error I got.

 

 

 

talend_issue_3.png

Community Manager

Re: Can't see errors in generated java code

Sorry, I misunderstood your issue. This can happen sometimes when you have not restarted the Studio for a while. I believe this is a known issue for Eclipse (the Studio is built on Eclipse). Hopefully it will start catching these compile time errors when you restart. If not, I have seen it so that you need to move the components to a new version of the job to fix this. That is rare, but keep it in mind if restarting doesn't work.

One Star

Re: Can't see errors in generated java code

I tried with restarting and creating a new job, then copy&past all components, but it didn't work... any other idea I can try? Even re-importing the project as a new project didn't work

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

APIs for Dummies

View this on-demand webinar about APIs....

Watch Now