Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-117834

Upgrade error when using postgresql: org.postgresql.util.PSQLException: ERROR: operator does not exist: boolean = integer_

    Details

      Description

      When you upgrade to latest master, following error is produced if you are using postgresql

      Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: boolean = integer_  Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts._  Position: 84 [Sanitized]
              at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
              at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
              at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
              at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
              at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
              at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:143)
              at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:106)
              at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
              at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
              at com.liferay.exportimport.web.internal.upgrade.v1_0_1.UpgradeStagingConfigurationClassNames.updateStagingConfiguration(UpgradeStagingConfigurationClassNames.java:56)
              at com.liferay.exportimport.web.internal.upgrade.v1_0_1.UpgradeStagingConfigurationClassNames.doUpgrade(UpgradeStagingConfigurationClassNames.java:47)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:104)
              ... 87 more

      This bug is caused by LPS-116519. That SQL added UpgradeStagingConfigurationClassNames.updateStagingConfiguration that executes a SQL without the boolean alias [$TRUE$] that must be used to avoid postgresql problems.

      Steps to reproduce

      1. Install Liferay 7.2
      2. Upgrade to master
      3. Check log file:
        • Expected behavior: no error are produced
        • Wrong behavior: following error is produced
          2020-07-24 10:25:59.799 ERROR [main][ReleaseManagerOSGiCommands:93] bundle com.liferay.portal.upgrade.impl:4.0.9 (163)[com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands(411)] : The activate method has thrown an exception
          com.liferay.portal.kernel.upgrade.UpgradeException: org.postgresql.util.PSQLException: ERROR: operator does not exist: boolean = integer_  Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts._  Position: 84 [Sanitized]
                  at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:109)
                  at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:127)
                  at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor$UpgradeInfosRunnable.run(UpgradeExecutor.java:200)
                  at com.liferay.portal.output.stream.container.internal.OutputStreamContainerFactoryTrackerImpl.runWithSwappedLog(OutputStreamContainerFactoryTrackerImpl.java:134)
                  at com.liferay.portal.upgrade.internal.executor.SwappedLogExecutor.execute(SwappedLogExecutor.java:51)
                  at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor.executeUpgradeInfos(UpgradeExecutor.java:155)
                  at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor.execute(UpgradeExecutor.java:118)
                  at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands.activate(ReleaseManagerOSGiCommands.java:276)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                  at java.lang.reflect.Method.invoke(Method.java:498)
                  at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:228)
                  at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41)
                  at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:664)
                  at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:510)
                  at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:317)
                  at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:307)
                  at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:341)
                  at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:114)
                  at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:983)
                  at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:956)
                  at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:756)
                  at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1053)
                  at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1007)
                  at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1216)
                  at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1137)
                  at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:944)
                  at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:880)
                  at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1168)
                  at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125)
                  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.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:906)
                  at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:892)
                  at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128)
                  at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:959)
                  at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:732)
                  at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1053)
                  at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1007)
                  at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1216)
                  at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1137)
                  at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:944)
                  at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:880)
                  at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1168)
                  at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125)
                  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.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:906)
                  at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:892)
                  at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128)
                  at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:959)
                  at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:732)
                  at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1053)
                  at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1007)
                  at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1216)
                  at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1137)
                  at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:944)
                  at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:880)
                  at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1168)
                  at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125)
                  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.registry.internal.RegistryImpl.registerService(RegistryImpl.java:342)
                  at com.liferay.portal.tools.DBUpgrader._registerModuleServiceLifecycle(DBUpgrader.java:240)
                  at com.liferay.portal.tools.DBUpgrader._upgradeModules(DBUpgrader.java:321)
                  at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:165)
                  at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:151)
                  at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:131)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                  at java.lang.reflect.Method.invoke(Method.java:498)
                  at com.liferay.portal.tools.db.upgrade.client.DBUpgraderLauncher.main(DBUpgraderLauncher.java:54)
          Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: boolean = integer_  Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts._  Position: 84 [Sanitized]
                  at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
                  at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
                  at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
                  at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
                  at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
                  at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:143)
                  at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:106)
                  at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
                  at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
                  at com.liferay.exportimport.web.internal.upgrade.v1_0_1.UpgradeStagingConfigurationClassNames.updateStagingConfiguration(UpgradeStagingConfigurationClassNames.java:56)
                  at com.liferay.exportimport.web.internal.upgrade.v1_0_1.UpgradeStagingConfigurationClassNames.doUpgrade(UpgradeStagingConfigurationClassNames.java:47)
                  at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:104)
                  ... 87 more

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              joyce.wang Joyce Wang
              Reporter:
              jorge.diaz Jorge Diaz
              Participants of an Issue:
              Recent user:
              Yunlin "Steven" Sun
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 7 weeks, 5 days ago

                  Packages

                  Version Package
                  7.0.0 DXP FP96
                  7.0.10.15 DXP SP15
                  7.0.X
                  7.1.10 DXP FP20
                  7.1.10.5 SP5
                  7.1.X
                  7.2.10 DXP FP8
                  7.2.10.3 DXP SP3
                  7.2.X
                  7.3.4 CE GA5
                  7.3.10 DXP GA1
                  Master