I attempted a update to Base2.2 from a 2.1.1 installation. Executing
updatedb.sh worked until the "Updating database" step:
----------
[75%] Updating database...
[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
[90%] Database update failed: Object with id: 1 was not of the
specified subclass: net.sf.basedb.core.data.MeasuredBioMaterialData
(Discriminator: 0)
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
----------
First, what could this be? I'm running a mysql database, the
base.config is set up properly, and no BASE files have ever been
modified--it's a very vanilla installation. It seemed like a minor
error, so I just switched back to my old 2.1.1 installation (switching
folders, ensuring the www link in my tomcat webapp directory was
correct). I ran updatedb.sh on that install (perhaps mistakenly), and
got a error from it, as follows.
----------
[75%] Updating database...
[90%] Database updated successfully.
[95%] Installing web application...12:15:20,332 ERROR Application:401
- Schema version mismatch: database schema version=28; expected=20;
Please update the BASE code before starting.
net.sf.basedb.core.BaseException: Schema version mismatch: database
schema version=28; expected=20; Please update the BASE code before starting.
at net.sf.basedb.core.Application.start(Application.java:402)
at net.sf.basedb.core.Application.start(Application.java:317)
at net.sf.basedb.install.Webclient.install(Webclient.java:92)
at net.sf.basedb.install.InitDB.main(InitDB.java:72)
----------
If it's reporting a successful database update, I would think the schema
version would have to be consistent, so the mismatch at the last step
doesn't make sense. Ignoring the error and attempting to load the BASE
interface returns the following 500 server error:
----------
type Exception report
message
description The server encountered an internal error () that prevented
it from fulfilling this request.
exception
net.sf.basedb.core.BaseException: Schema version mismatch: database
schema version=28; expected=20; Please update the BASE code before starting.
net.sf.basedb.core.Application.start(Application.java:402)
net.sf.basedb.core.Application.start(Application.java:301)
net.sf.basedb.core.Application.getSessionControl(Application.java:736)
net.sf.basedb.clients.web.Base.getSessionControl(Base.java:111)
org.apache.jsp.index_jsp._jspService(index_jsp.java:66)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
net.sf.basedb.clients.web.servlet.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:71)
----------
So 2.2's update script will update the version 28 to 29 (by the looks of
it) except it isn't working on my install--did it update the schema
earlier in the script (to 28), so that the database is no longer
compatible with the 2.1.1 version (which appears to want version 20)?
If the 2.2 update isn't an obvious fix, is there a way to revert to the
2.1 schema? Thanks.
--Chris Wiita
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
The BASE general discussion mailing list
[email protected]
unsubscribe: send a mail with subject "unsubscribe" to
[EMAIL PROTECTED]