Error: the result from java could not deserialize

Hi,

when I’m using create java object, giving error as ‘the result from java could not deserialize’.
any idea how to resolve this?

here is my process:-

In my java method .xml file is creating with data.

1 Like

Hi @yasmeen_mirza

Could you give a try with this example?
https://activities.uipath.com/docs/running-static-and-object-methods

Could you also paste here the full error message?

1 Like

i gone through that link only while creating java object. still getting that error.

Error:

19.7.0+Branch.master.Sha.8c253d13718eed5c7db27daef6facd1fe1b0d067

Source: Create Java Object

Message: Constructor could not be called.

Exception Type: System.InvalidOperationException

RemoteException wrapping System.InvalidOperationException: Constructor could not be called. —> 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__15.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.CreateJavaObject.d__8.MoveNext()
— End of inner exception stack trace —
at UiPath.Core.Activities.ScopeActivity.OnFaulted(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

this is the error i got.

From some additional research, it seems like this bug happens when you try to invoke a a java file that has dependency on other libraries/jar.

Could you a scenario where you invoke a single file?

We have it registered as a bug and it will be eventually fixed.

1 Like

@loginerror
i downloaded that example from link what you mentioned in the above comment, it is successfully executing. but when i created sample java code and try to invoke and run it from uipath. i am also facing the same issue like what @yasmeen_mirza mentioned.

Hi @Siddu

The issue is currently with our team. I will update the topic when it will be resolved.

Unfortunately, I cannot provide any estimation when that would be.

@loginerror
Oh! k Thank you.

Hi @loginerror Any updates on this issue?

Any update on this issue . ?

Hi @sampadakumardalai

Welcome to our UiPath Forum! :slight_smile:

It would seem that the issue is still in the backlog. However, given that the Java activity package is open-sourced for anyone to try to fix it, I will mark this topic as #pr-welcome

So that anyone who is browsing for inspiration on our Community GitHub contributions can easily find it and maybe even contribute towards fixing the bug.

5 posts were split to a new topic: Create Java Object throws an error - System.InvalidOperationException: Constructor could not be called

A post was merged into an existing topic: Create Java Object throws an error - System.InvalidOperationException: Constructor could not be called