On 21/05/2013 14:18, Jesse van Bekkum wrote:
Hi
I would like to provision a multivalued attribute to a relational
database, in a simple one-to-many mapping:
UserId1 | MultivaluedAttr1
UserId1 | MultivaluedAttr2
UserId2 | MultivaluedAttr1
etc.
When I try to just provision a MV attribute, i get an error in core.log:
java.util.concurrent.ExecutionException:
java.lang.IllegalArgumentException: The method is only for single
value attributes.
at
java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:232)
~[na:1.6.0_33]
at java.util.concurrent.FutureTask.get(FutureTask.java:91)
~[na:1.6.0_33]
at
org.apache.syncope.core.propagation.impl.ConnectorFacadeProxy.update(ConnectorFacadeProxy.java:184)
~[ConnectorFacadeProxy.class:na]
Hi,
this looks like an exception raised by the ConnId DatabaseTable
connector, that barely supports only single-valued attributes [1]:
"[...]All of these attributes are single-valued[...]"
at
org.apache.syncope.core.propagation.impl.AbstractPropagationTaskExecutor.createOrUpdate(AbstractPropagationTaskExecutor.java:196)
[AbstractPropagationTaskExecutor.class:na]
at
org.apache.syncope.core.propagation.impl.AbstractPropagationTaskExecutor.execute(AbstractPropagationTaskExecutor.java:297)
[AbstractPropagationTaskExecutor.class:na]
Is there another way to get this to work?
I think you might try yourself with more customizable Scripted SQL
connector [2].
The multivalued attributes I am working with are a bit like roles, so
if I define these as roles, and then provision the memberships
somehow, that would also work.
It might be, but consider that neither DatabaseTable nor Scripted SQL
connectors support roles.
Regards.
[1]
https://connid.atlassian.net/wiki/display/BASE/Database+Table#DatabaseTable-Schema
[2]
https://cwiki.apache.org/confluence/display/SYNCOPE/Configure+a+Scripted+SQL+resource
--
Francesco Chicchiriccò
ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/