One Star

NullPointerException in Oracle output

Hello all.
I am attempting to output data into an Oracle table.  I have successfully connected to the database and I can view my data using tLogRow, but I'm getting an error message when attempting to use tOracleOutput to add rows to an existing table in our database.
connecting to socket on port 4065
connected
Exception in component tOracleOutput_1
java.lang.NullPointerException
at local_project.mbrsepmstr_0_1.mbrsepmstr.tFileInputDelimited_1Process(mbrsepmstr.java:8797)
at local_project.mbrsepmstr_0_1.mbrsepmstr.runJobInTOS(mbrsepmstr.java:16667)
at local_project.mbrsepmstr_0_1.mbrsepmstr.main(mbrsepmstr.java:16501)
: local_project.mbrsepmstr_0_1.mbrsepmstr - tOracleOutput_1 null
disconnected
From the error, I gather that something is Null that should not be, but I can not figure out what it is.  Our database setup does not allow null values in the particular table being written, but when I look at the data in tLogRow, I do not see any null values.    
Any tips on how to figure out what is causing the error would be appreciated.
Thanks.
11 REPLIES
Moderator

Re: NullPointerException in Oracle output

Hi,
Did you use toracleconnection component in your work flow? Would you mind posting your job design screenshot into forum which will be helpful for us to address your issue?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: NullPointerException in Oracle output

You can try following things:
1. Generally tLogRow should help to get which data is null. 
2. You can try to make all the columns in the database table as nullable and see if you still get this error. 
3. Also check the component properties to see if any of the columns is set to be not nullable and should be nullable.
If you can post you job design once if will be easier to help you.
One Star

Re: NullPointerException in Oracle output

I checked the data in tLogRow and none of the fields are null and I did include a tOracleConnection.  Here's a screeshot of my job design.  It's nothing that fancy, just taking data from 3 csv files and sending selected data to one table in Oracle.
One Star

Re: NullPointerException in Oracle output

Mmm...  screenshot is not showing up for some reason.  Trying to past it again.
One Star

Re: NullPointerException in Oracle output

Trying screenshot one more time...
One Star

Re: NullPointerException in Oracle output

Oh well, it looks like it won't let me put the screenshot up for whatever reason.
Got to say, Talend has got to be the most frustrating and non-intuitive ETL tool I've ever attempted to use.  I've been struggling with this for a couple of weeks and still can't get a very simple job to work properly.  It would be really nice if the error messages identified exactly what was wrong instead of just throwing out a generic java error message, which means very little to me since I don't use java.  
Moderator

Re: NullPointerException in Oracle output

Hi,
Screenshots works only if you drag&drop the image directly in the editor window. 
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Six Stars JR
Six Stars

Re: NullPointerException in Oracle output

A NullPointerException has nothing to do with trying to insert NULL into your database. It is a Java runtime error message telling you that you (explicitly or implicitly through your job design) have declared a Java property (~ a variable) and then tried to reference it (i.e. get its content) without giving it a value first (i.e. set its content). You are trying to point to a NULL property, hence NullPointerException. You may have forgotten to fill a field in a tMap (all fields need to have a value) but there can be a number of other reasons. We can only help you if you post your screenshot with details on the setup of the components. 
I know it can be frustrating but Talend is a tool based entirely on the Java language. If you want/have to use it, you will need to dive a bit deeper into it and learn how to read Java error messages. Sorry about that.
PS: I believe you can only post screenshots it you have posted 10 times or more. 
Moderator

Re: NullPointerException in Oracle output

Hi,
Actually, No limitation exists for the image. The community users are able to upload images for the first topic/post.(limitation for 10 URLs)
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: NullPointerException in Oracle output

Got this working.  Not sure what the problem was, but I solved it by deleting the tOracleOutput and re-creating it.  I must have had a setting wrong in it.
Thanks.
Moderator

Re: NullPointerException in Oracle output

Hi brobert,
Thanks for your feedback. Can we consider this topic as resolved?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.