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

Bryan Pendleton commented on DERBY-6839:
----------------------------------------

Thank you for the additional information. I looked at 
both the derby.log and at the output of the SYSSTATEMENTS
query, and unfortunately I had no brilliant insights. :(

It is very interesting to hear that invoking SYSCS_INVALIDATE_STORED_STATEMENTS
prior to the upgrade allows the upgrade to succeed.

I cannot think of any downside to invoking SYSCS_INVALIDATE_STORED_STATEMENTS;
is there a reason you don't feel this is an acceptable workaround?

I believe that, if you had not encountered this bug, performing the upgrade
would have invalidated your statements anyway, and they will automatically
be recompiled the next time you reference them, so my opinion is that you
should use the explicit call to SYSCS_INVALIDATE_STORED_STATEMENTS, then
upgrade your database, then proceed to use version 10.12 as you intended,
and there should be no ill effects.

I would recommend retaining a backup of your 10.10 database prior to the
call to SYSCS_INVALIDATE_STORED_STATEMENTS, for some period of time, until
you are confident that you have suffered no additional problems from this 
incident.

> InvalidClassException when upgrading db from 10.10.1.1 to 10.11.1.1 or 
> 10.12.1.1
> --------------------------------------------------------------------------------
>
>                 Key: DERBY-6839
>                 URL: https://issues.apache.org/jira/browse/DERBY-6839
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.11.1.1, 10.12.1.1
>            Reporter: Eduardo Ribas
>         Attachments: SYSSTATEMENTS.html, derby.log
>
>
> When trying to upgrade a database created with version *10.10.1.1* directly 
> to version *10.12.1.1* I get the following error:
> {code}
> Caused by: ERROR XJ040: Failed to start database '/Users/eduribas/database' 
> with class loader sun.misc.Launcher$AppClassLoader@14dad5dc, see the next 
> exception for details.
>     at org.apache.derby.iapi.error.StandardException.newException(Unknown 
> Source)
>     at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory.wrapArgsForTransportAcrossDRDA(Unknown
>  Source)
>     ... 43 more
> Caused by: ERROR XSDA8: Exception during restore of a serializable or SQLData 
> object of class 
>     at org.apache.derby.iapi.error.StandardException.newException(Unknown 
> Source)
>     at 
> org.apache.derby.impl.store.raw.data.StoredPage.readRecordFromArray(Unknown 
> Source)
>     at 
> org.apache.derby.impl.store.raw.data.StoredPage.restoreRecordFromSlot(Unknown 
> Source)
>     at org.apache.derby.impl.store.raw.data.BasePage.fetchFromSlot(Unknown 
> Source)
>     at org.apache.derby.impl.store.raw.data.CachedPage.fetchFromSlot(Unknown 
> Source)
>     at 
> org.apache.derby.impl.store.access.conglomerate.GenericConglomerateController.fetch(Unknown
>  Source)
>     at org.apache.derby.impl.sql.catalog.TabInfoImpl.deleteRows(Unknown 
> Source)
>     at org.apache.derby.impl.sql.catalog.TabInfoImpl.deleteRow(Unknown Source)
>     at 
> org.apache.derby.impl.sql.catalog.DataDictionaryImpl.dropSPSDescriptor(Unknown
>  Source)
>     at 
> org.apache.derby.impl.sql.catalog.DataDictionaryImpl.dropSPSDescriptor(Unknown
>  Source)
>     at 
> org.apache.derby.impl.sql.catalog.DataDictionaryImpl.dropJDBCMetadataSPSes(Unknown
>  Source)
>     at 
> org.apache.derby.impl.sql.catalog.DataDictionaryImpl.updateMetadataSPSes(Unknown
>  Source)
>     at org.apache.derby.impl.sql.catalog.DD_Version.doFullUpgrade(Unknown 
> Source)
>     at org.apache.derby.impl.sql.catalog.DD_Version.upgradeIfNeeded(Unknown 
> Source)
>     at 
> org.apache.derby.impl.sql.catalog.DataDictionaryImpl.loadDictionaryTables(Unknown
>  Source)
>     at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.boot(Unknown 
> Source)
>     at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
>     at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown 
> Source)
>     at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown 
> Source)
>     at org.apache.derby.impl.services.monitor.FileMonitor.startModule(Unknown 
> Source)
>     at 
> org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown 
> Source)
>     at org.apache.derby.impl.db.BasicDatabase$5.run(Unknown Source)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at org.apache.derby.impl.db.BasicDatabase.bootServiceModule(Unknown 
> Source)
>     at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
>     at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
>     at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown 
> Source)
>     at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown 
> Source)
>     at 
> org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown
>  Source)
>     at 
> org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown
>  Source)
>     at 
> org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown
>  Source)
>     at 
> org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown 
> Source)
>     at org.apache.derby.impl.jdbc.EmbedConnection$4.run(Unknown Source)
>     at org.apache.derby.impl.jdbc.EmbedConnection$4.run(Unknown Source)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at 
> org.apache.derby.impl.jdbc.EmbedConnection.startPersistentService(Unknown 
> Source)
>     ... 40 more
> Caused by: java.io.InvalidClassException: 
> org.apache.derby.iapi.sql.execute.ExecRowBuilder; local class incompatible: 
> stream classdesc serialVersionUID = -1078823466492523202, local class 
> serialVersionUID = 9151849461018459842
>     at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:621)
>     at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1623)
>     at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518)
>     at 
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1774)
>     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
>     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
>     at 
> org.apache.derby.iapi.services.io.FormatIdInputStream.readObject(Unknown 
> Source)
>     at org.apache.derby.iapi.services.io.ArrayUtil.readArrayItems(Unknown 
> Source)
>     at 
> org.apache.derby.impl.sql.GenericStorablePreparedStatement.readExternal(Unknown
>  Source)
>     at 
> org.apache.derby.iapi.services.io.FormatIdInputStream.readObject(Unknown 
> Source)
>     at org.apache.derby.iapi.types.UserType.readExternal(Unknown Source)
>     ... 75 more
> {code}
> A similar error occurs when upgrading directly from *10.10.1.1* to 
> *10.11.1.1*. But when I upgrade from *10.10.1.1* to *10.10.2.0* first, and 
> then to *10.11.1.1* or *10.12.1.1*, no error occurs.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to