Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.2 (Crius)
-
Fix Version/s: 2.2 (Crius)
-
Component/s: Model
-
Labels:None
Description
1. using the following configuration: attached CSV file resource; role with the following fragment:
<inducement> <construction> <!-- The c: prefix in type must be there due to a JAXB bug --> <resourceRef oid="10000000-9999-9999-0000-a000ff000002" type="c:ResourceType"/> <attribute> <ref>ri:groups</ref> <outbound> <expression> <value> <ri:groups>Secret group 1</ri:groups> <ri:groups>Secret group 2</ri:groups> </value> </expression> </outbound> </attribute> </construction> </inducement>
3. when adding account and modifying the "groups" attribute manually, everything works. But the role fails to add those two values:
2013-08-05 09:42:48,411 [MODEL] [http-bio-8080-exec-5] ERROR (com.evolveum.midpoint.common.mapping.Mapping): Error evaluating mapping in for attribute {.../resource/instance-2 }groups in role:10000000-9999-9999-0000-a000d0000001(Secret): Attempt to store multiple values in single-valued property {http://midpoint.evolveum.com/xml/ns/public/resource/i nstance-2}groups com.evolveum.midpoint.util.exception.SchemaException: Attempt to store multiple values in single-valued property {http://midpoint.evolveum.com/xml/ns/public/resource/instance- 2}groups at com.evolveum.midpoint.prism.dom.PrismDomProcessor.parsePrismProperty(PrismDomProcessor.java:508) ~[prism-2.2-SNAPSHOT.jar:na] at com.evolveum.midpoint.prism.dom.PrismDomProcessor.parseItem(PrismDomProcessor.java:959) ~[prism-2.2-SNAPSHOT.jar:na] at com.evolveum.midpoint.prism.dom.PrismDomProcessor.parseValueElement(PrismDomProcessor.java:612) ~[prism-2.2-SNAPSHOT.jar:na] at com.evolveum.midpoint.common.expression.evaluator.LiteralExpressionEvaluatorFactory.parseValueElements(LiteralExpressionEvaluatorFactory.java:100) ~[common-2.2-SNAP SHOT.jar:na] at com.evolveum.midpoint.common.expression.evaluator.LiteralExpressionEvaluatorFactory.createEvaluator(LiteralExpressionEvaluatorFactory.java:71) ~[common-2.2-SNAPSHOT .jar:na] at com.evolveum.midpoint.common.expression.Expression.createEvaluator(Expression.java:131) ~[common-2.2-SNAPSHOT.jar:na] at com.evolveum.midpoint.common.expression.Expression.parse(Expression.java:92) ~[common-2.2-SNAPSHOT.jar:na] at com.evolveum.midpoint.common.expression.ExpressionFactory.createExpression(ExpressionFactory.java:84) ~[common-2.2-SNAPSHOT.jar:na] at com.evolveum.midpoint.common.expression.ExpressionFactory.makeExpression(ExpressionFactory.java:74) ~[common-2.2-SNAPSHOT.jar:na] at com.evolveum.midpoint.common.mapping.Mapping.evaluateExpression(Mapping.java:864) ~[common-2.2-SNAPSHOT.jar:na] at com.evolveum.midpoint.common.mapping.Mapping.evaluate(Mapping.java:444) ~[common-2.2-SNAPSHOT.jar:na] at com.evolveum.midpoint.model.lens.LensUtil.evaluateMapping(LensUtil.java:495) ~[model-impl-2.2-SNAPSHOT.jar:na] at com.evolveum.midpoint.model.lens.AccountConstruction.evaluateAttribute(AccountConstruction.java:393) ~[model-impl-2.2-SNAPSHOT.jar:na] at com.evolveum.midpoint.model.lens.AccountConstruction.evaluateAttributes(AccountConstruction.java:334) ~[model-impl-2.2-SNAPSHOT.jar:na] at com.evolveum.midpoint.model.lens.AccountConstruction.evaluate(AccountConstruction.java:232) ~[model-impl-2.2-SNAPSHOT.jar:na] at com.evolveum.midpoint.model.lens.AssignmentEvaluator.evaluateConstruction(AssignmentEvaluator.java:203) ~[model-impl-2.2-SNAPSHOT.jar:na] at com.evolveum.midpoint.model.lens.AssignmentEvaluator.evaluateAssignment(AssignmentEvaluator.java:165) ~[model-impl-2.2-SNAPSHOT.jar:na] at com.evolveum.midpoint.model.lens.AssignmentEvaluator.evaluateAbstractRole(AssignmentEvaluator.java:272) ~[model-impl-2.2-SNAPSHOT.jar:na] at com.evolveum.midpoint.model.lens.AssignmentEvaluator.evaluateTarget(AssignmentEvaluator.java:253) ~[model-impl-2.2-SNAPSHOT.jar:na] at com.evolveum.midpoint.model.lens.AssignmentEvaluator.evaluateTargetRef(AssignmentEvaluator.java:242) ~[model-impl-2.2-SNAPSHOT.jar:na] at com.evolveum.midpoint.model.lens.AssignmentEvaluator.evaluateAssignment(AssignmentEvaluator.java:173) ~[model-impl-2.2-SNAPSHOT.jar:na] at com.evolveum.midpoint.model.lens.AssignmentEvaluator.evaluate(AssignmentEvaluator.java:148) ~[model-impl-2.2-SNAPSHOT.jar:na] at com.evolveum.midpoint.model.lens.projector.AssignmentProcessor.processAssignmentsAccounts(AssignmentProcessor.java:240) ~[model-impl-2.2-SNAPSHOT.jar:na] at com.evolveum.midpoint.model.lens.projector.AssignmentProcessor.processAssignmentsProjections(AssignmentProcessor.java:136) ~[model-impl-2.2-SNAPSHOT.jar:na] at com.evolveum.midpoint.model.lens.projector.Projector.project(Projector.java:164) ~[model-impl-2.2-SNAPSHOT.jar:na] at com.evolveum.midpoint.model.lens.Clockwork.click(Clockwork.java:149) ~[model-impl-2.2-SNAPSHOT.jar:na] at com.evolveum.midpoint.model.lens.Clockwork.run(Clockwork.java:110) ~[model-impl-2.2-SNAPSHOT.jar:na] at com.evolveum.midpoint.model.controller.ModelController.executeChanges_aroundBody2(ModelController.java:384) ~[model-impl-2.2-SNAPSHOT.jar:na] at com.evolveum.midpoint.model.controller.ModelController$AjcClosure3.run(ModelController.java:1) ~[model-impl-2.2-SNAPSHOT.jar:na] at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149) ~[aspectjrt-1.6.12.jar:na] at com.evolveum.midpoint.util.aspect.MidpointAspect.wrapSubsystem(MidpointAspect.java:169) ~[util-2.2-SNAPSHOT.jar:na]
The CSV flatfile has the following header:
"login","fname","lname","enumber","dep","dis","password","groups"
It seems that the attribute limitation for "groups" in schema handling is ignored by the mapping:
<attribute> <ref>ri:groups</ref> <displayName>Groups</displayName> <description>Definition of Group attribute handling.</description> <limitations> <minOccurs>0</minOccurs> <maxOccurs>-1</maxOccurs> <access> <create>true</create> <read>true</read> <update>true</update> </access> </limitations> </attribute>