Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 6.1.1 CE GA2, 6.1.20 EE GA2
    • Fix Version/s: 6.1.30 EE GA3, 6.2.0 CE M2
    • Component/s: WCM
    • Labels:
    • Branch Version/s:
      6.1.x
    • Backported to Branch:
      Committed
    • Fix Priority:
      5
    • Similar Issues:
      Show 5 results 

      Description

      5.2 SP3 -> 6.1 GA2 upgrade

      PACL FileChecker -> DeployManagerUtil.getInstalledDir() -> PortalPreferencesLocalServiceUtil.getPreferences()

      leads to the error you see because the portal hasn't even added this new table for that service yet.

      Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'lportal.portalpreferences' doesn't exist
      
      2012-08-20 13:24:59,639 -0700 level=INFO class=STDOUT Starting Liferay Portal Enterprise Edition 6.1.20 EE (Paton / Build 6120 / July 31, 2012)
      2012-08-20 13:24:59,957 -0700 level=INFO class=STDOUT 13:24:59,953 ERROR [main][FileChecker:123] com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.SQLGrammarException: could not execute query
      com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.SQLGrammarException: could not execute query
      at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:193)
      at com.liferay.portal.service.persistence.PortalPreferencesPersistenceImpl.fetchByO_O(PortalPreferencesPersistenceImpl.java:600)
      at com.liferay.portal.service.persistence.PortalPreferencesPersistenceImpl.fetchByO_O(PortalPreferencesPersistenceImpl.java:519)
      at com.liferay.portal.service.impl.PortalPreferencesLocalServiceImpl.doGetPreferences(PortalPreferencesLocalServiceImpl.java:170)
      at com.liferay.portal.service.impl.PortalPreferencesLocalServiceImpl.getPreferences(PortalPreferencesLocalServiceImpl.java:101)
      at com.liferay.portal.service.impl.PortalPreferencesLocalServiceImpl.getPreferences(PortalPreferencesLocalServiceImpl.java:88)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:122)
      at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.security.pacl.PACLAdvice.invoke(PACLAdvice.java:51)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
      at $Proxy401.getPreferences(Unknown Source)
      at com.liferay.portal.service.PortalPreferencesLocalServiceUtil.getPreferences(PortalPreferencesLocalServiceUtil.java:282)
      at com.liferay.portal.util.PrefsPropsUtil.getPreferences(PrefsPropsUtil.java:250)
      at com.liferay.portal.util.PrefsPropsUtil.getPreferences(PrefsPropsUtil.java:241)
      at com.liferay.portal.util.PrefsPropsUtil.getString(PrefsPropsUtil.java:448)
      at com.liferay.portal.deploy.DeployUtil.getAutoDeployDestDir(DeployUtil.java:64)
      at com.liferay.portal.deploy.DeployManagerImpl.getInstalledDir(DeployManagerImpl.java:60)
      at com.liferay.portal.kernel.deploy.DeployManagerUtil.getInstalledDir(DeployManagerUtil.java:48)
      at com.liferay.portal.security.pacl.checker.FileChecker.afterPropertiesSet(FileChecker.java:119)
      at com.liferay.portal.security.pacl.BasePACLPolicy.initChecker(BasePACLPolicy.java:111)
      at com.liferay.portal.security.pacl.BasePACLPolicy.initCheckers(BasePACLPolicy.java:146)
      at com.liferay.portal.security.pacl.BasePACLPolicy.<init>(BasePACLPolicy.java:48)
      at com.liferay.portal.security.pacl.InactivePACLPolicy.<init>(InactivePACLPolicy.java:32)
      at com.liferay.portal.security.pacl.PACLPolicyManager.<clinit>(PACLPolicyManager.java:200)
      at com.liferay.portal.security.pacl.PACLAdvice.invoke(PACLAdvice.java:47)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
      at $Proxy382.clear(Unknown Source)
      at com.liferay.portal.service.LockLocalServiceUtil.clear(LockLocalServiceUtil.java:267)
      at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:75)
      at com.liferay.portal.ee.license.StartupAction.doRun(Unknown Source)
      at com.liferay.portal.events.StartupAction.run(StartupAction.java:52)
      at com.liferay.portal.servlet.MainServlet.processStartupEvents(MainServlet.java:1306)
      at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:214)
      at javax.servlet.GenericServlet.init(GenericServlet.java:212)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:950)
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4122)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4417)
      at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:313)
      at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:145)
      at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
      at org.jboss.web.deployers.WebModule.startModule(WebModule.java:122)
      at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
      at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
      at $Proxy38.start(Unknown Source)
      at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
      at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
      at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
      at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
      at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:297)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:826)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:556)
      at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
      at org.jboss.system.ServiceController.start(ServiceController.java:460)
      at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
      at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
      at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
      at org.jboss.deployers.spi.deployer.he
      2012-08-20 13:24:59,961 -0700 level=INFO class=STDOUT lpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
      at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55)
      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1454)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1172)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1193)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1113)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:826)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:556)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:789)
      at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:699)
      at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
      at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
      at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
      at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:403)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:778)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:543)
      at org.jboss.system.server.profileservice.repository.AbstractProfileService.registerProfile(AbstractProfileService.java:308)
      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:256)
      at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
      at org.jboss.Main.boot(Main.java:221)
      at org.jboss.Main$1.run(Main.java:556)
      at java.lang.Thread.run(Thread.java:680)
      Caused by: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.SQLGrammarException: could not execute query
      at com.liferay.portal.dao.orm.hibernate.ExceptionTranslator.translate(ExceptionTranslator.java:30)
      at com.liferay.portal.dao.orm.hibernate.QueryImpl.list(QueryImpl.java:98)
      at com.liferay.portal.dao.orm.hibernate.QueryImpl.list(QueryImpl.java:75)
      at com.liferay.portal.service.persistence.PortalPreferencesPersistenceImpl.fetchByO_O(PortalPreferencesPersistenceImpl.java:575)
      ... 118 more
      Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
      at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92)
      at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
      at org.hibernate.loader.Loader.doList(Loader.java:2545)
      at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
      at org.hibernate.loader.Loader.list(Loader.java:2271)
      at org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:940)
      at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
      at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
      at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
      at com.liferay.portal.dao.orm.hibernate.QueryImpl.list(QueryImpl.java:86)
      ... 120 more
      Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'lportal.portalpreferences' doesn't exist
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      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:1052)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151)
      at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2625)
      at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119)
      at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2281)
      at org.jboss.resource.adapter.jdbc.CachedPreparedStatement.executeQuery(CachedPreparedStatement.java:91)
      at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:342)
      at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
      at org.hibernate.loader.Loader.getResultSet(Loader.java:1953)
      at org.hibernate.loader.Loader.doQuery(Loader.java:802)
      at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
      at org.hibernate.loader.Loader.doList(Loader.java:2542)
      ... 127 more 
      

        Activity

        Hide
        Brian Chan added a comment -

        Isn't this the same issue as LPS-29066? I I think that ticket fixes this?

        Show
        Brian Chan added a comment - Isn't this the same issue as LPS-29066 ? I I think that ticket fixes this?
        Hide
        Brian Chan added a comment -

        I don't think the fix in https://github.com/brianchandotcom/liferay-portal/pull/6569 is necessary.

        Show
        Brian Chan added a comment - I don't think the fix in https://github.com/brianchandotcom/liferay-portal/pull/6569 is necessary.
        Hide
        Shinn Lok added a comment - - edited

        The solution in LPS-29066 is too late in our case because we need to disable PACL so that it doesn't get into PACLPolicyManager -> InactivePolicyManager -> DeployManagerUtil#getInstalledDir -> .. -> PortalPreferencesLocalServiceUtil#getPreferences -> Exception thrown

        LockLocalServiceUtil#clear gets called in StartupAction before the database tables are upgraded/added. So if someone is upgrading from a version that doesn't yet have the PortalPreferences table, they will get no such table exceptions.

        We need to turn off PACL/InactivePolicyManager uses until after DBUpgrader.upgrade().

        Show
        Shinn Lok added a comment - - edited The solution in LPS-29066 is too late in our case because we need to disable PACL so that it doesn't get into PACLPolicyManager -> InactivePolicyManager -> DeployManagerUtil#getInstalledDir -> .. -> PortalPreferencesLocalServiceUtil#getPreferences -> Exception thrown LockLocalServiceUtil#clear gets called in StartupAction before the database tables are upgraded/added. So if someone is upgrading from a version that doesn't yet have the PortalPreferences table, they will get no such table exceptions. We need to turn off PACL/InactivePolicyManager uses until after DBUpgrader.upgrade().
        Hide
        Michael Saechang added a comment -

        Committed on:
        Portal 6.2.x GIT ID: c2782cebf0291f04af012db21d404372ee5d4541.

        Show
        Michael Saechang added a comment - Committed on: Portal 6.2.x GIT ID: c2782cebf0291f04af012db21d404372ee5d4541.
        Hide
        Pani Gui (Inactive) added a comment -

        Can not be tested by QA. Closing the ticket as fixed.

        Show
        Pani Gui (Inactive) added a comment - Can not be tested by QA. Closing the ticket as fixed.

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              2 years, 50 weeks, 2 days ago

              Development

                Structure Helper Panel