Bug 1173164 - Globally uncaught Exception shown in the JBoss ON UI when trying to display orphaned operation schedule
Summary: Globally uncaught Exception shown in the JBoss ON UI when trying to display o...
Status: CLOSED ERRATA
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Core Server
Version: JON 3.2.3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ER01
: JON 3.3.3
Assignee: Libor Zoubek
QA Contact: Filip Brychta
URL:
Whiteboard:
Keywords: Triaged
Depends On: 1173166
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-11 15:03 UTC by bkramer
Modified: 2019-02-15 13:56 UTC (History)
6 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2015-07-30 16:41:24 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1525 normal SHIPPED_LIVE Moderate: Red Hat JBoss Operations Network 3.3.3 update 2015-07-30 20:41:08 UTC
Red Hat Knowledge Base (Solution) 1308783 None None None Never

Description bkramer 2014-12-11 15:03:43 UTC
Description of problem:
When user is being deleted, his scheduled operation will not be displayed in the JBoss ON 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):
JBoss ON 3.3.0

How reproducible:
Always

Steps to Reproduce:
1. Create a user "test" with sufficient permissions
2. As "test" user, log in to JBoss ON 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:

Comment 1 Libor Zoubek 2015-06-04 22:36:15 UTC
Pull request sent

https://github.com/rhq-project/rhq/pull/175

Fixed by removing operation schedules (and unscheduling it) when the user
does not exist anymore. This removal does not happen at the time when user
is deleted, it happens when either - user want's to see such schedule (which
refers to missing user) or when scheduled job is about to run (in this case
it is canceled).

I was not able to good find a way how to lookup all scheduled operations by the user being deleted at the time he's deleted - if it was possible we could be able to unschedule the jobs when the user is being deleted. But I don't think it's an issue. Also rescheduling the jobs under different user (probably admin who's deleting the user) might not be good idea. So I think deleting & unscheduling the schedules is the best think to do.

We may need to update documentation, so users are aware of this consequence, on the other hand, it is not a change, because without this bugfix those operations could not be executed anyway.

QE Note: same reprosteps written in description apply to group operations (please verify)

Comment 4 Simeon Pinder 2015-07-10 18:55:25 UTC
Available for test with 3.3.3 ER01 build: 
https://brewweb.devel.redhat.com/buildinfo?buildID=446732
 *Note: jon-server-patch-3.3.0.GA.zip maps to ER01 build of
 jon-server-3.3.0.GA-update-03.zip.

Comment 5 Filip Brychta 2015-07-13 15:13:03 UTC
Verified on
Version :	
3.3.0.GA Update 03
Build Number :	
e4b348a:2f80c8c

Added bz1242563 to capture documentation work

Comment 7 errata-xmlrpc 2015-07-30 16:41:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-1525.html


Note You need to log in before you can comment on or make changes to this bug.