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

When on HSQL, impossible to add new Permissions to Global roles such as the "User" role - results in java.sql.SQLException: unknown token

    Details

      Description

      I attempted to add a new Permission to the "User" role and it failed. Steps to reproduce:

      1. Install Liferay 6.1.x, using built-in HSQLDB
      2. Login as administrator
      3. Navigate to Control Panel -> Roles -> User -> Define Permissions
      4. No matter which Permission category you select, you get a stack trace on the console and the screen does not show any permissions. See attachment for screenshot. The stack trace is:
      18:03:49,788 ERROR [JDBCExceptionReporter:234] unknown token
      18:03:49,791 ERROR [IncludeTag:426] Current URL /group/control_panel/manage?p_p_id=128&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&_128_struts_action=%2Froles_admin%2Fedit_role_permissions&_128_cmd=edit&_128_tabs1=roles&_128_redirect=http%3A%2F%2Flocalhost%3A8080%2Fgroup%2Fcontrol_panel%2Fmanage%3Fp_p_id%3D128%26p_p_lifecycle%3D0%26p_p_state%3Dmaximized%26p_p_mode%3Dview%26_128_struts_action%3D%252Froles_admin%252Fedit_role_permissions%26_128_cmd%3Dview%26_128_tabs1%3Droles%26_128_roleId%3D18&_128_roleId=18&_128_portletResource=134&_128_showModelResources=1 generates exception: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.SQLGrammarException: could not execute query
      18:03:49,796 ERROR [IncludeTag:154] 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.GroupFinderImpl.findByC_C_N_D(GroupFinderImpl.java:578)
      	at com.liferay.portal.service.impl.GroupLocalServiceImpl.search(GroupLocalServiceImpl.java:914)
      	at com.liferay.portal.service.impl.GroupLocalServiceImpl.search(GroupLocalServiceImpl.java:897)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:86)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:60)
      	[.....]
      
      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.SQLQueryImpl.list(SQLQueryImpl.java:110)
      	at com.liferay.portal.dao.orm.hibernate.SQLQueryImpl.list(SQLQueryImpl.java:91)
      	at com.liferay.portal.kernel.dao.orm.QueryUtil.list(QueryUtil.java:60)
      	at com.liferay.portal.kernel.dao.orm.QueryUtil.list(QueryUtil.java:52)
      	at com.liferay.portal.service.persistence.GroupFinderImpl.findByC_C_N_D(GroupFinderImpl.java:564)
      	at com.liferay.portal.service.impl.GroupLocalServiceImpl.search(GroupLocalServiceImpl.java:914)
      	at com.liferay.portal.service.impl.GroupLocalServiceImpl.search(GroupLocalServiceImpl.java:897)
      	at sun.reflect.GeneratedMethodAccessor658.invoke(Unknown Source)
      	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:115)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:86)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:60)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:60)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:60)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:93)
      	at $Proxy22.search(Unknown Source)
      	at com.liferay.portal.service.GroupLocalServiceUtil.search(GroupLocalServiceUtil.java:516)
              [.......]
      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:2536)
      	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
      	at org.hibernate.loader.Loader.list(Loader.java:2271)
      	at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:316)
      	at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1842)
      	at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:165)
      	at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:157)
      	at com.liferay.portal.dao.orm.hibernate.SQLQueryImpl.list(SQLQueryImpl.java:98)
      	... 230 more
      Caused by: java.sql.SQLException: unknown token
      	at org.hsqldb.jdbc.Util.sqlException(Util.java:232)
      	at org.hsqldb.jdbc.JDBCPreparedStatement.<init>(JDBCPreparedStatement.java:3893)
      	at org.hsqldb.jdbc.JDBCConnection.prepareStatement(JDBCConnection.java:643)
      	at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:213)
      	at sun.reflect.GeneratedMethodAccessor59.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy$LazyConnectionInvocationHandler.invoke(LazyConnectionDataSourceProxy.java:376)
      	at $Proxy4.prepareStatement(Unknown Source)
      	at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534)
      	at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:452)
      	at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
      	at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1700)
      	at org.hibernate.loader.Loader.doQuery(Loader.java:801)
      	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
      	at org.hibernate.loader.Loader.doList(Loader.java:2533)
      	... 237 more
      
      
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              james.falkner James Falkner (Inactive)
              Participants of an Issue:
              Recent user:
              Brian Wulbern
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                10 years, 29 weeks ago

                  Packages

                  Version Package
                  --Sprint 12/11
                  6.1.0 CE RC1