I have been trying to get the “invoke Java method” activity to work for a while now, and I have run into the error:
21.4.4+Branch.master.Sha.a8b5101efe02651274064093e9c7410fedff7696
Source: Invoke Java Method
Message: The method could not be invoked.
Exception Type: System.InvalidOperationException
RemoteException wrapping System.InvalidOperationException: The method could not be invoked. —> RemoteException wrapping System.InvalidOperationException: The result from java could not be deserialized. —> RemoteException wrapping System.ArgumentNullException: String reference not set to an instance of a String.
Parameter name: s
at System.Text.Encoding.GetBytes(String s)
at UiPath.Java.Service.JavaResponse.Deserialize(String json)
— End of inner exception stack trace —
at UiPath.Java.Service.JavaResponse.Deserialize(String json)
at UiPath.Java.Service.JavaService.d__8.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.Java.JavaInvoker.d__17.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.Java.JavaInvoker.d__14.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.Java.Activities.InvokeJavaMethod.d__16.MoveNext()
— End of inner exception stack trace —
at UiPath.Java.Activities.InvokeJavaMethod.d__16.MoveNext()
— End of stack trace from previous location where exception was thrown —
at UiPath.Shared.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
I am adding a java scope to work within, loading a jar file and then using the invoke java method call. I have a target type in as it is a static function I am trying to call. Any suggestions on what could be causing this issue? Thanks.