#801  Failed to upgrade from 7.3.3 to current latest
Released
Artur opened 2 years ago

I attempted to upgrade 1dev from my current version 7.3.3 to currently latest version. The DB upgrade ends up with error. Here is a full log output. Please advise.

INFO  - >>> INFO  - Exporting table 'LinkSpec'...
,INFO  - >>> INFO  - Querying table ids...
,INFO  - >>> INFO  - 
,INFO  - >>> INFO  - Building zip: /opt/onedev/site/db-backup/2022-07-09_00-00-18.zip
,INFO  - >>> INFO  - Database is successfully backed up to /opt/onedev/site/db-backup/2022-07-09_00-00-18.zip
,INFO  - Updating program files...
,INFO  - Restoring database with new program...
,INFO  - >>> INFO  - Launching application from '/opt/onedev'...
,INFO  - >>> INFO  - Cleaning temp directory...
,INFO  - >>> INFO  - Starting server...
,INFO  - >>> INFO  - Restoring database from /opt/onedev/site/db-backup/2022-07-09_00-00-18.zip...
,INFO  - >>> INFO  - Validating data file 'Roles.xml'...
,INFO  - >>> INFO  - Validating data file 'Projects.xml'...
,INFO  - >>> INFO  - Validating data file 'Users.xml'...
,INFO  - >>> INFO  - Validating data file 'PullRequests.xml'...
,INFO  - >>> INFO  - Validating data file 'Builds.xml'...
,INFO  - >>> INFO  - Validating data file 'ModelVersions.xml'...
,INFO  - >>> INFO  - Validating data file 'PullRequestComments.xml'...
,INFO  - >>> INFO  - Validating data file 'Issues.xml'...
,INFO  - >>> INFO  - Validating data file 'Groups.xml'...
,INFO  - >>> INFO  - Validating data file 'Settings.xml'...
,INFO  - >>> ERROR - Error booting application
,INFO  - >>> com.thoughtworks.xstream.converters.ConversionException: 
,INFO  - >>> ---- Debugging information ----
,INFO  - >>> cause-exception     : com.thoughtworks.xstream.converters.reflection.MissingFieldException
,INFO  - >>> cause-message       : Field not found in class.
,INFO  - >>> class               : io.onedev.server.model.support.administration.IssueCreationSetting
,INFO  - >>> required-type       : io.onedev.server.model.support.administration.IssueCreationSetting
,INFO  - >>> converter-type      : io.onedev.server.util.xstream.ReflectionConverter
,INFO  - >>> path                : /io.onedev.server.model.Setting/value/issueCreationSettings/io.onedev.server.model.support.administration.IssueCreationSetting/issueConfidential
,INFO  - >>> xpath               : /io.onedev.server.model.Setting/value/issueCreationSettings/io.onedev.server.model.support.administration.IssueCreationSetting/issueConfidential
,INFO  - >>> class[1]            : java.util.ArrayList
,INFO  - >>> required-type[1]    : java.util.ArrayList
,INFO  - >>> converter-type[1]   : io.onedev.server.util.xstream.CollectionConverter
,INFO  - >>> class[2]            : io.onedev.server.model.support.administration.ServiceDeskSetting
,INFO  - >>> required-type[2]    : io.onedev.server.model.support.administration.ServiceDeskSetting
,INFO  - >>> class[3]            : io.onedev.server.model.Setting
,INFO  - >>> required-type[3]    : io.onedev.server.model.Setting
,INFO  - >>> version             : not available
,INFO  - >>> -------------------------------
,INFO  - >>> 	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:81)
,INFO  - >>> 	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72)
,INFO  - >>> 	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:68)
,INFO  - >>> 	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:52)
,INFO  - >>> 	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readBareItem(AbstractCollectionConverter.java:132)
,INFO  - >>> 	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:117)
,INFO  - >>> 	at com.thoughtworks.xstream.converters.collections.CollectionConverter.addCurrentElementToCollection(CollectionConverter.java:99)
,INFO  - >>> 	at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:92)
,INFO  - >>> 	at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:86)
,INFO  - >>> 	at com.thoughtworks.xstream.converters.collections.CollectionConverter.unmarshal(CollectionConverter.java:81)
,INFO  - >>> 	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:74)
,INFO  - >>> 	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72)
,INFO  - >>> 	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:68)
,INFO  - >>> 	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:499)
,INFO  - >>> 	at io.onedev.server.util.xstream.ReflectionConverter.unmarshallField(ReflectionConverter.java:43)
,INFO  - >>> 	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:425)
,INFO  - >>> 	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:277)
,INFO  - >>> 	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:74)
,INFO  - >>> 	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72)
,INFO  - >>> 	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:68)
,INFO  - >>> 	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:499)
,INFO  - >>> 	at io.onedev.server.util.xstream.ReflectionConverter.unmarshallField(ReflectionConverter.java:43)
,INFO  - >>> 	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:425)
,INFO  - >>> 	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:277)
,INFO  - >>> 	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:74)
,INFO  - >>> 	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72)
,INFO  - >>> 	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:68)
,INFO  - >>> 	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:52)
,INFO  - >>> 	at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:136)
,INFO  - >>> 	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
,INFO  - >>> 	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1421)
,INFO  - >>> 	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1388)
,INFO  - >>> 	at io.onedev.server.migration.VersionedXmlDoc.toBean(VersionedXmlDoc.java:483)
,INFO  - >>> 	at io.onedev.server.migration.VersionedXmlDoc.toBean(VersionedXmlDoc.java:443)
,INFO  - >>> 	at io.onedev.server.persistence.DefaultPersistManager.validateData(DefaultPersistManager.java:522)
,INFO  - >>> 	at io.onedev.server.maintenance.RestoreDatabase.doRestore(RestoreDatabase.java:93)
,INFO  - >>> 	at io.onedev.server.maintenance.RestoreDatabase.start(RestoreDatabase.java:69)
,INFO  - >>> 	at io.onedev.server.OneDev.start(OneDev.java:109)
,INFO  - >>> 	at io.onedev.commons.loader.DefaultPluginManager.start(DefaultPluginManager.java:44)
,INFO  - >>> 	at io.onedev.commons.loader.AppLoader.start(AppLoader.java:73)
,INFO  - >>> 	at io.onedev.commons.bootstrap.Bootstrap.main(Bootstrap.java:189)
,INFO  - >>> Caused by: com.thoughtworks.xstream.converters.reflection.MissingFieldException: Field not found in class.
,INFO  - >>> ---- Debugging information ----
,INFO  - >>> message             : Field not found in class.
,INFO  - >>> field               : io.onedev.server.model.support.administration.IssueCreationSetting.issueConfidential
,INFO  - >>> -------------------------------
,INFO  - >>> 	at com.thoughtworks.xstream.converters.reflection.FieldDictionary.field(FieldDictionary.java:97)
,INFO  - >>> 	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.getField(PureJavaReflectionProvider.java:217)
,INFO  - >>> 	at io.onedev.server.CoreModule$19$1$1.shouldSerializeMember(CoreModule.java:823)
,INFO  - >>> 	at com.thoughtworks.xstream.mapper.MapperWrapper.shouldSerializeMember(MapperWrapper.java:173)
,INFO  - >>> 	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.handleUnknownField(AbstractReflectionConverter.java:515)
,INFO  - >>> 	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:371)
,INFO  - >>> 	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:277)
,INFO  - >>> 	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:74)
,INFO  - >>> 	... 40 common frames omitted
,ERROR - Failed to upgrade /opt/onedev
,INFO  - Restoring old program files due to upgrade failure...
,INFO  - Old program files restored
,WARN  - The database might be in inconsistent state due to upgrade failure. In that case, you need to restore the database by first cleaning it, and then running below command:
,INFO  - /opt/onedev/bin/restore-db.sh /opt/onedev/site/db-backup/2022-07-09_00-00-18.zip
OneDev changed state to 'Closed' 2 years ago
Previous Value Current Value
Open
Closed
OneDev commented 2 years ago

State changed as code fixing the issue is committed

OneDev changed state to 'Released' 2 years ago
Previous Value Current Value
Closed
Released
OneDev commented 2 years ago

State changed as build #2815 is successful

Artur commented 2 years ago

I confirm, it is fixed with latest build. Thank you.

issue 1 of 1
Type
Bug
Priority
Critical
Assignee
Affected Versions
Not Found
Issue Votes (0)
Watchers (4)
Reference
onedev/server#801
Please wait...
Page is in error, reload to recover