Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
DXP 7.1 Upgrade- Issue with Service Builder
Hello,
Doing the upgrade from 6.2 to 7.1. Done with Database upgrade. There was a service builder war portlet which i modularised as a gradle based project. Also as per the https://help.liferay.com/hc/en-us/articles/360017883692-Upgrade-Processes-for-Former-Service-Builder-Plugins created a bundle activator, but getting following error during deployment.
Also tried by changing the name space in service.xml but still getting same issue. Again removed the entry by "delete from servicecomponent where buildnamespace='planningpref';" but still i am getting same error.
2019-06-26 14:58:05.766 ERROR [fileinstall-/liferay/home/osgi/modules][com_liferay_portal_upgrade_impl:97] Invocation to listener threw exception
com.liferay.portal.kernel.upgrade.UpgradeException: Bundle planning.preference.dxp.service_1.0.0 [1139] has invalid content in tables.sql:_create table mrsselectiontool_useroffices (_ rid INTEGER not null primary key,_ employeeId INTEGER,_ officeRcCode VARCHAR(75) null,_ officePersyId VARCHAR(75) null,_ officeLanguage VARCHAR(75) null,_ officeNameNL VARCHAR(75) null,_ officeNameFr VARCHAR(75) null,_ PUNumber VARCHAR(75) null,_ PUDescription VARCHAR(75) null,_ officeType VARCHAR(75) null,_ officeDistance DOUBLE,_ officePriority INTEGER,_ isDeleted BOOLEAN_);__create table mrsselectiontool_users (_ employeeId INTEGER not null primary key,_ language VARCHAR(75) null,_ homeAddress VARCHAR(75) null,_ planningUnit VARCHAR(75) null,_ isAllowed BOOLEAN,_ isAdmin BOOLEAN,_ preferencesSet DATE null,_ isInterventionTeam BOOLEAN_); [Sanitized]
at com.liferay.portal.spring.extender.internal.context.ModuleApplicationContextExtender$InitialUpgradeStep.upgrade(ModuleApplicationContextExtender.java:161)
at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor$UpgradeInfosRunnable.run(UpgradeExecutor.java:159)
at com.liferay.portal.output.stream.container.internal.OutputStreamContainerFactoryTrackerImpl.runWithSwappedLog(OutputStreamContainerFactoryTrackerImpl.java:119)
at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor.executeUpgradeInfos(UpgradeExecutor.java:110)
at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor.execute(UpgradeExecutor.java:87)
at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands$UpgradeInfoServiceTrackerMapListener.keyEmitted(ReleaseManagerOSGiCommands.java:485)
at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands$UpgradeInfoServiceTrackerMapListener.keyEmitted(ReleaseManagerOSGiCommands.java:474)
at com.liferay.osgi.service.tracker.collections.internal.map.ServiceTrackerMapImpl$DefaultEmitter.emit(ServiceTrackerMapImpl.java:222)
at com.liferay.osgi.service.tracker.collections.map.PropertyServiceReferenceMapper.map(PropertyServiceReferenceMapper.java:43)
at com.liferay.osgi.service.tracker.collections.internal.map.ServiceTrackerMapImpl$ServiceReferenceServiceTrackerCustomizer.addingService(ServiceTrackerMapImpl.java:260)
at com.liferay.osgi.service.tracker.collections.internal.map.ServiceTrackerMapImpl$ServiceReferenceServiceTrackerCustomizer.addingService(ServiceTrackerMapImpl.java:248)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:943)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:903)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:487)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:1004)
at com.liferay.portal.spring.extender.internal.context.ModuleApplicationContextExtender$ModuleApplicationContextExtension._processInitialUpgrade(ModuleApplicationContextExtender.java:375)
at com.liferay.portal.spring.extender.internal.context.ModuleApplicationContextExtender$ModuleApplicationContextExtension.start(ModuleApplicationContextExtender.java:301)
at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)
at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:488)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)
at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:450)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:230)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:137)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:129)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:191)
at org.eclipse.osgi.container.Module.publishEvent(Module.java:476)
at org.eclipse.osgi.container.Module.start(Module.java:467)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:428)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1264)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1237)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'mrsselectiontool_useroffices' already exists
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.Util.getInstance(Util.java:386)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1053)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2788)
at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1816)
at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1730)
at com.zaxxer.hikari.pool.ProxyStatement.executeUpdate(ProxyStatement.java:117)
at com.zaxxer.hikari.pool.HikariProxyStatement.executeUpdate(HikariProxyStatement.java)
at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:340)
at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:310)
at com.liferay.portal.dao.db.BaseDB.runSQLTemplateString(BaseDB.java:497)
at com.liferay.portal.dao.db.BaseDB.runSQLTemplateString(BaseDB.java:554)
at com.liferay.portal.spring.extender.internal.context.ModuleApplicationContextExtender$InitialUpgradeStep.upgrade(ModuleApplicationContextExtender.java:157)
... 46 more
Bundle Activator attached for reference. After running i donot see any entry in Release_ table.
Kindly help
Thanks
Gopal
Doing the upgrade from 6.2 to 7.1. Done with Database upgrade. There was a service builder war portlet which i modularised as a gradle based project. Also as per the https://help.liferay.com/hc/en-us/articles/360017883692-Upgrade-Processes-for-Former-Service-Builder-Plugins created a bundle activator, but getting following error during deployment.
Also tried by changing the name space in service.xml but still getting same issue. Again removed the entry by "delete from servicecomponent where buildnamespace='planningpref';" but still i am getting same error.
2019-06-26 14:58:05.766 ERROR [fileinstall-/liferay/home/osgi/modules][com_liferay_portal_upgrade_impl:97] Invocation to listener threw exception
com.liferay.portal.kernel.upgrade.UpgradeException: Bundle planning.preference.dxp.service_1.0.0 [1139] has invalid content in tables.sql:_create table mrsselectiontool_useroffices (_ rid INTEGER not null primary key,_ employeeId INTEGER,_ officeRcCode VARCHAR(75) null,_ officePersyId VARCHAR(75) null,_ officeLanguage VARCHAR(75) null,_ officeNameNL VARCHAR(75) null,_ officeNameFr VARCHAR(75) null,_ PUNumber VARCHAR(75) null,_ PUDescription VARCHAR(75) null,_ officeType VARCHAR(75) null,_ officeDistance DOUBLE,_ officePriority INTEGER,_ isDeleted BOOLEAN_);__create table mrsselectiontool_users (_ employeeId INTEGER not null primary key,_ language VARCHAR(75) null,_ homeAddress VARCHAR(75) null,_ planningUnit VARCHAR(75) null,_ isAllowed BOOLEAN,_ isAdmin BOOLEAN,_ preferencesSet DATE null,_ isInterventionTeam BOOLEAN_); [Sanitized]
at com.liferay.portal.spring.extender.internal.context.ModuleApplicationContextExtender$InitialUpgradeStep.upgrade(ModuleApplicationContextExtender.java:161)
at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor$UpgradeInfosRunnable.run(UpgradeExecutor.java:159)
at com.liferay.portal.output.stream.container.internal.OutputStreamContainerFactoryTrackerImpl.runWithSwappedLog(OutputStreamContainerFactoryTrackerImpl.java:119)
at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor.executeUpgradeInfos(UpgradeExecutor.java:110)
at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor.execute(UpgradeExecutor.java:87)
at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands$UpgradeInfoServiceTrackerMapListener.keyEmitted(ReleaseManagerOSGiCommands.java:485)
at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands$UpgradeInfoServiceTrackerMapListener.keyEmitted(ReleaseManagerOSGiCommands.java:474)
at com.liferay.osgi.service.tracker.collections.internal.map.ServiceTrackerMapImpl$DefaultEmitter.emit(ServiceTrackerMapImpl.java:222)
at com.liferay.osgi.service.tracker.collections.map.PropertyServiceReferenceMapper.map(PropertyServiceReferenceMapper.java:43)
at com.liferay.osgi.service.tracker.collections.internal.map.ServiceTrackerMapImpl$ServiceReferenceServiceTrackerCustomizer.addingService(ServiceTrackerMapImpl.java:260)
at com.liferay.osgi.service.tracker.collections.internal.map.ServiceTrackerMapImpl$ServiceReferenceServiceTrackerCustomizer.addingService(ServiceTrackerMapImpl.java:248)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:943)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:903)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:487)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:1004)
at com.liferay.portal.spring.extender.internal.context.ModuleApplicationContextExtender$ModuleApplicationContextExtension._processInitialUpgrade(ModuleApplicationContextExtender.java:375)
at com.liferay.portal.spring.extender.internal.context.ModuleApplicationContextExtender$ModuleApplicationContextExtension.start(ModuleApplicationContextExtender.java:301)
at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)
at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:488)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)
at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:450)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:230)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:137)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:129)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:191)
at org.eclipse.osgi.container.Module.publishEvent(Module.java:476)
at org.eclipse.osgi.container.Module.start(Module.java:467)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:428)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1264)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1237)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'mrsselectiontool_useroffices' already exists
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.Util.getInstance(Util.java:386)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1053)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2788)
at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1816)
at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1730)
at com.zaxxer.hikari.pool.ProxyStatement.executeUpdate(ProxyStatement.java:117)
at com.zaxxer.hikari.pool.HikariProxyStatement.executeUpdate(HikariProxyStatement.java)
at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:340)
at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:310)
at com.liferay.portal.dao.db.BaseDB.runSQLTemplateString(BaseDB.java:497)
at com.liferay.portal.dao.db.BaseDB.runSQLTemplateString(BaseDB.java:554)
at com.liferay.portal.spring.extender.internal.context.ModuleApplicationContextExtender$InitialUpgradeStep.upgrade(ModuleApplicationContextExtender.java:157)
... 46 more
Bundle Activator attached for reference. After running i donot see any entry in Release_ table.
Kindly help
Thanks
Gopal
Attachments:
Hi Gopal,I think that the error is caused because you have removed the record from the ServiceComponent table, where did you read that you need to do that? (just in case the documentation is wrong) The logic uses that record to know that the plugin was installed previously.Please, keep that record before deploying the BundleActivator and let us know the results.Cheers!
Hello Alberto ,Thanks for the reply.I read it in some post, but not in any official document. So now that i have made this mistake and though i have the result of select * from ServiceComponent where buildnamespace='planningpref' but not able to insert it.So basically there are two tables that is handled by the Service Builder to fetch data and show it in a portlet. The tables were created manually and data was uploaded manually as well in 6.2.
So will it be okey if i go ahead and drop the 2 custom tables,Then recreate the tables and upload the data and deploy the service builder with a new name space in service.xml ?
Thanks in advance for your feedback
So will it be okey if i go ahead and drop the 2 custom tables,Then recreate the tables and upload the data and deploy the service builder with a new name space in service.xml ?
Thanks in advance for your feedback
Hi Gopal,Umm, then why you don't remove the tables and then deploy the modules so the Service Builder can recreate the table by its own?
Yes Alberto, i removed the tables and let the SB recreate the table. Then i dropped the tables and created manually with the data and it is working fine now.
ThanksGopal
ThanksGopal
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™