Opened 18 years ago
Closed 18 years ago
#488 closed defect (fixed)
Upgrade 2.1.1 to 2.2 fails
Reported by: | Nicklas Nordborg | Owned by: | everyone |
---|---|---|---|
Priority: | blocker | Milestone: | BASE 2.2.1 |
Component: | install | Version: | 2.2 |
Keywords: | Cc: |
Description (last modified by )
Here is the stacktrace:
[87%] --Updating schema version: 28 -> 29...12:06:13,579 ERROR Update:1150 - updateToSchemaVersion29: FAILED net.sf.basedb.core.BaseException: Object with id: 1 was not of the specified subclass: net.sf.basedb.core.data.MeasuredBioMaterialData (Discriminator: 0) at net.sf.basedb.core.HibernateUtil.loadList(HibernateUtil.java:1355) at net.sf.basedb.core.Update.updateToSchemaVersion29(Update.java:1105) at net.sf.basedb.core.Update.updateDatabase(Update.java:504) at net.sf.basedb.install.InitDB.main(InitDB.java:69) Caused by: org.hibernate.WrongClassException: Object with id: 1 was not of the specified subclass: net.sf.basedb.core.data.MeasuredBioMaterialData (Discriminator: 0) at org.hibernate.loader.Loader.getInstanceClass(Loader.java:1444) at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1275) at org.hibernate.loader.Loader.getRow(Loader.java:1197) at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:568) at org.hibernate.loader.Loader.doQuery(Loader.java:689) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) at org.hibernate.loader.Loader.doList(Loader.java:2211) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2095) at org.hibernate.loader.Loader.list(Loader.java:2090) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) at net.sf.basedb.core.HibernateUtil.loadList(HibernateUtil.java:1351) ... 3 more
For more info see the mailing list archive: http://sourceforge.net/mailarchive/forum.php?thread_id=31614751&forum_id=12992
Change History (9)
comment:1 by , 18 years ago
Summary: | Updade 2.1.1 to 2.2 fails → Upgrade 2.1.1 to 2.2 fails |
---|
comment:2 by , 18 years ago
Description: | modified (diff) |
---|
comment:3 by , 18 years ago
comment:4 by , 18 years ago
Updating another server gives a similar stack trace as Chrises
[0%] Building database................................................... [30%] Database built successfully.01:49:17,461 WARN BasicResourcePool:972 - Failed to destroy resource: com.mchange.v2.c3p0.impl.NewPooledConnection@dec3c6d java.lang.InterruptedException at com.mysql.jdbc.Connection.realClose(Connection.java:4796) at com.mysql.jdbc.Connection.close(Connection.java:2172) at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:474) at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:191) at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:470) at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:964) at com.mchange.v2.resourcepool.BasicResourcePool.destroyResource(BasicResourcePool.java:989) at com.mchange.v2.resourcepool.BasicResourcePool.removeResource(BasicResourcePool.java:1406) at com.mchange.v2.resourcepool.BasicResourcePool.removeResource(BasicResourcePool.java:1378) at com.mchange.v2.resourcepool.BasicResourcePool.access$300(BasicResourcePool.java:32) at com.mchange.v2.resourcepool.BasicResourcePool$1RefurbishCheckinResourceTask.run(BasicResourcePool.java:1245) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547) [35%] Initialising database... [36%] --Creating quota types... [37%] --Creating quota... [39%] --Creating roles... [40%] --Creating users... [42%] --Creating groups... [43%] --Creating keys... [44%] --Creating protocol types... [46%] --Creating hardware types... [47%] --Creating hardware... [49%] --Creating software types... [50%] --Creating software... [51%] --Creating directories... [53%] --Creating file types... [54%] --Creating MIME types... [56%] --Creating plate geometries... [57%] --Creating plate mappings... [58%] --Creating labels... [60%] --Creating annotation types... [61%] --Creating clients... [63%] --Creating news... [64%] --Creating plugin definitions... [67%] --Creating formulas... [68%] --Creating job agents... [70%] Database initialised successfully. [75%] Updating database... [83%] --Updating schema version: 20 -> 23... [85%] --Updating schema version: 23 -> 24... [85%] --NOTE! The "FileValues" table is no longer used by BASE. It may be removed from the database. [85%] --Updating schema version: 24 -> 25... [86%] --Updating schema version: 25 -> 27... [87%] --Updating schema version: 27 -> 28... [87%] --Updating schema version: 28 -> 29...01:49:33,223 ERROR Update:1150 - updateToSchemaVersion29: FAILED net.sf.basedb.core.BaseException: Object with id: 1 was not of the specified subclass: net.sf.basedb.core.data.MeasuredBioMaterialData (Discriminator: 24733184) at net.sf.basedb.core.HibernateUtil.loadList(HibernateUtil.java:1355) at net.sf.basedb.core.Update.updateToSchemaVersion29(Update.java:1105) at net.sf.basedb.core.Update.updateDatabase(Update.java:504) at net.sf.basedb.install.InitDB.main(InitDB.java:69) Caused by: org.hibernate.WrongClassException: Object with id: 1 was not of the specified subclass: net.sf.basedb.core.data.MeasuredBioMaterialData (Discriminator: 24733184) at org.hibernate.loader.Loader.getInstanceClass(Loader.java:1444) at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1275) at org.hibernate.loader.Loader.getRow(Loader.java:1197) at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:568) at org.hibernate.loader.Loader.doQuery(Loader.java:689) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) at org.hibernate.loader.Loader.doList(Loader.java:2211) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2095) at org.hibernate.loader.Loader.list(Loader.java:2090) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) at net.sf.basedb.core.HibernateUtil.loadList(HibernateUtil.java:1351) ... 3 more [90%] Database update failed: Object with id: 1 was not of the specified subclass: net.sf.basedb.core.data.MeasuredBioMaterialData (Discriminator: 24733184) net.sf.basedb.core.BaseException: Object with id: 1 was not of the specified subclass: net.sf.basedb.core.data.MeasuredBioMaterialData (Discriminator: 24733184) at net.sf.basedb.core.HibernateUtil.loadList(HibernateUtil.java:1355) at net.sf.basedb.core.Update.updateToSchemaVersion29(Update.java:1105) at net.sf.basedb.core.Update.updateDatabase(Update.java:504) at net.sf.basedb.install.InitDB.main(InitDB.java:69) Caused by: org.hibernate.WrongClassException: Object with id: 1 was not of the specified subclass: net.sf.basedb.core.data.MeasuredBioMaterialData (Discriminator: 24733184) at org.hibernate.loader.Loader.getInstanceClass(Loader.java:1444) at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1275) at org.hibernate.loader.Loader.getRow(Loader.java:1197) at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:568) at org.hibernate.loader.Loader.doQuery(Loader.java:689) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) at org.hibernate.loader.Loader.doList(Loader.java:2211) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2095) at org.hibernate.loader.Loader.list(Loader.java:2090) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) at net.sf.basedb.core.HibernateUtil.loadList(HibernateUtil.java:1351) ... 3 more
comment:5 by , 18 years ago
Trying to run the update script once more on the same database gives the same stack trace as Chris, i.e.
[87%] --Updating schema version: 28 -> 29...01:54:32,610 ERROR Update:1150 - updateToSchemaVersion29: FAILED net.sf.basedb.core.BaseException: Object with id: 1 was not of the specified subclass: net.sf.basedb.core.data.MeasuredBioMaterialData (Discriminator: 0)
comment:6 by , 18 years ago
I upgraded a couple of more servers. I noticed that servers that contain BASE 1 migrated data fails the upgrade whereas all servers with only "new" data was successfully upgraded.
comment:7 by , 18 years ago
comment:8 by , 18 years ago
comment:9 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
This issue is returned to the original ticket:466. The upgrade problem is removed in release 2.2.1.
I have successfully upgraded from 2.1.2 to 2.2. This is of course not exactly the same upgrade as Chris but it goes from schema 20 to 29 in steps:
[75%] Updating database... [83%] --Updating schema version: 20 -> 23... [85%] --Updating schema version: 23 -> 24... [85%] --NOTE! The "FileValues" table is no longer used by BASE. It may be removed from the database. [85%] --Updating schema version: 24 -> 25... [86%] --Updating schema version: 25 -> 27... [87%] --Updating schema version: 27 -> 28... [87%] --Updating schema version: 28 -> 29... [90%] Database updated successfully.