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

Failure specifying push task filters including db column mapped as integer

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.10, 2.1.1
    • Fix Version/s: 2.0.11, 2.1.2, 3.0.0
    • Component/s: console
    • Labels:
      None

      Description

      It seems that case insensitive approach is used for boolean fields mapped on integer columns.

      Failures are experienced with boolean on postgresql. See exception below.

      Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ERROR: function lower(integer) does not exist
        Hint: No function matches the given name and argument types. You might need to add explicit type casts.
        Position: 132 {prepstmnt 2084826893 SELECT COUNT(any_id) FROM (SELECT u.any_id FROM (SELECT DISTINCT any_id FROM anyObject_search_attr WHERE ((schema_id='enabled' AND LOWER (booleanvalue)=LOWER AND any_id IN ( SELECT DISTINCT any_id FROM anyObject_search_attr WHERE schema_id='enabled' AND LOWER (booleanvalue)=LOWER)) AND any_id IN ( SELECT DISTINCT any_id FROM anyObject_search WHERE type_id=?))) u WHERE u.any_id IN (SELECT any_id FROM anyObject_search WHERE realm_id IN (SELECT id AS realm_id FROM Realm WHERE id=? OR id=?))) count_any_id} [code=0, state=42883]
          at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:218) ~[openjpa-lib-2.4.3.jar:2.4.3]
          at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:202) ~[openjpa-lib-2.4.3.jar:2.4.3]
          at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$700(LoggingConnectionDecorator.java:58) ~[openjpa-lib-2.4.3.jar:2.4.3]
          at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeQuery(LoggingConnectionDecorator.java:1117) ~[openjpa-lib-2.4.3.jar:2.4.3]
          at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:268) ~[openjpa-lib-2.4.3.jar:2.4.3]
          at org.apache.openjpa.jdbc.sql.PostgresDictionary$PostgresPreparedStatement.executeQuery(PostgresDictionary.java:1011) ~[openjpa-jdbc-2.4.3.jar:2.4.3]
          at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:268) ~[openjpa-lib-2.4.3.jar:2.4.3]
          at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeQuery(JDBCStoreManager.java:1800) ~[openjpa-jdbc-2.4.3.jar:2.4.3]
          at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:258) ~[openjpa-lib-2.4.3.jar:2.4.3]
          at org.apache.openjpa.jdbc.kernel.SQLStoreQuery$SQLExecutor.executeQuery(SQLStoreQuery.java:317) ~[openjpa-jdbc-2.4.3.jar:2.4.3]
          at org.apache.openjpa.jdbc.kernel.SQLStoreQuery$SQLExecutor.executeQuery(SQLStoreQuery.java:220) ~[openjpa-jdbc-2.4.3.jar:2.4.3]
          at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1011) ~[openjpa-kernel-2.4.3.jar:2.4.3]
          at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:869) ~[openjpa-kernel-2.4.3.jar:2.4.3]
          at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:800) ~[openjpa-kernel-2.4.3.jar:2.4.3]
          at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:541) ~[openjpa-kernel-2.4.3.jar:2.4.3]
          at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:274) ~[openjpa-persistence-2.4.3.jar:2.4.3]
          at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:290) ~[openjpa-persistence-2.4.3.jar:2.4.3]
          at org.apache.openjpa.persistence.QueryImpl.getSingleResult(QueryImpl.java:318) ~[openjpa-persistence-2.4.3.jar:2.4.3]
          at org.apache.syncope.core.persistence.jpa.dao.JPAAnySearchDAO.doCount(JPAAnySearchDAO.java:143) ~[syncope-core-persistence-jpa-2.0.10.jar:2.0.10]
          at org.apache.syncope.core.persistence.jpa.dao.AbstractAnySearchDAO.count(AbstractAnySearchDAO.java:129) ~[syncope-core-persistence-jpa-2.0.10.jar:2.0.10]
          at org.apache.syncope.core.provisioning.java.pushpull.PushJobDelegate.doExecuteProvisioning(PushJobDelegate.java:229) ~[syncope-core-provisioning-java-2.0.10.jar:?]
          at org.apache.syncope.core.provisioning.java.pushpull.PushJobDelegate.doExecuteProvisioning(PushJobDelegate.java:57) ~[syncope-core-provisioning-java-2.0.10.jar:?]
          at org.apache.syncope.core.provisioning.java.pushpull.AbstractProvisioningJobDelegate.doExecute(AbstractProvisioningJobDelegate.java:560) ~[syncope-core-provisioning-java-2.0.10.jar:?]
          at org.apache.syncope.core.provisioning.java.job.AbstractSchedTaskJobDelegate.execute(AbstractSchedTaskJobDelegate.java:120) ~[syncope-core-provisioning-java-2.0.10.jar:2.0.10]
          at sun.reflect.GeneratedMethodAccessor1753.invoke(Unknown Source) ~[?:?]
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_141]
          at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_141]
          at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) ~[spring-aop-4.3.18.RELEASE.jar:4.3.18.RELEASE]
          at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) ~[spring-aop-4.3.18.RELEASE.jar:4.3.18.RELEASE]
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.3.18.RELEASE.jar:4.3.18.RELEASE]
          at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) ~[spring-tx-4.3.18.RELEASE.jar:4.3.18.RELEASE]
          at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282) ~[spring-tx-4.3.18.RELEASE.jar:4.3.18.RELEASE]
          at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) ~[spring-tx-4.3.18.RELEASE.jar:4.3.18.RELEASE]
          at org.apache.syncope.core.persistence.jpa.spring.DomainTransactionInterceptor.invoke(DomainTransactionInterceptor.java:64) ~[syncope-core-persistence-jpa-2.0.10.jar:2.0.10]
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.18.RELEASE.jar:4.3.18.RELEASE]
          at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) ~[spring-aop-4.3.18.RELEASE.jar:4.3.18.RELEASE]
          at com.sun.proxy.$Proxy615.execute(Unknown Source) ~[?:?]
          at org.apache.syncope.core.provisioning.java.job.TaskJob$1.exec(TaskJob.java:86) ~[syncope-core-provisioning-java-2.0.10.jar:2.0.10]
          ... 5 more

        Attachments

          Activity

            People

            • Assignee:
              fmartelli fabio martelli
              Reporter:
              fmartelli fabio martelli
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: