Skip to main content

Hi Team,

 

I have created instance of a REST Service in K2 Management and generated smart objects for all REST functions.

When i try to invoke smart object  from Smart object tester.exe (which is mapped to REST function, which inturn updates a string column in database table), database table gets updates as per the REST function, but i get error as shown in attached image.

 

I have tried Refreshing REST service instance in K2, i have tried creating service instance freshly, still i get same error, any suggestion or help will be appreciated.

 

Below is the error log details:
-----------------------------------------------------------------------------------------------------------------------------------------------

 


Severity: Error
Error Message: Broker execution failed. (Inner: Object reference not set to an instance of an object.)
InnerException Message:

","anonymous","0.0.0.0","<<K2ServerName>>:D:Program Files (x86)K2 blackpearlHost ServerBin","37101320","a9b3890ebae4426f8e3aa692a5bed683",""
"37101326","20*personal details removed*:57:47","Error","General","28083","ExtenderExecuteError","ProcessInstance.HandleException","28083 ServerEvent: Service:<RESTServiceName>>
Severity: Error
Error Message: Broker execution failed. (Inner: Object reference not set to an instance of an object.)
InnerException Message:


Server stack trace:
at SourceCode.Workflow.Runtime.Extenders.CodeExtender.OnExecute(Object context, XmlElement data, ResolverManager resolverManager)
at SourceCode.Workflow.Runtime.Extenders.ResolverExtenderBase.Execute(Object context, String data)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Objectb] args, Object server, Objectb]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

Exception rethrown at n0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at SourceCode.Workflow.Runtime.IK2Extender.Execute(Object context, String data)
at SourceCode.KO.ProcessInstance.ExecuteExtender(Guid A_0, State A_1, ContextType A_2, Object A_3, Int32 A_4, String A_5, Guid A_6)
InnerException: Exception has been thrown by the target of an invocation.
at System.RuntimeMethodHandle.InvokeMethod(Object target, Objectb] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Objectb] parameters, Objectb] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Objectb] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Objectb] providedArgs, ParameterModifieri] modifiers, CultureInfo culture, Stringt] namedParams)
at SourceCode.Workflow.Runtime.Extenders.CodeExtender.OnExecute(Object context, XmlElement data, ResolverManager resolverManager)
InnerException: Service: <<RESTServiceName>>
Severity: Error
Error Message: Broker execution failed. (Inner: Object reference not set to an instance of an object.)
InnerException Message:

at SourceCode.Workflow.SmartWizards.Runtime.Resolver.SmartWizardJsonResolver.ResolveSmartWizardData()
at ExtenderProject_9417e8026a0948519f3594dc6a3ed6ea.EventItem_5916663bfce24535b38e9bacd4825f43.Main(EventItemContext_5916663bfce24535b38e9bacd4825f43 K2) in c:Users<<LoggedInUserName>>AppDataLocalTempExtenderProjectsCSWinWF-9417e8026a0948519f3594dc6a3ed6eaEventItem_5916663bfce24535b38e9bacd4825f43.cs:line 28","","","<<K2ServerName>>:D:Program Files (x86)K2 blackpearlHost ServerBin","37101326","80ebca9a58464dd3815f7a194967bcac",""

-----------------------------------------------------------------------------------------------------------------------------------------------


16555iE6DB85A18BA75B04.png

Hi nandy029


 


Object reference is a generic error and it means that there is a missing or null value somewhere.


Most likely the issue in the REST api.


 


I have seen similar issue and it was down to missing the host property.


 


What version of K2 are you using? 


Can you attach the descriptor/swagger file?


Thanks for the response

 

 

 

 

 

 

 

 


Reply