Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Job runs in Windows, but deployed on Linux gives null pointer

Hello community,

 

I've got a job which runs fine on my local Windows environment, but when deployed as a standalone job on a Linux server it throws a null pointer exception.

Exception in component tDBOutput_2 (import_tlm)
java.lang.NullPointerException
        at uk_energy_market.import_tlm_1_0.import_tlm.tDBInput_2Process(import_tlm.java:1515)
        at uk_energy_market.import_tlm_1_0.import_tlm.tFileFetch_1Process(import_tlm.java:828)
        at uk_energy_market.import_tlm_1_0.import_tlm.runJobInTOS(import_tlm.java:7454)
        at uk_energy_market.import_tlm_1_0.import_tlm.main(import_tlm.java:7259)

The line it throws the exception on is:

java.sql.PreparedStatement pstmt_tDBOutput_2 = conn_tDBOutput_2.prepareStatement(insert_tDBOutput_2);

I'm using a MySQL database, screenshot attached.

Any ideas what could be the cause if this exception?

 

0683p000009M5mm.png

Thanks,

Pierre

 

Labels (5)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi Pierre
Using a tpreJob to ensure tDBConnection component is always executed first. eg:
tPrejob--oncomponentok--tDBConnection

other subjobs.

Regards
Shong

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Hi Pierre
Using a tpreJob to ensure tDBConnection component is always executed first. eg:
tPrejob--oncomponentok--tDBConnection

other subjobs.

Regards
Shong
Anonymous
Not applicable
Author

Hi @pfacto ,

 

I think there is no problem with where you deploy the job. Check your tmap, expression you wrote. 

 

Your output has some null records. Write your expression filters accordingly, if you used some.

 

I suggest you to use tlogrow , you get the clear idea.! 

 

Thanks,

Prabuj

 

/* Don't forget to give Kudos */

Anonymous
Not applicable
Author

Hi,

 

   I would go by Shong's approach in this scenario since the issue says that the data is not getting connection parameters. So if you are using any connection components, you need to make sure that they are tagged to the PreJob Section using tPreJob Component.

 

   Also please close the connection in PostJob section so that unnecessary connections are not in open state which will reduce the DB throughput.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

Anonymous
Not applicable
Author

Thanks guys, this solved it!