Five Stars

tjava job generates java error when running on linux.

When talend job is executed through linuxWhen talend job is executed through linuxWhen talend job is execcuted through talend studioWhen talend job is execcuted through talend studioShell script usedShell script usedtjava componenttjava component

talend job runs successfully in talend studio. The job converts date from an environmental variable to an integer. But fails at Integer.parseint when job is executed through linux. the talend job was build all associated files was uploaded to remote linux server.

  • Data Integration
Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Eleven Stars

Re: tjava job generates java error when running on linux.

You must be getting a value which is not a number. This could be as simple as a leading or trailing space character causing this. The best way for you to identify what is happening is to add something either side of your number in your System.out.

Rilhia Solutions
6 REPLIES
Eleven Stars

Re: tjava job generates java error when running on linux.

You must be getting a value which is not a number. This could be as simple as a leading or trailing space character causing this. The best way for you to identify what is happening is to add something either side of your number in your System.out.

Rilhia Solutions
Five Stars

Re: tjava job generates java error when running on linux.

I added the StringHandling.TRIM function  as below:

Integer date=Integer.parseInt(StringHandling.TRIM(System.getenv("PROCESSING_DATE")));

This resolved the error.

Five Stars

Re: tjava job generates java error when running on linux.

Thank you rhall_2_0. Can you respond to my last post so that i can mark your reply as the solution?
Eleven Stars

Re: tjava job generates java error when running on linux.

Yes, a trim would be an effective way of handling this issue if it was caused by leading/trailing space.

Rilhia Solutions
Four Stars

Re: tjava job generates java error when running on linux.

Hi,

 

I am trying to insert data into sybase DB using a file, I am getting the below error. Can you please help me with this

 

Exception in component tSybaseOutput_1 (testing_SPIN_Server)
java.lang.NullPointerException
at com.sybase.jdbc3.jdbc.SybBCP.<init>(Unknown Source)
at com.sybase.jdbc3.jdbc.SybPreparedStatement.a(Unknown Source)
at com.sybase.jdbc3.jdbc.SybPreparedStatement.<init>(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.a(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.prepareStatement(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.prepareStatement(Unknown Source)
at local_project.testing_spin_server_0_1.testing_SPIN_Server.tFileInputDelimited_1Process(testing_SPIN_Server.java:817)
at local_project.testing_spin_server_0_1.testing_SPIN_Server.runJobInTOS(testing_SPIN_Server.java:1601)
at local_project.testing_spin_server_0_1.testing_SPIN_Server.main(testing_SPIN_Server.java:1390)

 

Thanks & Regards

Akshay

Eleven Stars

Re: tjava job generates java error when running on linux.

Hi @Akshay91,

 

This doesn't really provide a great deal of information and you should start a new thread so that it doesn't confuse issues. I don't think this issue is necessarily related to the main issue here.

 

Regards

 

Richard

Rilhia Solutions