โ11-14-2019 12:43 AM
Hi,
I am trying to get customer Details from Netsuite using Netsuite Get snap, but the snap is routing documents to both Error and output views, is there any issue with the snap or Am I doing anything wrong, Previously it used to work correctly, started facing this issue from today.
Input to Netsuite Get :
Error View:
output View:
โ11-14-2019 01:27 PM
Hi. Weโll need some more information to help with that:
Whatโs the FQID of the NetSuite Get snapโs Info tab?
How many input documents is it getting? Can you show us the preview of the Mapper output?
Iโm not sure what the โPreview is not available in table formatโ means. I think thatโs new. Iโve asked our UI team for more info. But for now, can you please just change the Preview Type to JSON or Raw and show us the result?
Iโd like to see the full stack trace of the error youโre seeing in the error view. Is there a full stack trace in the view that your screenshot isnโt showing? Ideally, please copy/paste the text of the stack trace.
โ11-14-2019 09:24 PM
Hi Tayloy,
Thanks for your reply,
Please find the answers for your questions below.
Netsuite Get FQID:
Class FQID com-snaplogic-snaps-netsuite-lookup_3-snapsmrc523
Output Preview of Mapper
[
{
โbaseRefโ: {
โinternalIdโ: โ57254โ,
โtypeโ: โcustomerโ
}
}
]
The Output view of Netsuite Get Snap isnโt loading at all, it keeps on loading
Full Stack Trace of Error view:
[
{
โerrorโ: โAn error occurred while executing the SOAP requestโ,
โstacktraceโ: โcom.snaplogic.data.doc.SnapDocStreamException: Exception while writing document to the underlying stream.\r\n\tat com.snaplogic.document.parser.DocumentStreamWriter.write(DocumentStreamWriter.java:60)\r\n\tat com.snaplogic.cc.snap.view.document.DocumentPreviewGenerator.openNewFileAndWrite(DocumentPreviewGenerator.java:133)\r\n\tat com.snaplogic.cc.snap.view.document.DocumentPreviewGenerator.writeToStorage(DocumentPreviewGenerator.java:95)\r\n\tat com.snaplogic.cc.snap.view.document.DocumentPreviewGenerator.writePreview(DocumentPreviewGenerator.java:68)\r\n\tat com.snaplogic.cc.snap.view.document.DocumentOutputViewImpl.lambda$write$0(DocumentOutputViewImpl.java:148)\r\n\tat com.snaplogic.cc.snap.common.ViewImpl.timeCall(ViewImpl.java:611)\r\n\tat com.snaplogic.cc.snap.view.document.DocumentOutputViewImpl.write(DocumentOutputViewImpl.java:135)\r\n\tat com.snaplogic.snap.api.OutBoundViewsImpl.write(OutBoundViewsImpl.java:221)\r\n\tat com.snaplogic.snaps.netsuite.NetSuiteCommon$3.call(NetSuiteCommon.java:490)\r\n\tat com.snaplogic.snaps.netsuite.NetSuiteCommon$3.call(NetSuiteCommon.java:431)\r\n\tat com.snaplogic.snaps.netsuite.NetSuiteCommon.doWithRetry(NetSuiteCommon.java:562)\r\n\tat com.snaplogic.snaps.netsuite.NetSuiteCommon.postRequest(NetSuiteCommon.java:431)\r\n\tat com.snaplogic.snaps.netsuite.NetSuiteCommon.makeRequestWithDocument(NetSuiteCommon.java:403)\r\n\tat com.snaplogic.snaps.netsuite.NetSuiteCommon.process(NetSuiteCommon.java:398)\r\n\tat com.snaplogic.snap.api.ExecutionUtil.process(ExecutionUtil.java:106)\r\n\tat com.snaplogic.snap.api.ExecutionUtil.executeForDocument(ExecutionUtil.java:118)\r\n\tat com.snaplogic.snap.api.ExecutionUtil.execute(ExecutionUtil.java:81)\r\n\tat com.snaplogic.snap.api.SimpleSnap.execute(SimpleSnap.java:70)\r\n\tat com.snaplogic.snaps.netsuite.NetSuiteCommon.executeForSuggest(NetSuiteCommon.java:321)\r\n\tat com.snaplogic.cc.snap.common.SnapRunnableImpl.executeSnap(SnapRunnableImpl.java:813)\r\n\tat com.snaplogic.cc.snap.common.SnapRunnableImpl.executeForSuggest(SnapRunnableImpl.java:662)\r\n\tat com.snaplogic.cc.snap.common.SnapRunnableImpl.doRun(SnapRunnableImpl.java:871)\r\n\tat com.snaplogic.cc.snap.common.SnapRunnableImpl.access$000(SnapRunnableImpl.java:121)\r\n\tat com.snaplogic.cc.snap.common.SnapRunnableImpl$1.run(SnapRunnableImpl.java:410)\r\n\tat com.snaplogic.cc.snap.common.SnapRunnableImpl$1.run(SnapRunnableImpl.java:406)\r\n\tat java.security.AccessController.doPrivileged(Native Method)\r\n\tat javax.security.auth.Subject.doAs(Unknown Source)\r\n\tat org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)\r\n\tat com.snaplogic.cc.snap.common.SnapRunnableImpl.call(SnapRunnableImpl.java:405)\r\n\tat com.snaplogic.cc.snap.common.SnapRunnableImpl.call(SnapRunnableImpl.java:121)\r\n\tat java.util.concurrent.FutureTask.run(Unknown Source)\r\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)\r\n\tat java.util.concurrent.FutureTask.run(Unknown Source)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)\r\n\tat java.lang.Thread.run(Unknown Source)\r\nCaused by: com.fasterxml.jackson.core.JsonGenerationException: Null key for a Map not allowed in JSON (use a converting NullKeySerializer?)\r\n\tat com.fasterxml.jackson.databind.ser.impl.FailingSerializer.serialize(FailingSerializer.java:35)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeTypedFields(MapSerializer.java:801)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeFields(MapSerializer.java:524)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeWithType(MapSerializer.java:503)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeWithType(MapSerializer.java:29)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeTypedFields(MapSerializer.java:803)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeFields(MapSerializer.java:524)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeWithType(MapSerializer.java:503)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeWithType(MapSerializer.java:29)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeTypedFields(MapSerializer.java:803)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeFields(MapSerializer.java:524)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeWithType(MapSerializer.java:503)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeWithType(MapSerializer.java:29)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeTypedFields(MapSerializer.java:803)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeFields(MapSerializer.java:524)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeWithType(MapSerializer.java:503)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeWithType(MapSerializer.java:29)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeTypedFields(MapSerializer.java:803)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeFields(MapSerializer.java:524)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeWithType(MapSerializer.java:503)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeWithType(MapSerializer.java:29)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeTypedFields(MapSerializer.java:803)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeFields(MapSerializer.java:524)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeWithType(MapSerializer.java:503)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeWithType(MapSerializer.java:29)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeTypedFields(MapSerializer.java:803)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeFields(MapSerializer.java:524)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:469)\r\n\tat com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:29)\r\n\tat com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:130)\r\n\tat com.fasterxml.jackson.databind.ObjectMapper._configAndWriteValue(ObjectMapper.java:3559)\r\n\tat com.fasterxml.jackson.databind.ObjectMapper.writeValue(ObjectMapper.java:2893)\r\n\tat com.snaplogic.document.parser.DocumentStreamWriter.write(DocumentStreamWriter.java:54)\r\n\tโฆ 35 more\r\nโ,
โreasonโ: โException while writing document to the underlying stream.โ,
โresolutionโ: โPlease verify that the incoming data is valid and sufficient for the requestโ,
โstatus_codeโ: โerrorโ,
โsnap_detailsโ: {
โlabelโ: โNetSuite Getโ,
โinstance_idโ: โ99864440-8152-4930-81c4-9868315e6537โ,
โclass_idโ: โcom-snaplogic-snaps-netsuite-lookupโ,
โbuild_tagโ: โsnapsmrc528โ,
โviewsโ: {
โinโ: {
โinput0โ: {
โcountโ: 1
}
},
โoutโ: {
โoutput0โ: {
โcountโ: 0
}
},
โerrorโ: {
โerror0โ: {
โcountโ: 0
}
}
}
},
โoriginalโ: {
โbaseRefโ: {
โinternalIdโ: โ57254โ,
โtypeโ: โcustomerโ
}
}
}
]
Please let me know if you need any other information
Thanks,
Abhinav.
โ11-15-2019 10:06 AM
What exactly do you mean by โit keeps on loadingโ? Does the snap appear to still be running?
The issue is that when the snap is writing the SOAP response as a document to the output view, itโs encountering an exception due to a null key somewhere in the document. To diagnose this issue further, weโre going to need to understand what the raw SOAP response looks like. The best way to do this is using the NetSuite UI via the โSetup | Integration | SOAP Web Services Usage Logโ screen. You may need someone else with Administrator privilege to do this. Find the Get request that the snap is making, click on Response in the last column, and send us the results. I realize this may be sensitive data that shouldnโt be shared in this public forum. I would suggest opening a support ticket with SnapLogic support containing all the information and referencing this post. Or if you like, you can email the SOAP response to me at ptaylor@snaplogic.com. But I may still end up asking you to create a support ticket. Itโs fine to replace sensitive data in the response with โโฆโ or โxxxโ or the like, but please try to keep most of it intact.
โ11-12-2020 05:14 AM
Hi Taylor,
I am having the same issue as abhinav.
After further analysis i figured out that it only works on Pipeline Execute mode(not validate) because one of the node in the NetSuite Reponse has some special character and SnapLogic might be trying to parse it.
I have reviewed the NetSuite Response Log and came to the conclusion.
Below is the node with special character:
<listRel:customFieldList xmlns:platformCore="urn:core_2020_1.platform.webservices.netsuite.com">
<platformCore:customField xsi:type="platformCore:BooleanCustomFieldRef" scriptId="XX" internalId="XX">
<platformCore:value>false</platformCore:value>
</platformCore:customField>
<platformCore:customField xsi:type="platformCore:BooleanCustomFieldRef" scriptId="XX" internalId="XX">
<platformCore:value>false</platformCore:value>
</platformCore:customField>
<platformCore:customField xsi:type="platformCore:StringCustomFieldRef">
<platformCore:value><a href='#' onclick='javascript:var regno = trim( nlapiGetFieldValue("vatregnumber"));if (regno != null && regno != ""){var countryCode = trim( regno.substr(0, 2) ); var vatno = trim( regno.substr(2) ); var url = ["http://ec.europa.eu/taxation_customs/vies/vatResponse.html?memberStateCode="];url.push(countryCode);url.push("&number=" + vatno);url.push("&traderName=&traderStreet=&traderPostalCode=&traderCity=&requesterMemberStateCode=&requesterNumber=&action=check&check=Verify");var taxsiteurl = url.join("");var respObject = nlapiRequestURL( taxsiteurl );var response = respObject.getBody();if ( response.indexOf("invalidStyle") > -1 ) { alert( "VAT Registration number "+ regno + " is NOT valid."); }else if (response.indexOf("validStyle") > -1) { alert( "VAT Registration number " + regno + " is valid."); }} else {alert("VAT Registration number is empty.");}'>Click this link to check VAT Reg No.</a></platformCore:value>
</platformCore:customField>
</listRel:customFieldList>