Open wixdonkey opened 4 years ago
Hi @wixdonkey I will take a look. Meanwhile, have you tried setting Java Library Path in Java Scope to point to java.exe on your computer ?
Hi @cosmyo, Thank for your help in advance!
I already set the Java Library Path. But even if I do nothing but just initialize the java scope, there's always an initial error. The below are some details, hope it will help.
Here is my java home env:
Here is my scenario:
From my perspective, I think it's not about the Java Library Path. Since if I don't set the path, Java Libarary will get the path from ENV PATH.
The java scope activity guide wrote: Java Library Path - The path to the Java Library Executable java.exe file. If no path is supplied in this property, the Java Library will be loaded from the PATH environment variable. This field supports only strings and String variables. https://docs.uipath.com/activities/docs/java-scope
Describe the bug
Java Scope: Error intializing Java : System.NullReferenceException: Object reference not set to an instance of an object.
To Reproduce Steps to reproduce the behavior:
Press 'Run' button, then raise the error as follow:
19.7.0+Branch.master.Sha.8c253d13718eed5c7db27daef6facd1fe1b0d067
Source: Java Scope
Message: Error intializing Java : System.NullReferenceException: Object reference not set to an instance of an object. at UiPath.Java.Service.JavaService.b__7_2(IAsyncResult ar)
at System.Threading.Tasks.TaskFactoryd7.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 10.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.JavaScope.d__12.MoveNext()
1.FromAsyncCoreLogic(IAsyncResult iar, Func
2 endFunction, Action1 endAction, Task
1 promise, Boolean requiresSynchronization) --- 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.Service.JavaService.Exception Type: System.InvalidOperationException
RemoteException wrapping System.InvalidOperationException: Error intializing Java : System.NullReferenceException: Object reference not set to an instance of an object. at UiPath.Java.Service.JavaService.b__7_2(IAsyncResult ar)
at System.Threading.Tasks.TaskFactoryd7.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 10.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.JavaScope.d__12.MoveNext()
at UiPath.Shared.Activities.AsyncTaskNativeImplementation.BookmarkResumptionCallback(NativeActivityContext context, Object value)
at UiPath.Shared.Activities.AsyncTaskNativeActivity.BookmarkResumptionCallback(NativeActivityContext context, Bookmark bookmark, Object value)
at System.Activities.Runtime.BookmarkCallbackWrapper.Invoke(NativeActivityContext context, Bookmark bookmark, Object value)
at System.Activities.Runtime.BookmarkWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
1.FromAsyncCoreLogic(IAsyncResult iar, Func
2 endFunction, Action1 endAction, Task
1 promise, Boolean requiresSynchronization) --- 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.Service.JavaService.Expected behavior Could popup the messagebox as the expectation.
Screenshots
![2](https://user-images.githubusercontent.com/10431159/61618323-2f02c900-ac9f-11e9-8416-ce3560e1aa27.png)
Desktop (please complete the following information):
Additional context Download the example from below: https://activities.uipath.com/docs/running-static-and-object-methods