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

Postgres error when defining Role permisions on control panel: "operator does not exists: character varying = bigint"

    Details

      Description

      When trying to use the "Define permissions" feature for certain roles (Power User, User and new created ones), checkboxes does not appear and the tomcat log record the error:

      20:55:03,990 ERROR [JDBCExceptionReporter:101] ERROR: operator does not exists: character varying = bigint
      HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.
      Position: 187
      20:55:03,999 ERROR [IncludeTag:234] Current URL /group/control_panel/manage?p_p_id=128&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&doAsGroupId=10147&refererPlid=10150&_128_struts_action=%2Fenterprise_admin_roles%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%26doAsGroupId%3D10147%26refererPlid%3D10150%26_128_struts_action%3D%252Fenterprise_admin_roles%252Fedit_role_permissions%26_128_cmd%3Dview%26_128_tabs1%3Droles%26_128_roleId%3D10133&_128_roleId=10133&_128_portletResource=82&_128_showModelResources=0 generates exception: Ha sucedido una excepción al procesar la página JSP /html/portlet/enterprise_admin/edit_role_permissions_resource.jsp en línea 97

      94:
      95: groupParams.put("rolePermissions", rolePermissions);
      96:
      97: groups = GroupLocalServiceUtil.search(company.getCompanyId(), null, null, groupParams, QueryUtil.ALL_POS, QueryUtil.ALL_POS);
      98:
      99: groupIdsArray = new long[groups.size()];
      100:

      On postgres log:

      ERROR: operator does not exists: character varying = bigint
      ...
      2010-04-01 14:42:44 VET SENTENCE: ( SELECT Group_.groupId AS groupId, Group_.name AS groupName, Group_.type_ AS groupType, Group_.friendlyURL AS groupFriendlyURL FROM Group_ INNER JOIN Resource_ ON (Resource_.primKey = Group_.groupId) INNER JOIN ResourceCode ON (ResourceCode.codeId = Resource_.codeId) INNER JOIN Permission_ ON (Permission_.resourceId = Resource_.resourceId) INNER JOIN Roles_Permissions ON (Roles_Permissions.permissionId = Permission_.permissionId) WHERE (Group_.liveGroupId = 0) AND (ResourceCode.name = $1) AND (ResourceCode.scope = $2) AND (Permission_.actionId = $3) AND (Roles_Permissions.roleId = $4) AND (Group_.companyId = $5) AND (Group_.classNameId = 10009) AND (Group_.liveGroupId = 0) AND (Group_.name != 'Control Panel') AND (lower(Group_.name) LIKE $6 OR $7 IS NULL) AND (lower(Group_.description) LIKE $8 OR $9 IS NULL) ) ORDER BY groupName ASC

      Testing directly the SQL sentence we obtain the error on:
      LINE 6: INNER JOIN Resource_ ON (Resource_.primKey = Group_.groupId...
      ^

      Looking in the sources files for the specific condition, it seems to belong to portal-impl/src/custom-sql/portal.xml:

      <sql id="com.liferay.portal.service.persistence.GroupFinder.joinByRolePermissions">
      <![CDATA[
      INNER JOIN
      Resource_ ON
      (Resource_.primKey = Group_.groupId)
      INNER JOIN
      ResourceCode ON
      (ResourceCode.codeId = Resource_.codeId)
      INNER JOIN
      Permission_ ON
      (Permission_.resourceId = Resource_.resourceId)
      INNER JOIN
      Roles_Permissions ON
      (Roles_Permissions.permissionId = Permission_.permissionId)
      WHERE
      (Group_.liveGroupId = 0) AND
      (ResourceCode.name = ?) AND
      (ResourceCode.scope = ?) AND
      (Permission_.actionId = ?) AND
      (Roles_Permissions.roleId = ?)
      ]]>
      </sql>

      Interestingly, the error does not trigger neither with the "Organization Member" nor the "Community Member" roles :$

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                8 years, 25 weeks, 6 days ago

                Packages

                Version Package
                --Sprint 12/11
                6.1.0 CE RC1