Netsuite Write issues - Failed to convert value from JSON: No content to map due to end-of-input

Talend Version       v6.4

Summary

Netsuite Write issues
Additional Versions  
Product Talend Data Integration
Component tNetsuiteOutput
Problem Description

Netsuite Write issues - While writing the data from a file to Netsuite, you are not able to write the data and encountered the issue:

message=Failed to convert value from JSON: No content to map due to end-of-input

Note: The input file used within the Job is attached.

Following is the stack trace captured:

statistics] connecting to socket on port 3681
[statistics] connected
Exception in component tNetsuiteOutput_1 (test_netsuite_write)
org.talend.components.netsuite.client.NetSuiteException: INTERNAL_ERROR:{message=Failed to convert value from JSON: No content to map due to end-of-input
 at [Source: ; line: 1, column: 1]}
	at org.talend.components.netsuite.avro.converter.ObjectToJsonConverter.convertToDatum(ObjectToJsonConverter.java:81)
	at org.talend.components.netsuite.avro.converter.ObjectToJsonConverter.convertToDatum(ObjectToJsonConverter.java:33)
	at org.talend.components.netsuite.NsObjectTransducer.writeSimpleField(NsObjectTransducer.java:404)
	at org.talend.components.netsuite.NsObjectTransducer.writeField(NsObjectTransducer.java:336)
	at org.talend.components.netsuite.NsObjectTransducer.writeField(NsObjectTransducer.java:318)
	at org.talend.components.netsuite.output.NsObjectOutputTransducer.write(NsObjectOutputTransducer.java:149)
	at org.talend.components.netsuite.output.NetSuiteOutputWriter.write(NetSuiteOutputWriter.java:219)
	at org.talend.components.netsuite.output.NetSuiteOutputWriter.flush(NetSuiteOutputWriter.java:197)
[FATAL]: local_project.test_netsuite_write_0_1.test_netsuite_write - tNetsuiteOutput_1 INTERNAL_ERROR:{message=Failed to convert value from JSON: No content to map due to end-of-input
 at [Source: ; line: 1, column: 1]}
org.talend.components.netsuite.client.NetSuiteException: INTERNAL_ERROR:{message=Failed to convert value from JSON: No content to map due to end-of-input
 at [Source: ; line: 1, column: 1]}
	at org.talend.components.netsuite.avro.converter.ObjectToJsonConverter.convertToDatum(ObjectToJsonConverter.java:81)
	at org.talend.components.netsuite.avro.converter.ObjectToJsonConverter.convertToDatum(ObjectToJsonConverter.java:33)
	at org.talend.components.netsuite.NsObjectTransducer.writeSimpleField(NsObjectTransducer.java:404)
	at org.talend.components.netsuite.NsObjectTransducer.writeField(NsObjectTransducer.java:336)
	at org.talend.components.netsuite.NsObjectTransducer.writeField(NsObjectTransducer.java:318)
	at org.talend.components.netsuite.output.NsObjectOutputTransducer.write(NsObjectOutputTransducer.java:149)
	at org.talend.components.netsuite.output.NetSuiteOutputWriter.close(NetSuiteOutputWriter.java:382)
	at org.talend.components.netsuite.output.NetSuiteOutputWriter.close(NetSuiteOutputWriter.java:53)
	at local_project.test_netsuite_write_0_1.test_netsuite_write.tFileInputDelimited_2Process(test_netsuite_write.java:1982)
	at local_project.test_netsuite_write_0_1.test_netsuite_write.runJobInTOS(test_netsuite_write.java:2344)
	at local_project.test_netsuite_write_0_1.test_netsuite_write.main(test_netsuite_write.java:2158)
Caused by: com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
Problem root cause It occurs when a Referenced object is empty (in the attached input file, 4 entries are empty: IssueProduct, Location, SubsidiaryList, and Vendor).

tFileInputDelimited reads data as an empty string, but null is expected.

Solution or Workaround

Two workarounds are available:

  1. Remove the empty referenced objects from your schema and from file data.
  2. Use the tMap component to catch this invalid input.
JIRA ticket number TDI-39560
Version history
Revision #:
2 of 2
Last update:
‎01-22-2018 02:05 PM
Updated by:
 
Contributors