db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6314) Upgrade from 10.10 fails with ClassCastException
Date Tue, 27 Aug 2013 08:17:53 GMT

    [ https://issues.apache.org/jira/browse/DERBY-6314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13751070#comment-13751070
] 

ASF subversion and git services commented on DERBY-6314:
--------------------------------------------------------

Commit 1517761 from [~knutanders] in branch 'code/trunk'
[ https://svn.apache.org/r1517761 ]

DERBY-6314: Upgrade from 10.10 fails with ClassCastException

Make ExecRowBuilder implement the Formatable interface so that any
Formatable instances referenced from its fields are stored using
Formatable logic instead of Serializable logic.

Add type checking in FormatIdInputStream's error handlers to prevent
the underlying exception from being shadowed by a ClassCastException
under certain circumstances.
                
> Upgrade from 10.10 fails with ClassCastException
> ------------------------------------------------
>
>                 Key: DERBY-6314
>                 URL: https://issues.apache.org/jira/browse/DERBY-6314
>             Project: Derby
>          Issue Type: Bug
>          Components: Services
>    Affects Versions: 10.11.0.0
>            Reporter: Knut Anders Hatlen
>         Attachments: d6314-1a.diff, d6314-2a.diff
>
>
> I noticed that after running the SignatureChecker tool on a database with version 10.10.1.1,
I could not boot it with trunk (neither hard nor soft upgrade worked).
> To reproduce, create a database and run SignatureChecker with 10.10:
> $ java -jar /code/derby/oldreleases/10.10.1.1/derbyrun.jar SignatureChecker 'jdbc:derby:db;create=true'
> Then, try to boot that database with trunk:
> $ java -Dderby.database.allowPreReleaseUpgrade=true -jar /code/derby/trunk/jars/sane/derbyrun.jar
SignatureChecker 'jdbc:derby:db'             
> java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:606)
> 	at org.apache.derby.tools.SignatureChecker.getJ2SEConnection(SignatureChecker.java:445)
> 	at org.apache.derby.tools.SignatureChecker.execute(SignatureChecker.java:140)
> 	at org.apache.derby.tools.SignatureChecker.main(SignatureChecker.java:121)
> 	at org.apache.derby.iapi.tools.run.main(run.java:61)
> Caused by: java.sql.SQLException: Failed to start database 'db' with class loader sun.misc.Launcher$AppClassLoader@7e820d53,
see the next exception for details.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:103)
> 	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:137)
> 	at org.apache.derby.impl.jdbc.Util.seeNextException(Util.java:310)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(EmbedConnection.java:2841)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.<init>(EmbedConnection.java:404)
> 	at org.apache.derby.jdbc.InternalDriver.getNewEmbedConnection(InternalDriver.java:628)
> 	at org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:282)
> 	at org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:913)
> 	at org.apache.derby.jdbc.AutoloadedDriver.connect(AutoloadedDriver.java:147)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:571)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:233)
> 	... 8 more
> Caused by: java.sql.SQLException: Failed to start database 'db' with class loader sun.misc.Launcher$AppClassLoader@7e820d53,
see the next exception for details.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory.java:141)
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:73)
> 	... 18 more
> Caused by: java.sql.SQLException: Exception during restore of a serializable or SQLData
object of class 
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory.java:141)
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:73)
> 	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:288)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(EmbedConnection.java:2835)
> 	... 15 more
> Caused by: ERROR XSDA8: Exception during restore of a serializable or SQLData object
of class 
> 	at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:265)
> 	at org.apache.derby.impl.store.raw.data.StoredPage.readRecordFromArray(StoredPage.java:5827)
> 	at org.apache.derby.impl.store.raw.data.StoredPage.restoreRecordFromSlot(StoredPage.java:1514)
> 	at org.apache.derby.impl.store.raw.data.BasePage.fetchFromSlot(BasePage.java:441)
> 	at org.apache.derby.impl.store.raw.data.CachedPage.fetchFromSlot(CachedPage.java:53)
> 	at org.apache.derby.impl.store.access.conglomerate.GenericConglomerateController.fetch(GenericConglomerateController.java:299)
> 	at org.apache.derby.impl.sql.catalog.TabInfoImpl.deleteRows(TabInfoImpl.java:725)
> 	at org.apache.derby.impl.sql.catalog.TabInfoImpl.deleteRow(TabInfoImpl.java:570)
> 	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.dropSPSDescriptor(DataDictionaryImpl.java:4673)
> 	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.dropSPSDescriptor(DataDictionaryImpl.java:4647)
> 	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.dropJDBCMetadataSPSes(DataDictionaryImpl.java:14121)
> 	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.updateMetadataSPSes(DataDictionaryImpl.java:14135)
> 	at org.apache.derby.impl.sql.catalog.DD_Version.handleMinorRevisionChange(DD_Version.java:539)
> 	at org.apache.derby.impl.sql.catalog.DD_Version.upgradeIfNeeded(DD_Version.java:238)
> 	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.loadDictionaryTables(DataDictionaryImpl.java:7984)
> 	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.boot(DataDictionaryImpl.java:818)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.java:1991)
> 	at org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.java:334)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(BaseMonitor.java:541)
> 	at org.apache.derby.impl.services.monitor.FileMonitor.startModule(FileMonitor.java:44)
> 	at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Monitor.java:423)
> 	at org.apache.derby.impl.db.BasicDatabase.boot(BasicDatabase.java:196)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.java:1991)
> 	at org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.java:334)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(BaseMonitor.java:1819)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(BaseMonitor.java:1685)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(BaseMonitor.java:1569)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(BaseMonitor.java:988)
> 	at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Monitor.java:546)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(EmbedConnection.java:2802)
> 	... 15 more
> Caused by: java.io.StreamCorruptedException: java.lang.ClassCastException: java.io.ObjectInputStream
cannot be cast to org.apache.derby.iapi.services.io.ErrorInfo
> 	at org.apache.derby.iapi.services.io.FormatIdInputStream.readObject(FormatIdInputStream.java:139)
> 	at org.apache.derby.iapi.services.io.ArrayUtil.readArrayItems(ArrayUtil.java:180)
> 	at org.apache.derby.impl.sql.GenericStorablePreparedStatement.readExternal(GenericStorablePreparedStatement.java:232)
> 	at org.apache.derby.iapi.services.io.FormatIdInputStream.readObject(FormatIdInputStream.java:125)
> 	at org.apache.derby.iapi.types.UserType.readExternal(UserType.java:299)
> 	at org.apache.derby.impl.store.raw.data.StoredPage.readRecordFromArray(StoredPage.java:5684)
> 	... 43 more
> Caused by: java.lang.ClassCastException: java.io.ObjectInputStream cannot be cast to
org.apache.derby.iapi.services.io.ErrorInfo
> 	at org.apache.derby.iapi.services.io.FormatIdInputStream.readObject(FormatIdInputStream.java:97)
> 	... 48 more
> Could not get a connection.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message