<div dir="ltr"><div>This is the relevant logs, by the way. I'm replacing the current user name (which is not null, set to a joke value of Funguy) with Devin in this run:<br><br>2015-12-07 16:05:20,677 [MODEL] [Thread-15] TRACE (com.evolveum.midpoint.model.impl.lens.projector.Projector): Lens context:<br>---[ PROJECTOR (INITIAL) context projector start ]--------------------------------<br>LensContext: state=INITIAL, Wave(e=0,p=0,max=0), focus, 0 projections, 1 changes, fresh=false<br>  Channel: <a href="http://midpoint.evolveum.com/xml/ns/public/gui/channels-3#user">http://midpoint.evolveum.com/xml/ns/public/gui/channels-3#user</a><br>  Options: [force=false,raw=null,noCrypt=null,reconcile=true,executeImmediatelyAfterApproval=false,overwrite=null,limitPropagation=null,reevaluateSearchFilters=null]<br>  Settings: null<br>  FOCUS:<br>    Focus, NOT FRESH, oid=b5cff21a-5a9d-47a0-b042-a299ada2f14f, syncIntent=null<br>      Focus old: null<br>      Focus current: null<br>      Focus new: null<br>      Focus primary delta:<br>        ObjectDelta<UserType>(UserType:b5cff21a-5a9d-47a0-b042-a299ada2f14f,MODIFY):<br>          givenName<br>            REPLACE: Devin<br>      Focus secondary delta: empty<br>      Focus executed deltas: []<br>  PROJECTIONS: none<br><br>2015-12-07 16:05:21,246 [PROVISIONING] [Thread-15] INFO (com.evolveum.midpoint.provisioning.impl.ConnectorManager): Created new connector instance for resource:c1b8b075-8c45-4058-ba32-753b87ac2da0<br>(Addressbook): org.identityconnectors.databasetable.DatabaseTableConnector v1.4.0.49<br>2015-12-07 16:05:21,389 [MODEL] [Thread-15] TRACE (com.evolveum.midpoint.model.impl.lens.projector.Projector): WAVE: Starting the waves.<br>2015-12-07 16:05:21,389 [MODEL] [Thread-15] TRACE (com.evolveum.midpoint.model.impl.lens.projector.Projector): WAVE 0 (maxWaves=1, executionWave=0)<br><br></div><i>[Duplicate error message logged by Expression here]</i><br><div><div><br>2015-12-07 16:05:21,930 [MODEL] [Thread-15] ERROR (com.evolveum.midpoint.model.common.mapping.Mapping): Error evaluating mapping in objectTemplate:c0c010c0-d34d-b33f-f00d-777222222334(User Template 2): Failed to convert query. Reason: Null polystring orig in XNode(map:1 entries)(givenName=PPV(PolyString:Devin); ) in expression in mapping in objectTemplate:c0c010c0-d34d-b33f-f00d-777222222334(User Template 2)<br>com.evolveum.midpoint.util.exception.SchemaException: Failed to convert query. Reason: Null polystring orig in XNode(map:1 entries)(givenName=PPV(PolyString:Devin); ) in expression in mapping in o<br>bjectTemplate:c0c010c0-d34d-b33f-f00d-777222222334(User Template 2)<br>        at com.evolveum.midpoint.model.common.expression.evaluator.AbstractValueTransformationExpressionEvaluator$1.process(AbstractValueTransformationExpressionEvaluator.java:432) ~[model-common-<br>3.3.jar:na]<br>        at com.evolveum.midpoint.model.common.expression.evaluator.AbstractValueTransformationExpressionEvaluator$1.process(AbstractValueTransformationExpressionEvaluator.java:1) ~[model-common-3.<br>3.jar:na]<br>        at com.evolveum.midpoint.util.MiscUtil.carthesian(MiscUtil.java:370) ~[util-3.3.jar:na]<br>        at com.evolveum.midpoint.util.MiscUtil.carthesian(MiscUtil.java:360) ~[util-3.3.jar:na]<br>        at com.evolveum.midpoint.model.common.expression.evaluator.AbstractValueTransformationExpressionEvaluator.evaluateRelativeExpression(AbstractValueTransformationExpressionEvaluator.java:442<br>) ~[model-common-3.3.jar:na]<br>        at com.evolveum.midpoint.model.common.expression.evaluator.AbstractValueTransformationExpressionEvaluator.evaluate(AbstractValueTransformationExpressionEvaluator.java:114) ~[model-common-3<br>.3.jar:na]<br>        at com.evolveum.midpoint.model.common.expression.Expression.evaluate(Expression.java:133) ~[model-common-3.3.jar:na]<br>        at com.evolveum.midpoint.model.common.mapping.Mapping.evaluateExpression(Mapping.java:969) ~[model-common-3.3.jar:na]<br>        at com.evolveum.midpoint.model.common.mapping.Mapping.evaluate(Mapping.java:508) ~[model-common-3.3.jar:na]<br>        at com.evolveum.midpoint.model.impl.lens.projector.MappingEvaluator.evaluateMapping(MappingEvaluator.java:88) [model-impl-3.3.jar:na]<br>        at com.evolveum.midpoint.model.impl.lens.projector.ObjectTemplateProcessor.collectTripleFromMappings(ObjectTemplateProcessor.java:382) [model-impl-3.3.jar:na]<br>        at com.evolveum.midpoint.model.impl.lens.projector.ObjectTemplateProcessor.collectTripleFromTemplate(ObjectTemplateProcessor.java:316) [model-impl-3.3.jar:na]<br>        at com.evolveum.midpoint.model.impl.lens.projector.ObjectTemplateProcessor.processTemplate(ObjectTemplateProcessor.java:147) [model-impl-3.3.jar:na]<br>        at com.evolveum.midpoint.model.impl.lens.projector.FocusProcessor.processFocusFocus(FocusProcessor.java:219) [model-impl-3.3.jar:na]<br>        at com.evolveum.midpoint.model.impl.lens.projector.FocusProcessor.processFocus(FocusProcessor.java:139) [model-impl-3.3.jar:na]<br>        at com.evolveum.midpoint.model.impl.lens.projector.Projector.projectInternal(Projector.java:208) [model-impl-3.3.jar:na]<br>        at com.evolveum.midpoint.model.impl.lens.projector.Projector.project(Projector.java:106) [model-impl-3.3.jar:na]<br>        at com.evolveum.midpoint.model.impl.lens.Clockwork.click(Clockwork.java:297) [model-impl-3.3.jar:na]<br>        at com.evolveum.midpoint.model.impl.lens.Clockwork.run(Clockwork.java:209) [model-impl-3.3.jar:na]<br>        at com.evolveum.midpoint.model.impl.controller.ModelController.executeChanges_aroundBody4(ModelController.java:616) [model-impl-3.3.jar:na]<br>        at com.evolveum.midpoint.model.impl.controller.ModelController$AjcClosure5.run(ModelController.java:1) [model-impl-3.3.jar:na]<br>        at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149) [aspectjrt-1.7.3.jar:na]<br>        at com.evolveum.midpoint.util.aspect.MidpointAspect.wrapSubsystem(MidpointAspect.java:178) [util-3.3.jar:na]<br>        at com.evolveum.midpoint.util.aspect.MidpointAspect.ajc$inlineAccessMethod$com_evolveum_midpoint_util_aspect_MidpointAspect$com_evolveum_midpoint_util_aspect_MidpointAspect$wrapSubsystem(MidpointAspect.java:1) [util-3.3.jar:na]<br>        at com.evolveum.midpoint.util.aspect.MidpointAspect.processModelNdc(MidpointAspect.java:63) [util-3.3.jar:na]<br>        at com.evolveum.midpoint.model.impl.controller.ModelController.executeChanges(ModelController.java:432) [model-impl-3.3.jar:na]<br>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_91]<br>        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_91]<br>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_91]<br>        at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_91]<br>        at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:480) [wicket-ioc-6.20.0.jar:6.20.0]<br>        at com.sun.proxy.$Proxy137.executeChanges(Unknown Source) [na:na]<br>        at com.evolveum.midpoint.web.component.progress.ProgressReporter$1.run(ProgressReporter.java:184) [classes/:na]<br>        at java.lang.Thread.run(Thread.java:745) [na:1.7.0_91]<br>Caused by: com.evolveum.midpoint.util.exception.SchemaException: Failed to convert query. Reason: Null polystring orig in XNode(map:1 entries)<br>        at com.evolveum.midpoint.prism.query.QueryJaxbConvertor.createObjectQueryInternal(QueryJaxbConvertor.java:140) ~[prism-3.3.jar:na]<br>        at com.evolveum.midpoint.prism.query.QueryJaxbConvertor.createObjectQueryInternal(QueryJaxbConvertor.java:119) ~[prism-3.3.jar:na]<br>        at com.evolveum.midpoint.prism.query.QueryJaxbConvertor.createObjectQuery(QueryJaxbConvertor.java:90) ~[prism-3.3.jar:na]<br>        at com.evolveum.midpoint.model.common.expression.evaluator.AbstractSearchExpressionEvaluator.transformSingleValue(AbstractSearchExpressionEvaluator.java:160) ~[model-common-3.3.jar:na]<br>        at com.evolveum.midpoint.model.common.expression.evaluator.AbstractValueTransformationExpressionEvaluator$1.process(AbstractValueTransformationExpressionEvaluator.java:422) ~[model-common-3.3.jar:na]<br>        ... 33 common frames omitted<br>Caused by: com.evolveum.midpoint.util.exception.SchemaException: Null polystring orig in XNode(map:1 entries)<br>        at com.evolveum.midpoint.prism.parser.PrismBeanConverter.unmarshalPolyString(PrismBeanConverter.java:1152) ~[prism-3.3.jar:na]<br>        at com.evolveum.midpoint.prism.parser.PrismBeanConverter.unmarshall(PrismBeanConverter.java:147) ~[prism-3.3.jar:na]<br>        at com.evolveum.midpoint.prism.parser.PrismBeanConverter.unmarshall(PrismBeanConverter.java:130) ~[prism-3.3.jar:na]<br>        at com.evolveum.midpoint.prism.parser.XNodeProcessor.parsePrismPropertyRealValueFromMap(XNodeProcessor.java:580) ~[prism-3.3.jar:na]<br>        at com.evolveum.midpoint.prism.parser.XNodeProcessor.parsePrismPropertyRealValue(XNodeProcessor.java:469) ~[prism-3.3.jar:na]<br>        at com.evolveum.midpoint.prism.parser.XNodeProcessor.parsePrismPropertyValue(XNodeProcessor.java:458) ~[prism-3.3.jar:na]<br>        at com.evolveum.midpoint.prism.parser.XNodeProcessor.parsePrismPropertyFromMap(XNodeProcessor.java:438) ~[prism-3.3.jar:na]<br>        at com.evolveum.midpoint.prism.parser.XNodeProcessor.parsePrismProperty(XNodeProcessor.java:392) ~[prism-3.3.jar:na]<br>        at com.evolveum.midpoint.prism.parser.XNodeProcessor.parseItem(XNodeProcessor.java:1008) ~[prism-3.3.jar:na]<br>        at com.evolveum.midpoint.prism.parser.QueryConvertor.parseItem(QueryConvertor.java:616) ~[prism-3.3.jar:na]<br>        at com.evolveum.midpoint.prism.parser.QueryConvertor.parseEqualFilter(QueryConvertor.java:327) ~[prism-3.3.jar:na]<br>        at com.evolveum.midpoint.prism.parser.QueryConvertor.parseFilterContainer(QueryConvertor.java:215) ~[prism-3.3.jar:na]<br>        at com.evolveum.midpoint.prism.parser.QueryConvertor.parseFilterContainer(QueryConvertor.java:196) ~[prism-3.3.jar:na]<br>        at com.evolveum.midpoint.prism.parser.QueryConvertor.parseFilter(QueryConvertor.java:173) ~[prism-3.3.jar:na]<br>        at com.evolveum.midpoint.prism.query.QueryJaxbConvertor.createObjectQueryInternal(QueryJaxbConvertor.java:130) ~[prism-3.3.jar:na]<br>        ... 37 common frames omitted<br><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 7, 2015 at 10:20 AM, Devin Rosenbauer <span dir="ltr"><<a href="mailto:devin@identityworksllc.com" target="_blank">devin@identityworksllc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>That didn't work, Roman, same error. <br><br></div><div>All of the examples use a $ in the expression there. What are the rules for using a $ vs not?<br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 7, 2015 at 10:06 AM, Roman Pudil - AMI Praha a.s. <span dir="ltr"><<a href="mailto:roman.pudil@ami.cz" target="_blank">roman.pudil@ami.cz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div bgcolor="#ffffff">
<div>Hi Devin,</div>
<div>problem is probably in:</div><span>
<div>                  <expression><br>                     <c:path><font color="#ea161e">$givenName</font></c:path><br>                  </expression><br></div>
</span><div>Please, try (without "$" char):</div>
<div> </div>
<div>                  <expression><br>                     <c:path>givenName</c:path><br>                  </expression><br></div>
<div>Regards</div>
<div> </div>
<div>
<div style="FONT-SIZE:12pt;FONT-FAMILY:Tahoma">
<table style="WHITE-SPACE:normal;WORD-SPACING:0px;BORDER-COLLAPSE:collapse;TEXT-TRANSFORM:none;COLOR:rgb(0,0,0);FONT:medium 'Times New Roman';LETTER-SPACING:normal;TEXT-INDENT:0px">
<tbody>
<tr>
<td style="FONT-SIZE:11px;FONT-FAMILY:Arial,sans-serif;VERTICAL-ALIGN:bottom;COLOR:rgb(0,0,0)" colspan="2">
<p><span style="FONT-SIZE:14px;FONT-WEIGHT:bold">Roman Pudil</span><br>solution architect<br><br>gsm: <a href="tel:%5B%2B420%5D%20775%20663%20666" value="+420775663666" target="_blank">[+420] 775 663 666</a><br>e-mail:<span> </span><a href="mailto:roman.pudil@ami.cz" target="_blank">roman.pudil@ami.cz</a></p></td>
<td style="BORDER-RIGHT:rgb(204,204,204) 1px solid">   </td>
<td>   </td>
<td style="FONT-SIZE:11px;FONT-FAMILY:Arial,sans-serif;VERTICAL-ALIGN:bottom;COLOR:rgb(0,0,0)">
<p>AMI Praha a.s.<br>Pláničkova 11<br>162 00 Praha 6<br>tel./fax: <a href="tel:%5B%2B420%5D%20274%20783%20239" value="+420274783239" target="_blank">[+420] 274 783 239</a><br>web:<span> </span><a href="http://www.ami.cz/" target="_blank">www.ami.cz</a></p></td>
<td style="BORDER-RIGHT:rgb(204,204,204) 1px solid">   </td>
<td>   </td>
<td style="FONT-SIZE:11px;FONT-FAMILY:Arial,sans-serif;COLOR:rgb(0,0,0)">
<p><img title="AMI Praha a.s." alt="" src="http://www.ami.cz/images/podpis/ami_logo.gif" border="0"></p></td></tr>
<tr>
<td colspan="8"><br><a href="http://www.ami.cz/reseni-a-sluzby/bezpecnost-dat/identity-management" target="_blank"><img alt="" src="http://www.ami.cz/images/podpis/AMI-podpis-IdM_1.png" border="0"></a></td></tr>
<tr>
<td style="FONT-SIZE:11px;FONT-FAMILY:Arial,sans-serif;COLOR:rgb(128,128,128)" colspan="8"><br>Textem tohoto e-mailu podepisující neslibuje uzavřít ani neuzavírá za společnost AMI Praha a.s.<br>jakoukoliv smlouvu. Každá smlouva, pokud bude uzavřena, musí mít výhradně písemnou formu.</td></tr></tbody></table></div></div>
<div> </div>
<div> </div>
<div> </div>
<div>------ Původní zpráva ------</div>
<div>Od: "Radovan Semancik" <<a href="mailto:radovan.semancik@evolveum.com" target="_blank">radovan.semancik@evolveum.com</a>></div>
<div>Komu: <a href="mailto:midpoint@lists.evolveum.com" target="_blank">midpoint@lists.evolveum.com</a></div>
<div>Odesláno: 7.12.2015 16:02:48</div>
<div>Předmět: Re: [midPoint] assignmentTargetSearch "null polystring orig" error</div><div><div>
<div> </div>
<div style="COLOR:#000000">
<blockquote cite="http://56659F98.4090206@evolveum.com" type="cite">
<div>Hi,<br><br>I have similar mapping working in our story tests.<br><br>How does your input object looks like? I mean, how does the user looks like before it is processed by the template?<br>Is there any chance that the givenName is null?<br><br>The evaluation of null expressions has changed a bit in 3.3. But I think that your expression should work and you are probably hitting a but. I will need more data to replicate it.<br><br><pre cols="72">-- 
Radovan Semancik
Software Architect
<a href="http://evolveum.com" target="_blank">evolveum.com</a>
</pre><br><br>On 12/04/2015 05:15 PM, Devin Rosenbauer wrote:<br></div>
<blockquote type="cite">
<div dir="ltr">Can anybody else please try this mapping on their end and see if it works?<br></div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Dec 1, 2015 at 1:51 PM, Devin Rosenbauer <span dir="ltr"><<a href="mailto:devin@identityworksllc.com" target="_blank">devin@identityworksllc.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT:1ex;BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex">
<div dir="ltr">Version is 3.3.<br>
<div><br>I've got the following in my user template, based on a somewhat modified version of what's in the documentation online:<br><br>  <mapping><br>      <source><br>         <c:path>$user/givenName</c:path><br>      </source><br>      <expression><br>         <assignmentTargetSearch><br>            <targetType>c:OrgType</targetType><br>            <filter><br>               <q:equal><br>                  <q:path>c:name</q:path><br>                  <q:value><br>                     <expression><br>                        <path>$givenName</path><br>                     </expression><br>                  </q:value><br>               </q:equal><br>            </filter><br>            <createOnDemand>true</createOnDemand><br>            <populateObject><br>               <populateItem><br>                  <expression><br>                     <c:path>$givenName</c:path><br>                  </expression><br>                  <target><br>                     <c:path>name</c:path><br>                  </target><br>               </populateItem><br>            </populateObject><br>         </assignmentTargetSearch><br>      </expression><br>      <target><br>         <c:path>assignment</c:path><br>      </target><br>   </mapping><br clear="all">
<div><br></div>
<div>I expect that this would create an Org called "Devin" and assign the user to it.<br><br></div>
<div>Here's what I get as an error message when I attempt to save and reconcile the user:<br>
<div style="WIDTH:1121px">
<ul>
<li>
<div>
<div title="Partial error">Failed to convert query. Reason: Null polystring orig in XNode(map:1 entries)(givenName=PPV(PolyString:Devin); ) in expression in mapping in objectTemplate:c0c010c0-d34d-b33f-f00d-777222222334(User Template 2)</div>
<div title="Partial error">
<ul>
<li style="MARGIN-TOP:5px">
<div><span>operation.com.evolveum.midpoint.web.page.admin.PageAdminFocus.save</span> </div></li>
<li><span><u>Cause:</u> <span>
<p>Failed to convert query. Reason: Null polystring orig in XNode(map:1 entries)(givenName=PPV(PolyString:Devin); ) in expression in mapping in objectTemplate:c0c010c0-d34d-b33f-f00d-777222222334(User Template 2)</p></span></span></li></ul></div></div></li></ul></div>The documentation on the Expressions page and the samples appear to be somewhat incorrect here. I've had to make some corrections from <query> to <filter>, adding a <source>, and so forth. I also am temporarily using an OOTB field instead of a custom field to ensure that it's a PolyString and not an xsd:string, just to make sure that wasn't the issue.<br><br>At this point, it seems pretty clear that it is grabbing the value in the XNodeMap, since it's printed in the error message. <br><br>So, how should this mapping be structured to do what I need to do?<span><font color="#888888"><br></font></span></div><span><font color="#888888">
<div><br>-- <br>
<div>
<div dir="ltr">Devin Rosenbauer<br>Principal Consultant<br>Identity Works LLC<br><a href="tel:%2B1%20585%20210%203201" value="+15852103201" target="_blank">+1 585 210 3201</a><br></div></div></div></font></span></div></div></blockquote></div><br><br clear="all"><br>-- <br>
<div>
<div dir="ltr">Devin Rosenbauer<br>Principal Consultant<br>Identity Works LLC<br><a href="tel:%2B1%20585%20210%203201" value="+15852103201" target="_blank">+1 585 210 3201</a><br></div></div></div><br>
<fieldset></fieldset> <br><pre>_______________________________________________
midPoint mailing list
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre></blockquote><br><br></blockquote></div></div></div></div><br>_______________________________________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a><br>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div><div dir="ltr">Devin Rosenbauer<br>Principal Consultant<br>Identity Works LLC<br><a href="tel:%2B1%20585%20210%203201" value="+15852103201" target="_blank">+1 585 210 3201</a><br></div></div>
</div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr">Devin Rosenbauer<br>Principal Consultant<br>Identity Works LLC<br>+1 585 210 3201<br></div></div>
</div>