[ 
https://issues.apache.org/jira/browse/SYNCOPE-1304?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Francesco Chicchiriccò updated SYNCOPE-1304:
--------------------------------------------
    Fix Version/s:     (was: 2.0.8)
                   2.1.0
                   2.0.9

> Order Groups by userOwner throws DataIntegrityViolation exception
> -----------------------------------------------------------------
>
>                 Key: SYNCOPE-1304
>                 URL: https://issues.apache.org/jira/browse/SYNCOPE-1304
>             Project: Syncope
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 2.0.8
>            Reporter: Alexander Tsvetkov
>            Assignee: Francesco Chicchiriccò
>            Priority: Major
>              Labels: orderby
>             Fix For: 2.0.9, 2.1.0
>
>
> In java code when I search groups with request
>   
> {code:java}
> {"realm":"/","details":null,"fiql":null,"page":1,"size":50,"orderBy":"userOwner
>  DESC"}
> {code}
> I got exception:
> {noformat}
> 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) 
> {noformat}
> The same problem is reproduced in swagger.
> Request: 
> {noformat}
> http://localhost:8080/syncope/rest/groups?page=1&size=20&orderby=userOwner&realm=%2F
> {noformat}
> Response:
> {noformat}
> {
>   "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]"
>   ]
> }
> {noformat}
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to