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>