web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Service Based Architecture - NullReferenceException

(0) ShareShare
ReportReport
Posted on by

I think I must be installing or configuring something incorrectly, but I'm not sure what. On two different servers groups, I have installed the Service Based Architecture components and calls to https://myserver/GPService/Tenants(DefaultTenant)/Companies(MyCompany)/Utility/Ping return with a success. However, whenever I call any method to retrieve actual data (using the URLs provided by the Discovery pages, for example https://myserver/GPService/Tenants(DefaultTenant)/Companies(MyCompany)/Dynamics/Inventory/Items), I get something similar to the following in the GP Dexterity Service instance log:

12:31:15.915 | [*Error*]::Request Exception (pipeline - unexpected) :: System.NullReferenceException: Object reference not set to an instance of an object.
   at si_inst_object_typeset(PROCESS* cur_process, UInt16 cmd, ATSI* atsi1, ADDR* addr1, ATSI* atsi2, ADDR* addr2)
   at script_run_with_args(SCRIPT_TYPE_TAG , Int16 , Int16 , UInt32 , Void** )
   at DtwVSToolsScripts.Invoke(Int16 script_type, Int16 script_id, Int16 form_id, Argument[] argArray)
   at AppDispatch.InvokeScript(Int16 scriptType, String scriptName, String formName, Argument[] arguments)
   at Microsoft.Dexterity.Bridge.AppController.Invoke(Script script, Argument[] args, Int32 options)
   at Microsoft.Dexterity.Applications.DynamicsDictionary.ServiceGetItemListProcedure.Invoke(Field`1& ItemList)
   at Microsoft.Dexterity.Applications.DynamicsDictionary.ServiceGetItemListProcedure.Invoke(IRequestParser parser, IResponseBuilder builder)
   at Microsoft.Dynamics.GP.Svc.DexterityProcess.DexInterop.ScriptExecutionHandler.ExecuteForegroundScripts(ExecutionContext context)
   at Microsoft.Dynamics.GP.Svc.DexterityProcess.DexInterop.Steps.ForegroundStep.ExecuteInternal(ExecutionContext context)
   at Microsoft.Dynamics.GP.Svc.DexterityProcess.DexInterop.ExecutionPipeline.Execute(ExecutionContext context)
12:31:16.025 | [*Error*]::***** PROCESS IS TERMINATING -- UNEXPECTED EXCEPTION CAUGHT OR DIRTY STATE DETECTED *****

Just for complete disclosure, in both cases I have configured one server to be the host for the GPService and the other to actually run all of the instances. From what I can tell, that's a non-factor, though, because the calls are clearly being routed to the correct machine (otherwise, the error wouldn't be logged where I found it).

*This post is locked for comments

I have the same question (0)
  • Melissa Brown Profile Picture
    190 on at

    Paul, were you able to get around this error?  I am having the exact same error.

  • Verified answer
    Community Member Profile Picture
    on at

    Yes. I forgot to post an update here...

    I actually ended up having to open a case with Microsoft and it turns out that sometimes the GP client installs the Service Enabled Procedures incorrectly. If you go to configure security to one of these procedures (see the Web Service Security section of my blog post on the topic at http://blog.interdynartis.com/using-the-dynamics-gp-service-based-architecture) and you don't see any procedures at all, then you're having the issue I was having. In essence, the procedure is missing and the wrapper doesn't handle the missing procedure gracefully, so you just get a null reference exception.

    At any rate, if you completely uninstall the client (including the Dexterity runtime and C++ library dependencies that normally install as soon as you launch the Setup application from the "DVD") and then re-install it, it seems to fix whatever the issue is, the Service Enabled Procedures will appear and you'll stop getting the exception.

  • Melissa Brown Profile Picture
    190 on at

    Paul, thank you so much for the update!  I did what you suggested and still did not see any Service Enabled Procedures.  I looked at my own local GP install and that also did not see any Service Enabled Procedures so I did some digging to find out at what point these were actually installed.  I came across this blog post of David's (community.dynamics.com/.../microsoft-dynamics-gp-2015-not-showing-service-enabled-procedures) and yes, I was using a modified forms dictionary.  I changed the forms dictionary back to unmodified and then the Service Enabled Procedures appeared and json, xml and POSTMAN now return data all the time!  Whew!!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Shravan Attelli Profile Picture

Shravan Attelli 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans