-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.1.X, Master
-
Fix Version/s: 7.1.10 DXP FP5, 7.1.10.1 SP1, 7.1.2 CE GA3, 7.1.X, Master
-
Component/s: Core Infrastructure > Upgrade Framework
-
Branch Version/s:7.1.x
-
Backported to Branch:Committed
-
Story Points:1
-
Fix Priority:3
-
Git Pull Request:
Steps to reproduce:
- Start 6.2 EE SP20.
- Deploy Audit portlet and make sure "Audit_AuditEvent" table exists in the database.
- Stop the server and upgrade the database to DXP 7.1.
Result: Upgrade process failed due to the following error:
2018-11-08 00:40:47.120 WARN [main][com_liferay_portal_upgrade_impl:103] bundle com.liferay.portal.upgrade.impl:2.0.9 (204)[com.liferay.portal.upgrade.internal.registry.UpgradeStepRegistratorTracker(682)] : Could not get service from ref {com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands}={osgi.command.scope=upgrade, service.id=4486, service.bundleid=204, service.scope=bundle, osgi.command.function=[check,execute,executeAll,list], component.name=com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands, component.id=684} 2018-11-08 00:40:47.138 ERROR [main][com_liferay_portal_upgrade_impl:97] bundle com.liferay.portal.upgrade.impl:2.0.9 (204)[com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands(684)] : The activate method has thrown an exception com.liferay.portal.kernel.upgrade.UpgradeException: Bundle com.liferay.portal.security.audit.storage.service_3.0.3 [317] has invalid content in tables.sql:_create table Audit_AuditEvent (_ auditEventId LONG not null primary key,_ companyId LONG,_ userId LONG,_ userName VARCHAR(200) null,_ createDate DATE null,_ eventType VARCHAR(75) null,_ className VARCHAR(200) null,_ classPK VARCHAR(75) null,_ message STRING null,_ clientHost VARCHAR(255) null,_ clientIP VARCHAR(75) null,_ serverName VARCHAR(255) null,_ serverPort INTEGER,_ sessionID VARCHAR(255) null,_ additionalInfo TEXT null_); [Sanitized] at com.liferay.portal.spring.extender.internal.context.ParentModuleApplicationContextExtender$InitialUpgradeStep.upgrade(ParentModuleApplicationContextExtender.java:219) at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor$UpgradeInfosRunnable.run(UpgradeExecutor.java:142) at com.liferay.portal.output.stream.container.internal.OutputStreamContainerFactoryTrackerImpl.runWithSwappedLog(OutputStreamContainerFactoryTrackerImpl.java:119) at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor.executeUpgradeInfos(UpgradeExecutor.java:103) at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor.execute(UpgradeExecutor.java:80) at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands.activate(ReleaseManagerOSGiCommands.java:282) ......... Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'Audit_AuditEvent' already exists at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ... 2018-11-08 00:40:47.160 ERROR [SCR Component Actor][com_liferay_portal_properties_swapper:97] bundle com.liferay.portal.properties.swapper:2.0.5 (201)[com.liferay.portal.properties.swapper.internal.DefaultCompanyNameSwapper(3935)] : The activate method has thrown an exception java.lang.ArrayIndexOutOfBoundsException: 0 at com.liferay.portal.util.PortalInstances.getDefaultCompanyId(PortalInstances.java:202) at com.liferay.portal.properties.swapper.internal.DefaultCompanyNameSwapper.activate(DefaultCompanyNameSwapper.java:50)
Expected result: The upgrade process can finish without errors.
Reproduced in both 7.1.x and Master:
7.1.x: 69c367cca65a252d64f8dd22b9a3de085740b22f
Master: f2c7cdaca195540799150306bff1d182600815a8