6 Replies Latest reply on Aug 13, 2013 8:26 AM by jay shaughnessy

    RHQ 4.9 - Installation fails with ANT task on dbupgrade

    Stian Lund Expert

      Hello,

       

      in reference to a reported bug:

      https://bugzilla.redhat.com/show_bug.cgi?id=980765

      I have tried to install RHQ 4.9 from a snapshot to see if the error is gone.

       

      Unfortunately the installer fails during what seems to be an Ant task. It seems the task fails, it tries to start the RHQ Server but has not been able to customize standalone.xml so it hangs forever waiting for the server to start.

       

      Since I already had 4.8 running, I just did the basic steps for upgrade:

      rhqctl upgrade --from-server-dir /opt/rhq/rhq-server-OLD

       

      Have tried with customizing the rhq-server.properties beforehand as I am used to, and also not doing it. Fails both times.

       

      Everything seemed OK until it came to the db-upgrade task.

       

      Running on RHEL 6.4, Java 1.7.0.17.

      Upgrading from RHQ 4.8.

       

      The error seems to be caused by some schema inconsistencies.

       

      Attaching logs from the process.

       

      Relevant output of error from rhq-installer.log:

       

       

      {code}
      10:28:11,832 INFO  [org.rhq.enterprise.server.installer.InstallerServiceImpl] Database schema exists - it will now be updated. 10:28:12,617 ERROR [org.rhq.enterprise.server.installer.ServerInstallUtil] Cannot upgrade the database schema - the server will not run properly.: java.lang.RuntimeException: Cannot run ANT on script [/opt/rhq/rhq-server/logs/db-upgrade.xml]. Cause: /opt/rhq/rhq-server/logs/db-upgrade.xml:27: Failed to upgrade - error in spec version [2.134]. Cause: Error executing the task [org.rhq.core.db.ant.dbupgrade.SST_JavaTask] in schema spec version [2.134]. Cause: Java Task Error: class=[java.lang.ClassCastException: java.math.BigDecimal cannot be cast to java.lang.Integer]      at org.rhq.enterprise.server.installer.ServerInstallUtil.startAnt(ServerInstallUtil.java:1324) [rhq-installer-util-4.9.0-SNAPSHOT.jar:4.9.0-SNAPSHOT]      at org.rhq.enterprise.server.installer.ServerInstallUtil.upgradeExistingDatabaseSchema(ServerInstallUtil.java:1186) [rhq-installer-util-4.9.0-SNAPSHOT.jar:4.9.0-SNAPSHOT]      at org.rhq.enterprise.server.installer.InstallerServiceImpl.prepareDatabase(InstallerServiceImpl.java:464) [rhq-installer-util-4.9.0-SNAPSHOT.jar:4.9.0-SNAPSHOT]      at org.rhq.enterprise.server.installer.InstallerServiceImpl.install(InstallerServiceImpl.java:258) [rhq-installer-util-4.9.0-SNAPSHOT.jar:4.9.0-SNAPSHOT]      at org.rhq.enterprise.server.installer.Installer.doInstall(Installer.java:115) [rhq-installer-util-4.9.0-SNAPSHOT.jar:4.9.0-SNAPSHOT]      at org.rhq.enterprise.server.installer.Installer.main(Installer.java:56) [rhq-installer-util-4.9.0-SNAPSHOT.jar:4.9.0-SNAPSHOT]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_17]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_17]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_17]      at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_17]      at org.jboss.modules.Module.run(Module.java:262) [jboss-modules.jar:1.2.0.CR1]      at org.jboss.modules.Main.main(Main.java:329) [jboss-modules.jar:1.2.0.CR1] Caused by: /opt/rhq/rhq-server/logs/db-upgrade.xml:27: Failed to upgrade - error in spec version [2.134]. Cause: Error executing the task [org.rhq.core.db.ant.dbupgrade.SST_JavaTask] in schema spec version [2.134]. Cause: Java Task Error: class=[java.lang.ClassCastException: java.math.BigDecimal cannot be cast to java.lang.Integer]      at org.rhq.core.db.ant.dbupgrade.DBUpgrader.execute(DBUpgrader.java:314) [rhq-core-dbutils-4.9.0-SNAPSHOT.jar:4.9.0-SNAPSHOT]      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [ant-1.6.5.jar:1.6.5]      at org.apache.tools.ant.Task.perform(Task.java:364) [ant-1.6.5.jar:1.6.5]      at org.apache.tools.ant.Target.execute(Target.java:341) [ant-1.6.5.jar:1.6.5]      at org.apache.tools.ant.Target.performTasks(Target.java:369) [ant-1.6.5.jar:1.6.5]      at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [ant-1.6.5.jar:1.6.5]      at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [ant-1.6.5.jar:1.6.5]      at org.rhq.enterprise.server.installer.ServerInstallUtil.startAnt(ServerInstallUtil.java:1321) [rhq-installer-util-4.9.0-SNAPSHOT.jar:4.9.0-SNAPSHOT]      ... 11 more Caused by: Failed to upgrade - error in spec version [2.134]. Cause: Error executing the task [org.rhq.core.db.ant.dbupgrade.SST_JavaTask] in schema spec version [2.134]. Cause: Java Task Error: class=[java.lang.ClassCastException: java.math.BigDecimal cannot be cast to java.lang.Integer]      at org.rhq.core.db.ant.dbupgrade.DBUpgrader.execute(DBUpgrader.java:300) [rhq-core-dbutils-4.9.0-SNAPSHOT.jar:4.9.0-SNAPSHOT]      ... 18 more Caused by: Error executing the task [org.rhq.core.db.ant.dbupgrade.SST_JavaTask] in schema spec version [2.134]. Cause: Java Task Error: class=[java.lang.ClassCastException: java.math.BigDecimal cannot be cast to java.lang.Integer]      at org.rhq.core.db.ant.dbupgrade.SchemaSpec.execute(SchemaSpec.java:154) [rhq-core-dbutils-4.9.0-SNAPSHOT.jar:4.9.0-SNAPSHOT]      at org.rhq.core.db.ant.dbupgrade.DBUpgrader.execute(DBUpgrader.java:288) [rhq-core-dbutils-4.9.0-SNAPSHOT.jar:4.9.0-SNAPSHOT]      ... 18 more Caused by: Java Task Error: class=[java.lang.ClassCastException: java.math.BigDecimal cannot be cast to java.lang.Integer]      at org.rhq.core.db.ant.dbupgrade.SST_JavaTask.execute(SST_JavaTask.java:91) [rhq-core-dbutils-4.9.0-SNAPSHOT.jar:4.9.0-SNAPSHOT]      at org.rhq.core.db.ant.dbupgrade.SchemaSpec.execute(SchemaSpec.java:149) [rhq-core-dbutils-4.9.0-SNAPSHOT.jar:4.9.0-SNAPSHOT]      ... 19 more Caused by: java.lang.ClassCastException: java.math.BigDecimal cannot be cast to java.lang.Integer      at org.rhq.core.db.upgrade.StorageNodeAddressUpgradeTask.execute(StorageNodeAddressUpgradeTask.java:37) [rhq-core-dbutils-4.9.0-SNAPSHOT.jar:4.9.0-SNAPSHOT]      at org.rhq.core.db.ant.dbupgrade.SST_JavaTask.execute(SST_JavaTask.java:89) [rhq-core-dbutils-4.9.0-SNAPSHOT.jar:4.9.0-SNAPSHOT]      ... 20 more

      {code}