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:
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)
in master https://github.com/rhq-project/rhq/commit/1156a523840cbb191e8308d5f5a4ed45c50fe423
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.
Verified on Version : 3.3.0.GA Update 03 Build Number : e4b348a:2f80c8c Added bz1242563 to capture documentation work
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