Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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.
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.
I added the StringHandling.TRIM function as below:
Integer date=Integer.parseInt(StringHandling.TRIM(System.getenv("PROCESSING_DATE")));
This resolved the error.
Yes, a trim would be an effective way of handling this issue if it was caused by leading/trailing space.
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
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