Bug 615952 - Upgrade JON2.3.1 to JON2.4GA_QA with oracle gives error -SQLException: ORA-02296: cannot enable (RHQ.) - null values found
Summary: Upgrade JON2.3.1 to JON2.4GA_QA with oracle gives error -SQLException: ORA-02...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Database
Version: 3.0.0
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: ---
: ---
Assignee: Joseph Marques
QA Contact: Rajan Timaniya
URL:
Whiteboard:
Depends On:
Blocks: jon-sprint12-bugs 614432
TreeView+ depends on / blocked
 
Reported: 2010-07-19 11:13 UTC by Rajan Timaniya
Modified: 2010-08-12 16:52 UTC (History)
2 users (show)

Fixed In Version: 2.4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-08-12 16:52:51 UTC
Embargoed:


Attachments (Terms of Use)
screenshot (67.76 KB, image/png)
2010-07-19 11:13 UTC, Rajan Timaniya
no flags Details
rhq-installer-dbupgrade log (104.24 KB, text/x-log)
2010-07-19 11:17 UTC, Rajan Timaniya
no flags Details
server log (27.33 KB, text/x-log)
2010-07-19 11:18 UTC, Rajan Timaniya
no flags Details

Description Rajan Timaniya 2010-07-19 11:13:22 UTC
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.

Comment 1 Rajan Timaniya 2010-07-19 11:17:39 UTC
Created attachment 432830 [details]
rhq-installer-dbupgrade log

Comment 2 Rajan Timaniya 2010-07-19 11:18:54 UTC
Created attachment 432831 [details]
server log

Comment 3 Joseph Marques 2010-07-19 14:47:48 UTC
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

Comment 4 Joseph Marques 2010-07-19 20:24:34 UTC
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.

Comment 5 Rajan Timaniya 2010-07-21 12:38:59 UTC
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

Comment 6 Corey Welton 2010-08-12 16:52:51 UTC
Mass-closure of verified bugs against JON.


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