Uploaded image for project: 'Syncope'
  1. Syncope
  2. SYNCOPE-1304

Order Groups by userOwner throws DataIntegrityViolation exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.8
    • 2.0.9, 2.1.0
    • core

    Description

      In java code when I search groups with request
       

      {"realm":"/","details":null,"fiql":null,"page":1,"size":50,"orderBy":"userOwner DESC"}
      

      I got exception:

      16:06:33.151 [http-nio-8090-exec-7] ERROR o.a.s.c.l.RestClientExceptionMapper - Exception thrown
      org.apache.syncope.common.lib.SyncopeClientException: DataIntegrityViolation [ERROR: column sv.userowner does not exist
      Position: 17 {prepstmnt 950849233 SELECT u.any_id,sv.userOwner FROM (SELECT DISTINCT any_id FROM group_search WHERE id IS NOT NULL) u,group_search sv WHERE u.any_id=sv.any_id AND u.any_id IN (SELECT any_id FROM group_search WHERE realm_id IN (SELECT id AS realm_id FROM Realm WHERE id=? OR id=? OR id=? OR id=?)) ORDER BY sv.userOwner DESC} [code=0, state=42703]]
      at org.apache.syncope.common.lib.SyncopeClientException.build(SyncopeClientException.java:37)
      at org.apache.syncope.client.lib.RestClientExceptionMapper.checkSyncopeClientCompositeException(RestClientExceptionMapper.java:143)
      at org.apache.syncope.client.lib.RestClientExceptionMapper.fromResponse(RestClientExceptionMapper.java:53)
      at org.apache.syncope.client.lib.RestClientExceptionMapper.fromResponse(RestClientExceptionMapper.java:42)
      at org.apache.cxf.jaxrs.client.ClientProxyImpl.checkResponse(ClientProxyImpl.java:313)
      at org.apache.cxf.jaxrs.client.ClientProxyImpl.handleResponse(ClientProxyImpl.java:876)
      at org.apache.cxf.jaxrs.client.ClientProxyImpl.doChainedInvocation(ClientProxyImpl.java:789)
      at org.apache.cxf.jaxrs.client.ClientProxyImpl.invoke(ClientProxyImpl.java:235)
      at com.sun.proxy.$Proxy118.search(Unknown Source) 
      

      The same problem is reproduced in swagger.

      Request: 

      http://localhost:8080/syncope/rest/groups?page=1&size=20&orderby=userOwner&realm=%2F
      

      Response:

      {
        "status": 409,
        "type": "DataIntegrityViolation",
        "elements": [
          "ERROR: column sv.userowner does not exist\n  Position: 17 {prepstmnt 1083964178 SELECT u.any_id,sv.userOwner FROM (SELECT DISTINCT any_id FROM group_search WHERE id IS NOT NULL) u,group_search sv WHERE u.any_id=sv.any_id AND u.any_id IN (SELECT any_id FROM group_search WHERE realm_id IN (SELECT id AS realm_id FROM Realm WHERE id=? OR id=? OR id=? OR id=?)) ORDER BY sv.userOwner ASC} [code=0, state=42703]"
        ]
      }
      

       

       

      Attachments

        Activity

          People

            ilgrosso Francesco Chicchiriccò
            AlexanderTs Alexander Tsvetkov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: