Hi 
I am trying to sync users from Syncope to a backend DB using scriptesql 
connector.
The users are being created (in the tables) but a subsequent call creates again 
the users duplicating them. Also I am getting this error in the Search script 
which I cannot solve. See stack trace below.
Can you help me please? much appreciated

12:04:41.720 DEBUG Search script loaded Method: executeQuery
12:04:41.720 DEBUG ObjectClass: __ACCOUNT__     Method: executeQuery
12:04:41.720 INFO  Entering SEARCH Script************** Method: run
12:04:41.722 INFO  GGOO SEARCH SCRIPT......     Method: run
12:04:41.722 DEBUG Search ok    Method: executeQuery
12:04:41.722 DEBUG Enter: {Uid=Attribute: {Name=__UID__, 
Value=[17e4c35c-383f-1035-9abe-d7b00eb73b03]}, ObjectClass=ObjectClass: 
__ACCOUNT__, Attributes=[Attribute: {Name=uid, Value=[administrator]}, 
Attribute: {Name=__NAME__, Value=[administrator]}, Attribute: {Name=cn, 
Value=[administrator]}, Attribute: {Name=__UID__, 
Value=[17e4c35c-383f-1035-9abe-d7b00eb73b03]}], Name=Attribute: {Name=__NAME__, 
Value=[administrator]}}       Method: handle
12:04:41.722 DEBUG Exception:   Method: handle
java.lang.IllegalStateException: Object {Uid=Attribute: {Name=__UID__, 
Value=[17e4c35c-383f-1035-9abe-d7b00eb73b03]}, ObjectClass=ObjectClass: 
__ACCOUNT__, Attributes=[Attribute: {Name=__NAME__, Value=[administrator]}, 
Attribute: {Name=__UID__, Value=[17e4c35c-383f-1035-9abe-d7b00eb73b03]}], 
Name=Attribute: {Name=__NAME__, Value=[administrator]}} was returned by the 
connector but failed to pass the framework filter. This seems like wrong 
implementation of the filter in the connector.
        at 
org.identityconnectors.framework.impl.api.local.operations.FilteredResultsHandler.handle(FilteredResultsHandler.java:82)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at 
org.identityconnectors.framework.impl.api.local.operations.SearchImpl$AttributesToGetSearchResultsHandler.handle(SearchImpl.java:278)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at 
org.identityconnectors.framework.impl.api.local.operations.SearchImpl$1.handle(SearchImpl.java:142)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at 
org.identityconnectors.framework.impl.api.SearchResultsHandlerLoggingProxy.handle(SearchResultsHandlerLoggingProxy.java:64)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at 
net.tirasa.connid.bundles.db.scriptedsql.ScriptedSQLConnector.processResults(ScriptedSQLConnector.java:586)
 ~[?:?]
        at 
net.tirasa.connid.bundles.db.scriptedsql.ScriptedSQLConnector.executeQuery(ScriptedSQLConnector.java:403)
 ~[?:?]
        at 
net.tirasa.connid.bundles.db.scriptedsql.ScriptedSQLConnector.executeQuery(ScriptedSQLConnector.java:61)
 ~[?:?]
        at 
org.identityconnectors.framework.impl.api.local.operations.SearchImpl.rawSearch(SearchImpl.java:193)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at 
org.identityconnectors.framework.impl.api.local.operations.SearchImpl.search(SearchImpl.java:130)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at sun.reflect.GeneratedMethodAccessor239.invoke(Unknown Source) ~[?:?]
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:1.8.0_91]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91]
        at 
org.identityconnectors.framework.impl.api.local.operations.ConnectorAPIOperationRunnerProxy.invoke(ConnectorAPIOperationRunnerProxy.java:98)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at com.sun.proxy.$Proxy256.search(Unknown Source) ~[?:?]
        at 
org.identityconnectors.framework.impl.api.local.operations.GetImpl.getObject(GetImpl.java:67)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source) ~[?:?]
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:1.8.0_91]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91]
        at 
org.identityconnectors.framework.impl.api.local.operations.ThreadClassLoaderManagerProxy.invoke(ThreadClassLoaderManagerProxy.java:96)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at com.sun.proxy.$Proxy263.getObject(Unknown Source) ~[?:?]
        at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source) ~[?:?]
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:1.8.0_91]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91]
        at 
org.identityconnectors.framework.impl.api.DelegatingTimeoutProxy.invoke(DelegatingTimeoutProxy.java:99)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at com.sun.proxy.$Proxy263.getObject(Unknown Source) ~[?:?]
        at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source) ~[?:?]
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:1.8.0_91]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91]
        at 
org.identityconnectors.framework.impl.api.LoggingProxy.invoke(LoggingProxy.java:83)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at com.sun.proxy.$Proxy263.getObject(Unknown Source) ~[?:?]
        at 
org.identityconnectors.framework.impl.api.AbstractConnectorFacade.getObject(AbstractConnectorFacade.java:261)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at 
org.apache.syncope.core.provisioning.java.AsyncConnectorFacade.getObject(AsyncConnectorFacade.java:104)
 ~[syncope-core-provisioning-java-2.0.4.jar:2.0.4]
        at 
org.apache.syncope.core.provisioning.java.AsyncConnectorFacade$$FastClassBySpringCGLIB$$886ae36a.invoke(<generated>)
 ~[syncope-core-provisioning-java-2.0.4.jar:2.0.4]
        at 
org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) 
~[spring-core-4.3.9.RELEASE.jar:4.3.9.RELEASE]
        at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738)
 ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE]
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
 ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE]
        at 
org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:115)
 ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
~[?:1.8.0_91]
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
[?:1.8.0_91]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
[?:1.8.0_91]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]
12:04:41.722 DEBUG Exception:   Method: executeQuery
org.identityconnectors.framework.common.exceptions.ConnectorException: Search 
script error
        at 
net.tirasa.connid.bundles.db.scriptedsql.ScriptedSQLConnector.executeQuery(ScriptedSQLConnector.java:405)
 ~[?:?]
        at 
net.tirasa.connid.bundles.db.scriptedsql.ScriptedSQLConnector.executeQuery(ScriptedSQLConnector.java:61)
 ~[?:?]
        at 
org.identityconnectors.framework.impl.api.local.operations.SearchImpl.rawSearch(SearchImpl.java:193)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at 
org.identityconnectors.framework.impl.api.local.operations.SearchImpl.search(SearchImpl.java:130)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at sun.reflect.GeneratedMethodAccessor239.invoke(Unknown Source) ~[?:?]
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:1.8.0_91]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91]
        at 
org.identityconnectors.framework.impl.api.local.operations.ConnectorAPIOperationRunnerProxy.invoke(ConnectorAPIOperationRunnerProxy.java:98)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at com.sun.proxy.$Proxy256.search(Unknown Source) ~[?:?]
        at 
org.identityconnectors.framework.impl.api.local.operations.GetImpl.getObject(GetImpl.java:67)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source) ~[?:?]
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:1.8.0_91]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91]
        at 
org.identityconnectors.framework.impl.api.local.operations.ThreadClassLoaderManagerProxy.invoke(ThreadClassLoaderManagerProxy.java:96)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at com.sun.proxy.$Proxy263.getObject(Unknown Source) ~[?:?]
        at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source) ~[?:?]
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:1.8.0_91]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91]
        at 
org.identityconnectors.framework.impl.api.DelegatingTimeoutProxy.invoke(DelegatingTimeoutProxy.java:99)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at com.sun.proxy.$Proxy263.getObject(Unknown Source) ~[?:?]
        at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source) ~[?:?]
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:1.8.0_91]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91]
        at 
org.identityconnectors.framework.impl.api.LoggingProxy.invoke(LoggingProxy.java:83)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at com.sun.proxy.$Proxy263.getObject(Unknown Source) ~[?:?]
        at 
org.identityconnectors.framework.impl.api.AbstractConnectorFacade.getObject(AbstractConnectorFacade.java:261)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at 
org.apache.syncope.core.provisioning.java.AsyncConnectorFacade.getObject(AsyncConnectorFacade.java:104)
 ~[syncope-core-provisioning-java-2.0.4.jar:2.0.4]
        at 
org.apache.syncope.core.provisioning.java.AsyncConnectorFacade$$FastClassBySpringCGLIB$$886ae36a.invoke(<generated>)
 ~[syncope-core-provisioning-java-2.0.4.jar:2.0.4]
        at 
org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) 
~[spring-core-4.3.9.RELEASE.jar:4.3.9.RELEASE]
        at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738)
 ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE]
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
 ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE]
        at 
org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:115)
 ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
~[?:1.8.0_91]
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
[?:1.8.0_91]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
[?:1.8.0_91]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]
Caused by: java.lang.IllegalStateException: Object {Uid=Attribute: 
{Name=__UID__, Value=[17e4c35c-383f-1035-9abe-d7b00eb73b03]}, 
ObjectClass=ObjectClass: __ACCOUNT__, Attributes=[Attribute: {Name=__NAME__, 
Value=[administrator]}, Attribute: {Name=__UID__, 
Value=[17e4c35c-383f-1035-9abe-d7b00eb73b03]}], Name=Attribute: {Name=__NAME__, 
Value=[administrator]}} was returned by the connector but failed to pass the 
framework filter. This seems like wrong implementation of the filter in the 
connector.
        at 
org.identityconnectors.framework.impl.api.local.operations.FilteredResultsHandler.handle(FilteredResultsHandler.java:82)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at 
org.identityconnectors.framework.impl.api.local.operations.SearchImpl$AttributesToGetSearchResultsHandler.handle(SearchImpl.java:278)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at 
org.identityconnectors.framework.impl.api.local.operations.SearchImpl$1.handle(SearchImpl.java:142)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at 
org.identityconnectors.framework.impl.api.SearchResultsHandlerLoggingProxy.handle(SearchResultsHandlerLoggingProxy.java:64)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at 
net.tirasa.connid.bundles.db.scriptedsql.ScriptedSQLConnector.processResults(ScriptedSQLConnector.java:586)
 ~[?:?]
        at 
net.tirasa.connid.bundles.db.scriptedsql.ScriptedSQLConnector.executeQuery(ScriptedSQLConnector.java:403)
 ~[?:?]
        ... 35 more
12:04:41.722 DEBUG Exception:   Method: getObject
org.identityconnectors.framework.common.exceptions.ConnectorException: Search 
script error
        at 
net.tirasa.connid.bundles.db.scriptedsql.ScriptedSQLConnector.executeQuery(ScriptedSQLConnector.java:405)
 ~[?:?]
        at 
net.tirasa.connid.bundles.db.scriptedsql.ScriptedSQLConnector.executeQuery(ScriptedSQLConnector.java:61)
 ~[?:?]
        at 
org.identityconnectors.framework.impl.api.local.operations.SearchImpl.rawSearch(SearchImpl.java:193)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at 
org.identityconnectors.framework.impl.api.local.operations.SearchImpl.search(SearchImpl.java:130)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at sun.reflect.GeneratedMethodAccessor239.invoke(Unknown Source) ~[?:?]
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:1.8.0_91]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91]
        at 
org.identityconnectors.framework.impl.api.local.operations.ConnectorAPIOperationRunnerProxy.invoke(ConnectorAPIOperationRunnerProxy.java:98)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at com.sun.proxy.$Proxy256.search(Unknown Source) ~[?:?]
        at 
org.identityconnectors.framework.impl.api.local.operations.GetImpl.getObject(GetImpl.java:67)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source) ~[?:?]
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:1.8.0_91]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91]
        at 
org.identityconnectors.framework.impl.api.local.operations.ThreadClassLoaderManagerProxy.invoke(ThreadClassLoaderManagerProxy.java:96)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at com.sun.proxy.$Proxy263.getObject(Unknown Source) ~[?:?]
        at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source) ~[?:?]
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:1.8.0_91]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91]
        at 
org.identityconnectors.framework.impl.api.DelegatingTimeoutProxy.invoke(DelegatingTimeoutProxy.java:99)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at com.sun.proxy.$Proxy263.getObject(Unknown Source) ~[?:?]
        at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source) ~[?:?]
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:1.8.0_91]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91]
        at 
org.identityconnectors.framework.impl.api.LoggingProxy.invoke(LoggingProxy.java:83)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at com.sun.proxy.$Proxy263.getObject(Unknown Source) ~[?:?]
        at 
org.identityconnectors.framework.impl.api.AbstractConnectorFacade.getObject(AbstractConnectorFacade.java:261)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at 
org.apache.syncope.core.provisioning.java.AsyncConnectorFacade.getObject(AsyncConnectorFacade.java:104)
 ~[syncope-core-provisioning-java-2.0.4.jar:2.0.4]
        at 
org.apache.syncope.core.provisioning.java.AsyncConnectorFacade$$FastClassBySpringCGLIB$$886ae36a.invoke(<generated>)
 ~[syncope-core-provisioning-java-2.0.4.jar:2.0.4]
        at 
org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) 
~[spring-core-4.3.9.RELEASE.jar:4.3.9.RELEASE]
        at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738)
 ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE]
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
 ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE]
        at 
org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:115)
 ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
~[?:1.8.0_91]
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
[?:1.8.0_91]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
[?:1.8.0_91]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]
Caused by: java.lang.IllegalStateException: Object {Uid=Attribute: 
{Name=__UID__, Value=[17e4c35c-383f-1035-9abe-d7b00eb73b03]}, 
ObjectClass=ObjectClass: __ACCOUNT__, Attributes=[Attribute: {Name=__NAME__, 
Value=[administrator]}, Attribute: {Name=__UID__, 
Value=[17e4c35c-383f-1035-9abe-d7b00eb73b03]}], Name=Attribute: {Name=__NAME__, 
Value=[administrator]}} was returned by the connector but failed to pass the 
framework filter. This seems like wrong implementation of the filter in the 
connector.
        at 
org.identityconnectors.framework.impl.api.local.operations.FilteredResultsHandler.handle(FilteredResultsHandler.java:82)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at 
org.identityconnectors.framework.impl.api.local.operations.SearchImpl$AttributesToGetSearchResultsHandler.handle(SearchImpl.java:278)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at 
org.identityconnectors.framework.impl.api.local.operations.SearchImpl$1.handle(SearchImpl.java:142)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at 
org.identityconnectors.framework.impl.api.SearchResultsHandlerLoggingProxy.handle(SearchResultsHandlerLoggingProxy.java:64)
 ~[connector-framework-internal-1.4.2.0.jar:?]
        at 
net.tirasa.connid.bundles.db.scriptedsql.ScriptedSQLConnector.processResults(ScriptedSQLConnector.java:586)
 ~[?:?]
        at 
net.tirasa.connid.bundles.db.scriptedsql.ScriptedSQLConnector.executeQuery(ScriptedSQLConnector.java:403)
 ~[?:?]
        ... 35 more

Reply via email to