Bug 1173166

Summary: Globally uncaught Exception shown in the RHQ UI when trying to display orphaned operation schedule
Product: [Other] RHQ Project Reporter: bkramer <bkramer>
Component: Core ServerAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 4.12CC: hrupp
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1173164    

Description bkramer 2014-12-11 15:06:41 UTC
Description of problem:
When user is being deleted, his scheduled operation will not be displayed in the RHQ UI and Globally Uncaught Exception will be thrown. The error message in the Message Center is:

**************************************************
java.lang.RuntimeException:Failed to find scheduled operations for Resource[id=10001, uuid=9ccd9a34-1c25-4d1a-b65e-7de93b76fdfa, type={Platforms}Linux, key=example.server.com, name=example.server.com, parent=<null>, version=Linux 2.6.35.14-106.fc14.x86_64].s
   java.lang.RuntimeException:[1418305893660] javax.ejb.EJBException:java.lang.NullPointerException: Cannot schedule an operation without a user associated with it -> java.lang.NullPointerException:Cannot schedule an operation without a user associated with it
--- STACK TRACE FOLLOWS ---
Failed to find scheduled operations for Resource[id=10001, uuid=9ccd9a34-1c25-4d1a-b65e-7de93b76fdfa, type={Platforms}Linux, key=example.server.com, name=example.server.com, parent=<null>, version=Linux 2.6.35.14-106.fc14.x86_64].
   at Unknown.Throwable_2(Unknown Source)
   at Unknown.RuntimeException_2(Unknown Source)
   at Unknown.$onFailure_68(Unknown Source)
   at Unknown.onFailure_459(Unknown Source)
   at Unknown.$onResponseReceived(Unknown Source)
   at Unknown.onResponseReceived_4(Unknown Source)
   at Unknown.$fireOnResponseReceived(Unknown Source)
   at Unknown.onReadyStateChange_0(Unknown Source)
   at Unknown.anonymous(Unknown Source)
   at Unknown.apply(Unknown Source)
   at Unknown.entry0(Unknown Source)
   at Unknown.anonymous(Unknown Source)
   at Unknown.anonymous(Unknown Source)
Caused by: java.lang.RuntimeException: [1418305893660] javax.ejb.EJBException:java.lang.NullPointerException: Cannot schedule an operation without a user associated with it -> java.lang.NullPointerException:Cannot schedule an operation without a user associated with it
   at Unknown.RuntimeException_0(Unknown Source)
   at Unknown.instantiate_32(Unknown Source)
   at Unknown.$instantiate_0(Unknown Source)
   at Unknown.$instantiate(Unknown Source)
   at Unknown.$readObject(Unknown Source)
   at Unknown.$onResponseReceived(Unknown Source)
   at Unknown.onResponseReceived_4(Unknown Source)
   at Unknown.$fireOnResponseReceived(Unknown Source)
   at Unknown.onReadyStateChange_0(Unknown Source)
   at Unknown.anonymous(Unknown Source)
   at Unknown.apply(Unknown Source)
   at Unknown.entry0(Unknown Source)
   at Unknown.anonymous(Unknown Source)
   at Unknown.anonymous(Unknown Source)
***************************************************

Version-Release number of selected component (if applicable):
RHQ 4.12

How reproducible:
Always

Steps to Reproduce:
1. Create a user "test" with sufficient permissions
2. As "test" user, log in to RHQ UI, navigate to the resource and schedule operation to be executed every 2 minutes indefinitely. 
3. Log out and log in again as "rhqadmin" user;
4. Delete "test" user from the system;
5. Navigate to the Operation schedule for the resource defined in the step 2


Actual results:

Operation schedule will not be shown and Globally Uncaught Exception is thrown.


Expected results:
Operation schedule is shown and no exception is thrown.

Additional info: