Globally uncaught Exception shown in the JBoss ON UI when trying to display orphaned operation schedule
Environment
- Red Hat JBoss Operations Network (JON) 3.2
- An operation is created for resource (i.e.
platform) by the user (i.e.testUser); This operation is configured to be repeatedly executed; - User
testUseris deleted from JBoss ON UI -> Administration -> Users page by superuserrhqadmin; - The superuser
rhqadminnavigate to the operation schedule page for resourceplatform;
Issue
- Globally uncaught Exception shown in the JBoss ON UI when trying to display orphaned operation schedule
- When attempting to remove a resource group (dynagroup of agent launcher scripts), we fail with this in the server log:
10:08:24,994 ERROR [org.jboss.as.ejb3.invocation] (http-/0.0.0.0:7443-2) JBAS014134: EJB Invocation failed on component OperationManagerBean for method public abstract java.util.List org.rhq.enterprise.server.operation.OperationManagerRemote.findScheduledGroupOperations(org.rhq.core.domain.auth.Subject,int) throws java.lang.Exception: javax.ejb.EJBTransactionRolledbackException: Cannot schedule an operation without a user associated with it
...
...
Caused by: java.lang.NullPointerException: Cannot schedule an operation without a user associated with it
...
Resolution
This is a bug and two Bugzillas have been created to address this issue:
- This content is not included.Enhancement Bugzilla 1173148 for JBoss ON that requests different message in the log file when trying to execute orphaned operation after the user is deleted;
- This content is not included.Red Hat Bugzilla 1173164 reports the Globally Uncaught Exception that is shown in the JBoss ON UI when
rhqadminuser tries to navigate to the operation schedule page and this will be fixed in a future releases of JBoss ON.
In the meantime, to remove orphaned operation schedule, the following can be done:
- Backup existing JBoss ON Database;
- In the following SQL commands replace
<deleted_user>with the name of the deleted user (for instancetestUser) and execute commands using any database tool 1:
2a. DELETE FROM rhq_operation_schedule WHERE job_name IN (SELECT job_name FROM rhq_operation_history WHERE subject_name = '<deleted_user>');
2b. DELETE FROM rhq_qrtz_triggers WHERE job_name IN (SELECT job_name FROM rhq_operation_history WHERE subject_name = '<deleted_user>');
2c. DELETE FROM rhq_qrtz_simple_triggers WHERE trigger_name IN (SELECT trigger_name FROM rhq_qrtz_triggers WHERE job_name IN (SELECT job_name FROM rhq_operation_history WHERE subject_name = '<deleted_user>'));
2d. DELETE FROM rhq_qrtz_job_details WHERE job_name IN (SELECT job_name FROM rhq_operation_history WHERE subject_name = '<deleted_user>');
2e. COMMIT;
1
Note: Do not use JBoss ON UI to execute above SQLs (i.e. http://jon.server.example.com:7080/coregui/#Test/ServerAccess/SQL) as auto-commit does not work. This SQL utility is JBoss ON internal utility and as such it is not recommended to be used by customers.
SBR
Product(s)
Category
Tags
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.