clarencen/lshift — Issue #44: Config store preparation step doesn't work with Oracle
Author: clarencen
Created: 2011-11-14 22:41:29+00:00
State: open

The way HibernateConfigStorePreparationStep checks the schema version number relies on a cast to Int, but the query results in a BigDecimal on Oracle.

Relevant stack trace snippet:

Caused by: java.lang.ClassCastException: java.math.BigDecimal cannot be cast to java.lang.Integer
at scala.runtime.BoxesRunTime.unboxToInt(Unknown Source) ~[scala-library-2.9.0-1.jar:na]
at net.lshift.diffa.kernel.config.HibernateConfigStorePreparationStep$$anonfun$detectVersion$1.apply(HibernateConfigStorePreparationStep.scala:144) ~[diffa-kernel-0.9-SNAPSHOT.jar:na]
at net.lshift.diffa.kernel.config.HibernateConfigStorePreparationStep$$anonfun$detectVersion$1.apply(HibernateConfigStorePreparationStep.scala:144) ~[diffa-kernel-0.9-SNAPSHOT.jar:na]
at net.lshift.diffa.kernel.util.SessionHelper.withSession(SessionHelper.scala:32) ~[diffa-kernel-0.9-SNAPSHOT.jar:na]
at net.lshift.diffa.kernel.config.HibernateConfigStorePreparationStep.detectVersion(HibernateConfigStorePreparationStep.scala:144) ~[diffa-kernel-0.9-SNAPSHOT.jar:na]