Re: Scripted SQL Pull Task Error
Hi Matteo, * "username" is mapped in my resource. The "Purpose" column for "username" is set to the icon with both pull and push arrows. (That is Sync, I believe). * All users have a valid non blank username value. Indeed, I checked with a query, and it has been checked also by Sakai itself. So far I have the same problem. This is what the logs say: core-persistence.log shows this for each user creation attempt: 16:29:19.947 WARN org.apache.syncope.core.persistence.jpa.validation.entity.EntityValidationListener - Bean validation errors found: [ConstraintViolationImpl{rootBean=JPAUser[null], propertyPath='username', message='Blank username', leafBean=JPAUser[null], value=null}] core.log shows this for each user creation attempt: 16:26:28.884 ERROR org.apache.syncope.core.provisioning.api.pushpull.SyncopeResultHandler - Could not create USER f84440b0-3cc7-4d83-ae02-951c81faf2e22 org.apache.syncope.core.persistence.api.attrvalue.validation.InvalidEntityException: JPAUser [Standard] at org.apache.syncope.core.persistence.jpa.validation.entity.EntityValidationListener.validate(EntityValidationListener.java:73) ~[syncope-core-persistence-jpa-2.0.4.jar:2.0.4] at sun.reflect.GeneratedMethodAccessor517.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_71] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_71] at org.apache.openjpa.event.BeanLifecycleCallbacks.makeCallback(BeanLifecycleCallbacks.java:85) ~[openjpa-kernel-2.4.2.jar:2.4.2] at org.apache.openjpa.persistence.PersistenceListenerAdapter.makeCallback(PersistenceListenerAdapter.java:71) ~[openjpa-persistence-2.4.2.jar:2.4.2] at org.apache.openjpa.persistence.PersistenceListenerAdapter.beforePersist(PersistenceListenerAdapter.java:85) ~[openjpa-persistence-2.4.2.jar:2.4.2] at org.apache.openjpa.event.LifecycleEventManager.fireEvent(LifecycleEventManager.java:404) ~[openjpa-kernel-2.4.2.jar:2.4.2] at org.apache.openjpa.event.LifecycleEventManager.fireEvent(LifecycleEventManager.java:308) ~[openjpa-kernel-2.4.2.jar:2.4.2] at org.apache.openjpa.kernel.BrokerImpl.fireLifecycleEvent(BrokerImpl.java:814) ~[openjpa-kernel-2.4.2.jar:2.4.2] at org.apache.openjpa.kernel.VersionAttachStrategy.attach(VersionAttachStrategy.java:140) ~[openjpa-kernel-2.4.2.jar:2.4.2] at org.apache.openjpa.kernel.AttachManager.attach(AttachManager.java:252) ~[openjpa-kernel-2.4.2.jar:2.4.2] at org.apache.openjpa.kernel.AttachManager.attach(AttachManager.java:105) ~[openjpa-kernel-2.4.2.jar:2.4.2] at org.apache.openjpa.kernel.BrokerImpl.attach(BrokerImpl.java:3508) ~[openjpa-kernel-2.4.2.jar:2.4.2] at org.apache.openjpa.kernel.DelegatingBroker.attach(DelegatingBroker.java:1213) ~[openjpa-kernel-2.4.2.jar:2.4.2] at org.apache.openjpa.persistence.EntityManagerImpl.merge(EntityManagerImpl.java:879) ~[openjpa-persistence-2.4.2.jar:2.4.2] at org.apache.syncope.core.persistence.jpa.dao.AbstractAnyDAO.save(AbstractAnyDAO.java:543) ~[syncope-core-persistence-jpa-2.0.4.jar:2.0.4] at org.apache.syncope.core.persistence.jpa.dao.JPAUserDAO.save(JPAUserDAO.java:437) ~[syncope-core-persistence-jpa-2.0.4.jar:2.0.4] at org.apache.syncope.core.persistence.jpa.dao.JPAUserDAO.save(JPAUserDAO.java:84) ~[syncope-core-persistence-jpa-2.0.4.jar:2.0.4] at sun.reflect.GeneratedMethodAccessor527.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_71] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_71] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE] at com.sun.proxy.$Proxy85.save(Unknown Source) ~[?:?] at org.apache.syncope.core.workflow.java.DefaultUserWorkflowAdapter.doCreate(DefaultUserWorkflowAdapter.java:84) ~[syncope-core-workflow-java-2.0.4.jar:2.0.4] at org.apache.syncope.core.workflow.java.AbstractUserWorkflowAdapter.create(AbstractUserWorkflowAdapter.java:91) ~[syncope-core-workflow-java-2.0.4.jar:2.0.4] at sun.reflect.GeneratedMethodAccessor524.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_71] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_71] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) ~[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
Re: Scripted SQL Pull Task Error
Hi Sergio, There could be 2 possibilities for that error: - there is no mapping for "username" in your resource "Edit Provision Rules" section or there is an incorrect mapping (e.g. "Purpose" column for "username" is set not to handle synchronization); - one or more users in your external resource do not have a "username" value (it is blank) and Syncope requires it. Please check those things and let me know. Regards, Matteo On 2017-09-13 02:53, Sergio Murielwrote: > Hi everyone, > > following the advise from Francesco I decided to connect to my Sakai LMS > instance starting from the given scripts at > > https://github.com/Tirasa/ConnIdDBBundle/tree/master/scriptedsql/src/main/resources/samples > > > I'm trying to pull the users from there, so I customized both the Sync and > Search scripts (because the user info is not in a single table). I run the > pull task and I can see the running task icon spinning for several minutes > (Dashboard, control tab); however, when it stops spinning I get no new users > but a message like this for each user in my core-persistence.log: > > > 18:43:19.304 WARN > org.apache.syncope.core.persistence.jpa.validation.entity.EntityValidationListener > - Bean validation errors found: > [ConstraintViolationImpl{rootBean=JPAUser[null], propertyPath='username', > message='Blank username', leafBean=JPAUser[null], value=null}] > > > What I find weird, is that I do see that most of the users have username > attribute (in core-connid.log), like this one: > > > 18:43:13.858 DEBUG Enter: {Uid=Attribute: {Name=__UID__, > Value=[5165468435165165165165]}, ObjectClass=ObjectClass: __ACCOUNT__, > Attributes=[Attribute: {Name=lastname, Value=[Register]}, Attribute: > {Name=username, Value=[a...@123.org]}, Attribute: {Name=__NAME__, > Value=[a...@123.org]}, Attribute: {Name=firstname, Value=[Scott]}, Attribute: > {Name=__UID__, Value=[5165468435165165165165]}, Attribute: {Name=email, > Value=[a...@123.org]}], Name=Attribute: {Name=__NAME__, > Value=[a...@123.org]}} Method: handle > > It should at least load the ones that are correct. Am I right? > > > Thank you for the help! > > Best Regards, > Sergio Muriel >