Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tjava job generates java error when running on linux.

0683p000009LwQg.pngWhen talend job is executed through linux0683p000009LwQl.pngWhen talend job is execcuted through talend studio0683p000009LwQq.pngShell script used0683p000009LwNi.pngtjava 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.

Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

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.

View solution in original post

6 Replies
Anonymous
Not applicable
Author

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.

Anonymous
Not applicable
Author

I added the StringHandling.TRIM function  as below:

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

This resolved the error.

Anonymous
Not applicable
Author

Thank you rhall_2_0. Can you respond to my last post so that i can mark your reply as the solution?
Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author

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