Created attachment 432827 [details] screenshot Description of problem: Upgrade JON2.3.1 to JON2.4GA_QA with oracle gives error - 2010-07-19 16:09:21,770 INFO [STDOUT] Executing: INSERT INTO rhq_alert_notif_log ( id, alert_id, sender, result_state, message ) SELECT RHQ_ALERT_NOTIF_LOG_ID_SEQ.nextval, notifAlertId, notifSender, notifResultState, notifMessage FROM ( SELECT notif.alert_id AS notifAlertId, 'System Users' AS notifSender, 'DEFERRED_EMAIL' AS notifResultState, 'Sending to subjects: '||notif.subjects AS notifMessage FROM rhq_alert_notif_log notif WHERE notif.subjects IS NOT NULL ) 2010-07-19 16:09:21,816 INFO [STDOUT] Executing: INSERT INTO rhq_alert_notif_log ( id, alert_id, sender, result_state, message ) SELECT RHQ_ALERT_NOTIF_LOG_ID_SEQ.nextval, notifAlertId, notifSender, notifResultState, notifMessage FROM ( SELECT notif.alert_id AS notifAlertId, 'System Roles' AS notifSender, 'DEFERRED_EMAIL' AS notifResultState, 'Sending to roles: '||notif.roles AS notifMessage FROM rhq_alert_notif_log notif WHERE notif.roles IS NOT NULL ) 2010-07-19 16:09:21,819 INFO [STDOUT] Executing: INSERT INTO rhq_alert_notif_log ( id, alert_id, sender, result_state, message ) SELECT RHQ_ALERT_NOTIF_LOG_ID_SEQ.nextval, notifAlertId, notifSender, notifResultState, notifMessage FROM ( SELECT notif.alert_id AS notifAlertId, 'Direct Emails' AS notifSender, 'DEFERRED_EMAIL' AS notifResultState, 'Sending to addresses: '||notif.emails AS notifMessage FROM rhq_alert_notif_log notif WHERE notif.emails IS NOT NULL ) 2010-07-19 16:09:21,833 INFO [STDOUT] Executing: INSERT INTO rhq_alert_notif_log ( id, alert_id, sender, result_state, message ) SELECT RHQ_ALERT_NOTIF_LOG_ID_SEQ.nextval, notifAlertId, notifSender, notifResultState, notifMessage FROM ( SELECT alert.id AS notifAlertId, 'Resource Operations' AS notifSender, 'SUCCESS' AS notifResultState, 'Executed "'||alert.triggered_operation||'" on this resource' AS notifMessage FROM rhq_alert alert WHERE alert.triggered_operation IS NOT NULL ) 2010-07-19 16:09:24,950 FATAL [org.rhq.enterprise.installer.ServerInformation] Cannot upgrade the database schema - RHQ Server will not run properly java.lang.RuntimeException: Cannot run ANT on script [/NotBackedUp/install/jontag69/jon-server-2.4.0.GA_QA/logs/db-upgrade.xml]. Cause: /NotBackedUp/install/jontag69/jon-server-2.4.0.GA_QA/logs/db-upgrade.xml:27: Failed to upgrade - error in spec version [2.70.8]. Cause: Error executing the task [org.rhq.core.db.ant.dbupgrade.SST_AlterColumn] in schema spec version [2.70.8]. Cause: Failed to alter column. Cause: java.sql.SQLException: ORA-02296: cannot enable (RHQ.) - null values found at org.rhq.enterprise.installer.ServerInformation.startAnt(ServerInformation.java:785) at org.rhq.enterprise.installer.ServerInformation.upgradeExistingDatabaseSchema(ServerInformation.java:276) at org.rhq.enterprise.installer.ConfigurationBean.save(ConfigurationBean.java:735) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ... QE Environment: Platform : RHEL 5.5 Database: Oracle 10g Java: Sun JDK1.6 Version-Release number of selected component (if applicable): version: 2.4.0.GA_QA build number: 10852:16ea29a JON tag-jon-release (build #69) How reproducible: Always Steps to Reproduce: 1) Install JON2.3.1 & agent with Oracle 10g 2) Create alerts (i) Name: Platform_alert_test [Type: Linux (Platform)] If Condition: Free Memory > 0.1B Dampening Rule: Each time condition set is true Action Filters: Disable alert until re-enabled manually or by recovery alert: false Notify Other Recipients: Eamil - rtimaniy (ii)Name: JBOSSAS_JVM_ALERT [Type: JBoss AS JVM (Server)] If Condition: Availability goes DOWN Dampening Rule: Each time condition set is true Action Filters: Disable alert until re-enabled manually or by recovery alert : false Notify Other Recipients: Eamil - rtimaniy (iii)Name:RHQ_Agent_JVM_Active_Threads_Alert [Type: RHQ Agent(Server)] If Condition: JVM Active Threads > -1.0 Dampening Rule: Each time condition set is true Action Filters: Disable alert until re-enabled manually or by recovery alert: false Notify Other Recipients: Eamil - rtimaniy Notify Roles (All Resources Role, Super User Role) Notify JON Users (username - rhqadmin) 3) Stop JON2.3.1 server (don't stop agent) 4) Upgrad JON2.3.1 to JON2.4GA_QA Actual results: Upgrade JON2.3.1 to JON2.4GA_QA with oracle gives error -SQLException: ORA-02296: cannot enable (RHQ.) - null values found Expected results: Upgrade JON2.3.1 to JON2.4GA_QA should not give error. Additional info: Please refer attached files for screenshot and log.
Created attachment 432830 [details] rhq-installer-dbupgrade log
Created attachment 432831 [details] server log
commit c043ed77936cd2a3e03a608383755093191eb5b6 Author: Joseph Marques <joseph> Date: Mon Jul 19 10:43:04 2010 -0400 BZ-615952: ensure old alertNotification/Log rows are removed during upgrade
Tested formal upgrade from RHQ 1.3.0 (JON 2.3.0) to RHQ 3.0.0, and the entire process completed successfully. I made sure to have one of each type of notification (subject, role, email, snmp, operation) prior to the upgrade, and I saw no errors during the db-upgrade execution. Database was upgraded to schemaSpec 2.91 successfully.
Verified on JON2.4 (build #71) version: 2.4.0.GA_QA build number: 10860:2ca5643 Upgrade JON2.3.1 to JON2.4GA_QA (build #71) without error - SQLException: ORA-02296: cannot enable (RHQ.) - null values found
Mass-closure of verified bugs against JON.