Object Reference not set to an instance of Object :Blue Prism Scheduling

sumedha.singh

New Member
Hi All,

I am facing issues while scheduling a process in Blue Prism. The process runs fine when initiated from Control Room but gets terminated when scheduled via Scheduler.
For resources part of view, I have created a Pool1 and assigned my desktop in that. It is showing as idle. Please help what could be reason for this
 

sumedha.singh

New Member
Hi VJR,

I tried that also but no luck. I don't know even how to caught this error.
Even viewer logs says -

VERBOSE [2018-06-08 09:09:34Z UTC]- Schedule 'WPBMAN' - Task 'WPBMAN URL':
Error creating sessions - terminating remaining sessions: System.NullReferenceException: Object reference not set to an instance of an object.
at BluePrism.AutomateAppCore.ScheduledTask.ConnectToResource(clsResourceConnectionManager manager, ScheduledSession sess)
at BluePrism.AutomateAppCore.ScheduledTask.CreateSessions(clsResourceConnectionManager manager, Int32 timeoutMillis)
at BluePrism.AutomateAppCore.ScheduledTask.InternalExecute(ISessionRunnerScheduleLogger log)
 

VJR

Well-Known Member
Hi VJR,

I tried that also but no luck. I don't know even how to caught this error.
Even viewer logs says -

VERBOSE [2018-06-08 09:09:34Z UTC]- Schedule 'WPBMAN' - Task 'WPBMAN URL':
Error creating sessions - terminating remaining sessions: System.NullReferenceException: Object reference not set to an instance of an object.
at BluePrism.AutomateAppCore.ScheduledTask.ConnectToResource(clsResourceConnectionManager manager, ScheduledSession sess)
at BluePrism.AutomateAppCore.ScheduledTask.CreateSessions(clsResourceConnectionManager manager, Int32 timeoutMillis)
at BluePrism.AutomateAppCore.ScheduledTask.InternalExecute(ISessionRunnerScheduleLogger log)
Yes, doesn't seem to be giving a right reason from the error message. Are you able to share a screenshot of the Schedule created.
 

sumedha.singh

New Member
Hi VJR,

PFA, One thing , I have noticed that resource is Idle, I guess it should be online or available.
Please check snapshots.
 

Attachments

  • Schedule.png
    Schedule.png
    36.3 KB · Views: 218
  • Task.png
    Task.png
    33 KB · Views: 195
  • Resource.png
    Resource.png
    5.3 KB · Views: 155
  • Failed log.PNG
    Failed log.PNG
    12.6 KB · Views: 160

VJR

Well-Known Member
Hi Sumedha,

i. Is this issue for this particular Process or for any other process when set to the Scheduler.
ii. And were you able to ever successfully run any process through the Scheduler earlier.
 

sumedha.singh

New Member
Hey VJR,

This is first time, I am creating a process in Blue Prism and trying to run it via scheduler. I have tried running a new process by creating new schedule, but it is showing same error "Object reference not set to instance of object" and sometime showing error as "Resource not available". I guess main issue is with ""Object reference not set to instance of object" error only.

One thing more I noticed that process gets terminated if i start doing something else in desktop. Like the scheduler should run in background even I am doing some other activity in desktop. But in my case, it is trying to run in foreground. Do you know how to fix this also ?
 

VJR

Well-Known Member
Hi Sumedha,

So it looks like any process when scheduled is throwing the error.
Try checking running only 'Once' instead of Hourly/Minutely
Also check if its any time zone issue although there may not be any chances but still worth a check.

"One thing more I noticed that process gets terminated if i start doing something else in desktop"
This appears to be strange.

A few members on the forum have resolved certain issues by restarting the BPServer. But you may want to do it only after knowing its repercussions which may (or may not be) any kind of new issues.
 

sumedha.singh

New Member
Hi VJR,

I have tried running a single instance by drag and drop from control room. At first it was showing pending, then I right click and choose start but it terminated. Process is it launch Internet explorer and logins to email portal but it failed because it cannot click on "Login" button and this happens when I was doing something else in foreground. But when I tried to run Process in foreground (without touching the keyboard keys or doing anything in desktop) it ran successfully.
 

beckhayer

New Member
An Object is an instance of a Class , it is stored some where in memory. A reference is what is used to describe the pointer to the memory location where the Object resides. The message "object reference not set to an instance of an object" (NullReferenceException) means that you are referring to an object the does not exist or was deleted or cleaned up. In order to prevent the error, objects that could be null should be tested for null before being used.

if (mClass != null)
{
// Go ahead and use mClass
mClass.property = ...
}
else
{
// Attempting to use mClass here will result in NullReferenceException
}

A NullReferenceException typically reflects developer error and is thrown in the following scenarios:

Forgotten to instantiate a reference type.
Forgotten to dimension an array before initializing it.
Is thrown by a method that is passed null.
Get a null return value from a method, then call a method on the returned type.
Using an expression to retrieve a value and, although checking whether the value is null.
Enumerating the elements of an array that contains reference types, and attempt to process one of the elements.
 
Top