Null pointer exception in tFileOutputDelimited component

Six Stars

Null pointer exception in tFileOutputDelimited component

Hi,

 

I'm trying to use the output stream feature of the tFileOutputDelimited component and send the output to tDropboxPut without saving the file to a local directory. my job works fine if I disable 'use output stream' and save the output to my local directory. If I enable 'use output stream',then I get the following error. 

 

Exception in component tFileOutputDelimited_1 (job_Extract_000_db2ToSilverpop)

java.lang.NullPointerException

at java.io.Writer.<init>(Writer.java:88)

at java.io.OutputStreamWriter.<init>(OutputStreamWriter.java:97)

at marketing_campaignextract.job_extract_000_db2tosilverpop_0_1.job_Extract_000_db2ToSilverpop.tDBInput_1Process(job_Extract_000_db2ToSilverpop.java:1686)

at marketing_campaignextract.job_extract_000_db2tosilverpop_0_1.job_Extract_000_db2ToSilverpop.tDropboxConnection_1Process(job_Extract_000_db2ToSilverpop.java:893)

at marketing_campaignextract.job_extract_000_db2tosilverpop_0_1.job_Extract_000_db2ToSilverpop.tDBConnection_1Process(job_Extract_000_db2ToSilverpop.java:753)

at marketing_campaignextract.job_extract_000_db2tosilverpop_0_1.job_Extract_000_db2ToSilverpop.tPrejob_1Process(job_Extract_000_db2ToSilverpop.java:518)

at marketing_campaignextract.job_extract_000_db2tosilverpop_0_1.job_Extract_000_db2ToSilverpop.runJobInTOS(job_Extract_000_db2ToSilverpop.java:3432)

at marketing_campaignextract.job_extract_000_db2tosilverpop_0_1.job_Extract_000_db2ToSilverpop.main(job_Extract_000_db2ToSilverpop.java:3260)

[FATAL]: marketing_campaignextract.job_extract_000_db2tosilverpop_0_1.job_Extract_000_db2ToSilverpop - tFileOutputDelimited_1 null

 

some background about the job:

  • I get data from db2 database (2 columns of type graphic and vargraphic) and converting it into  string in the tMap.
  • I have a user defined routine for email validation and filter in records that have the proper email format in the tFilterrow component.

 

My input data doesn't have any null values.In the tDropboxPut I've checked 'Upload incoming content as File'

 

Attaching the screenshots of my job.

Please let me know what is wrong here

 

Thanks in advance for your help !!


Accepted Solutions
Thirteen Stars

Re: Null pointer exception in tFileOutputDelimited component

@nivedhitha,where are you setting the ((java.io.OutputStream)globalMap.get("excel_output_stream")) ?

since you have not set that value for the able variable,because of that you were getting null pointer exception. please check the below link how to use output stream.

 

https://help.talend.com/reader/KxVIhxtXBBFymmkkWJ~O4Q/orwGOyJ72nAubGeMxRyZ8w

Manohar B

All Replies
Six Stars

Re: Null pointer exception in tFileOutputDelimited component

Hi @xdshi / @vapukov,

 

Can you please help me out with my situation? Let me know if have to provide you with additional details.

Appreciate any inputs from you.

 

 

Thank you

Thirteen Stars

Re: Null pointer exception in tFileOutputDelimited component

@nivedhitha,where are you setting the ((java.io.OutputStream)globalMap.get("excel_output_stream")) ?

since you have not set that value for the able variable,because of that you were getting null pointer exception. please check the below link how to use output stream.

 

https://help.talend.com/reader/KxVIhxtXBBFymmkkWJ~O4Q/orwGOyJ72nAubGeMxRyZ8w

Manohar B
Six Stars

Re: Null pointer exception in tFileOutputDelimited component

Hi @manodwhb,

 

Thanks for your reply. Yeah I realized and got it to work Smiley Happy

 

 

Cloud Free Trial

Try Talend Cloud free for 30 days.

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.