Six Stars

tOracleOutput java.lang.NullPointerException

Hi,

 

i am facing the below issue while loading the table with input file

Exception in component tOracleOutput_1 (import_contract)

java.lang.NullPointerException

at sun_project.import_contract_0_1.import_contract.tFileInputDelimited_1Process(import_contract.java:1489)

at sun_project.import_contract_0_1.import_contract.runJobInTOS(import_contract.java:2937)

at sun_project.import_contract_0_1.import_contract.main(import_contract.java:2703)

 

Can someone give any pointers to check the issue

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
Moderator

Re: tOracleOutput java.lang.NullPointerException

Hi,

Did you use tOracleConnection compomnent in your work flow? If so, is there any connector(onsubjobok or oncomponentOk) between tOracleConnection and tOracleOutput component?

Screenshots 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.
13 REPLIES
Ten Stars

Re: tOracleOutput java.lang.NullPointerException

This usually indicates that a variable in a setting or expression is null when the job is expecting a value. This can happen for a number of reasons. Examine the settings of the component identified in the exception, and make sure that any variables used are spelled correctly and are properly initialized with values before that component executes.
Moderator

Re: tOracleOutput java.lang.NullPointerException

Hi,

Did you use tOracleConnection compomnent in your work flow? If so, is there any connector(onsubjobok or oncomponentOk) between tOracleConnection and tOracleOutput component?

Screenshots 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.
Six Stars

Re: tOracleOutput java.lang.NullPointerException

Thanks,

 

i feel the issue is with the field values having values as null during the insert. because i checked with some fields having values and it worked.

could you please let me know what expression to be used in tMap to avoid this error.

 

Six Stars

Re: tOracleOutput java.lang.NullPointerException

Hi,

Thanks, but i think issue is with the null value in some of the fields during insert.
Below is the error
Exception in component tOracleOutput_1 (import_product)
java.lang.NullPointerException
at sun_project.import_product_0_1.import_product.tFileInputDelimited_1Process(import_product.java:959)
at sun_project.import_product_0_1.import_product.runJobInTOS(import_product.java:1996)
at sun_project.import_product_0_1.import_product.main(import_product.java:1762)

and code at line 959 is
java.sql.PreparedStatement pstmt_tOracleOutput_1 = conn_tOracleOutput_1
.prepareStatement(insert_tOracleOutput_1);

Ten Stars

Re: tOracleOutput java.lang.NullPointerException

@xdshi was on the mark, it appears your connection isn't initialized properly. If you're using a tOracleConnection component to set up the database connection, you need to ensure that component executes first.
Moderator

Re: tOracleOutput java.lang.NullPointerException

Hi vidya821,

Would you mind posting your job setting screenshots into forum which will be helpful for us to address your issue quickly.

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

Re: tOracleOutput java.lang.NullPointerException

Yes it worked, Thanks so much
Moderator

Re: tOracleOutput java.lang.NullPointerException

Hi,

Great it works. Feel free to let us know if there is any further help we can give.

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.
Four Stars

Re: tOracleOutput java.lang.NullPointerException

Hi,

 

Hi , 

I am facing an issue while transfering data from mongoDB to oracle. The error message is as follows -

 

Exception in component tOracleOutput_1
java.sql.SQLSyntaxErrorException: ORA-00911: invalid character

 

I am getting this error in toracleoutput component.

 

Could you please where i am doing wrong.

 

Thanks,

Ravi

Six Stars

Re: tOracleOutput java.lang.NullPointerException

Hi,

My issue was wrt to oracle connection, the tOracleOutput_1 component was not connected to a DB,
however your issue seems to be with the incorrect syntax, the issue might not be with the tOracleOutput component as per the détails you provided.
The exception is caused in the tOracleOutput component due to issues in some other component.
Also check if the data type for some of the data sent from MongoDB to Oracle DB might differ.
share the screenshot if possible to work it out.
Thanks
Four Stars

Re: tOracleOutput java.lang.NullPointerException

Find Snap of component  and run tab-

 

ss.PNGrun tab.PNGssa.PNG

Let me know what is issue here.

 

Thanks,

Six Stars

Re: tOracleOutput java.lang.NullPointerException

1) tOracleOutput should be connected to a database connection tOracleConnection.
2) use tMap component to map the data between two connections, this way u will be sure that the data types is matched between tables
Thanks
Four Stars

Re: tOracleOutput java.lang.NullPointerException

Thank you vidya. Its really helpful Smiley Happy

 

Regards,

Ravi