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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] NullPointerException and Tmssqloutput

Hi guys,
I am trying to read my name from a delimited file (there is only one single line of data in it, and that's my name, no NULL values), then write the result into a database table.
tFileInputDelimited ----> tMap ----> tMSSqlOutput
Everytime I run the job, I get the following error:
connecting to socket on port 3369
connected
Exception in component tMSSqlOutput_1
java.lang.NullPointerException
at edi_on_nav.insert_table_test_0_1.INSERT_TABLE_TEST.tFileInputDelimited_1Process(INSERT_TABLE_TEST.java:626)
at edi_on_nav.insert_table_test_0_1.INSERT_TABLE_TEST.runJobInTOS(INSERT_TABLE_TEST.java:1323)
at edi_on_nav.insert_table_test_0_1.INSERT_TABLE_TEST.main(INSERT_TABLE_TEST.java:1188)
374 milliseconds
disconnected

I googled a bit and saw that you get the null pointer exception when you have null values in your columns and you uncheck the Nullable option for those columns, etc.
But I don't have anything with null in my source file.
What is the issue here?
Thanks!
Cihan
Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I have found it. Apparently I need to first draw a OnSubJobOK from the DB Connection component to the Delimited File component, and then run the job. It runs now.
The "But it seems that the table doesn't actually get created" was going to be my next question, but it is also resolved. It looks like I need to use the SQL Commit component after the Output one.
Thanks for the prompt reply.

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Hi,
How did you set your tMap component? Could you please upload tMap editor screenshot into forum?
Best regards
Sabrina
Anonymous
Not applicable
Author

I have found it. Apparently I need to first draw a OnSubJobOK from the DB Connection component to the Delimited File component, and then run the job. It runs now.
The "But it seems that the table doesn't actually get created" was going to be my next question, but it is also resolved. It looks like I need to use the SQL Commit component after the Output one.
Thanks for the prompt reply.
Anonymous
Not applicable
Author

Hi,
Thanks for your quick response. Don't hesitate to post your issue on forum.
Best regards
Sabrina
Anonymous
Not applicable
Author

I know this is resolved but can I ask something real quick?
In the Advanced Settings of an MSSQLOutput component, I want to write an SQL expression. I want to replace my column GID_COL_2 with another name called INBTP, so I select Replace, then choose GID_COL_2 as the Reference Column, and then type in my expression.
It is something like this:
"CAST(CASE WHEN GID_COL_2 LIKE '%UNB%' THEN SUBSTRING(GID_COL_2, 12, 13) ELSE ' ' END AS VARCHAR(75))"
Now when I run the Job, Talend tells me that it doesn't recognize GID_COL_2. What am I missing here?
Thanks.