Met errors when called java code

when I tryed to call Java code,which inserting data into DB postgre ,I got some err msg like:
[System.NullReferenceException: Object reference not set to an instance of an object.\r\n at UiPath.Java.JavaObject.ConvertT\r\n at UiPath.Java.Activities.ConvertJavaObject`1.Execute(CodeActivityContext context)\r\n at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)\r\n at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)\r\n at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)",
“level”: “Information”,
“logType”: “User”,
“timeStamp”: “09:37:03”,
“fileName”: “Main”,
“processVersion”: “1.0.0”,
“jobId”: “…”,
“robotName”: “…”,
“machineId”: 0
} ]

my Java code can be executed successfully by myself, how can I deal with this problem hope someone can help me ,thx

@Yes_RPG

It’s a Null Exception, can you share your workflow with the required code?

OR

You can check which is getting Null while passing the variables?

Thanks

thx for help,now I can execute Java code successfully,but another problem occured,I try to execute SQL for DB postgre,when I ran the UIpath program to call it ,it showed me:‘java.sql.SQLException: No suitable driver found for jdbc:postgresql://IP:Port/DBName‘, have u seen this problem before?

@Yes_RPG

You can check below thread

Hope this may help you

Thanks

thx for replying, i had resolved this problem

1 Like

@Yes_RPG

Glad it helped

Please close this thread by clicking on Mark as Solution to the post which helped you
So that others can benefit

Thanks

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.