cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Issue with Netsuite Get Snap

abhinav
New Contributor

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.

image

Input to Netsuite Get :
image

Error View:
image

output View:
image

11 REPLIES 11

ptaylor
Employee
Employee

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.

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
image

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.

ptaylor
Employee
Employee

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.

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>&lt;a href='#' onclick='javascript:var regno = trim( nlapiGetFieldValue("vatregnumber"));if (regno != null &amp;&amp; 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("&amp;number=" + vatno);url.push("&amp;traderName=&amp;traderStreet=&amp;traderPostalCode=&amp;traderCity=&amp;requesterMemberStateCode=&amp;requesterNumber=&amp;action=check&amp;check=Verify");var taxsiteurl = url.join("");var respObject = nlapiRequestURL( taxsiteurl );var response = respObject.getBody();if ( response.indexOf("invalidStyle") &gt; -1 ) { alert( "VAT Registration number "+ regno + " is NOT valid."); }else if (response.indexOf("validStyle") &gt; -1) { alert( "VAT Registration number " + regno + " is valid."); }} else {alert("VAT Registration number is empty.");}'&gt;Click this link to check VAT Reg No.&lt;/a&gt;</platformCore:value>
                    </platformCore:customField>
                </listRel:customFieldList>