[midPoint] reading a binary (jpeg) from a csv file
Brad Fardig
brad.fardig at cogitogroup.com.au
Tue Mar 14 01:21:53 CET 2017
Hi,
I have a csv file that contains a hex encoded binary string which is a jpeg image.
Is it possible to read this in via the connector with the following schema definition:
<xsd:element maxOccurs="1" minOccurs="0" name="Photo" type="xsd:hexBinary">
I have tried this and receive the error below, should I persist with trying this or look for another approach?
at org.quartz.core.JobRunShell.run(JobRunShell.java:213) [quartz-2.1.3.jar:na]
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) [quartz-2.1.3.jar:na]
Caused by: java.lang.IllegalArgumentException: Expected class [B type, but got class java.lang.String in inbound expression for {http://midpoint.evolveum.com/xml/ns/public/resource/instance-3}Photo in resource:9086df29-fd0c-4797-8de8-d64cad7fab76(PACSCSVConnector)
at com.evolveum.midpoint.model.impl.lens.projector.MappingEvaluator.evaluateMapping(MappingEvaluator.java:99) ~[model-impl-3.4.jar:na]
at com.evolveum.midpoint.model.impl.lens.projector.InboundProcessor.evaluateInboundMapping(InboundProcessor.java:490) ~[model-impl-3.4.jar:na]
at com.evolveum.midpoint.model.impl.lens.projector.InboundProcessor.processInboundExpressionsForProjection(InboundProcessor.java:353) ~[model-impl-3.4.jar:na]
at com.evolveum.midpoint.model.impl.lens.projector.InboundProcessor.processInboundFocal(InboundProcessor.java:186) ~[model-impl-3.4.jar:na]
at com.evolveum.midpoint.model.impl.lens.projector.InboundProcessor.processInbound(InboundProcessor.java:128) ~[model-impl-3.4.jar:na]
at com.evolveum.midpoint.model.impl.lens.projector.FocusProcessor.processFocusFocus(FocusProcessor.java:212) ~[model-impl-3.4.jar:na]
at com.evolveum.midpoint.model.impl.lens.projector.FocusProcessor.processFocus(FocusProcessor.java:146) ~[model-impl-3.4.jar:na]
at com.evolveum.midpoint.model.impl.lens.projector.Projector.projectInternal(Projector.java:208) ~[model-impl-3.4.jar:na]
at com.evolveum.midpoint.model.impl.lens.projector.Projector.project(Projector.java:106) ~[model-impl-3.4.jar:na]
at com.evolveum.midpoint.model.impl.lens.Clockwork.click(Clockwork.java:302) ~[model-impl-3.4.jar:na]
at com.evolveum.midpoint.model.impl.lens.Clockwork.run(Clockwork.java:214) ~[model-impl-3.4.jar:na]
at com.evolveum.midpoint.model.impl.sync.SynchronizationServiceImpl.reactToChange(SynchronizationServiceImpl.java:766) ~[model-impl-3.4.jar:na]
at com.evolveum.midpoint.model.impl.sync.SynchronizationServiceImpl.notifyChange(SynchronizationServiceImpl.java:299) ~[model-impl-3.4.jar:na]
... 33 common frames omitted
Caused by: java.lang.IllegalArgumentException: Expected class [B type, but got class java.lang.String
at com.evolveum.midpoint.prism.util.JavaTypeConverter.convert(JavaTypeConverter.java:249) ~[prism-3.4.jar:na]
at com.evolveum.midpoint.model.common.expression.ExpressionUtil.convertValue(ExpressionUtil.java:186) ~[model-common-3.4.jar:na]
at com.evolveum.midpoint.model.common.expression.ExpressionUtil$1.visit(ExpressionUtil.java:135) ~[model-common-3.4.jar:na]
at com.evolveum.midpoint.prism.PrismValue.accept(PrismValue.java:171) ~[prism-3.4.jar:na]
at com.evolveum.midpoint.prism.delta.PrismValueDeltaSetTriple.acceptSet(PrismValueDeltaSetTriple.java:266) ~[prism-3.4.jar:na]
at com.evolveum.midpoint.prism.delta.PrismValueDeltaSetTriple.accept(PrismValueDeltaSetTriple.java:256) ~[prism-3.4.jar:na]
at com.evolveum.midpoint.model.common.expression.ExpressionUtil.toOutputTriple(ExpressionUtil.java:122) ~[model-common-3.4.jar:na]
at com.evolveum.midpoint.model.common.expression.evaluator.AsIsExpressionEvaluator.evaluate(AsIsExpressionEvaluator.java:93) ~[model-common-3.4.jar:na]
at com.evolveum.midpoint.model.common.expression.Expression.evaluate(Expression.java:133) ~[model-common-3.4.jar:na]
at com.evolveum.midpoint.model.common.mapping.Mapping.evaluateExpression(Mapping.java:985) ~[model-common-3.4.jar:na]
at com.evolveum.midpoint.model.common.mapping.Mapping.evaluate(Mapping.java:520) ~[model-common-3.4.jar:na]
at com.evolveum.midpoint.model.impl.lens.projector.MappingEvaluator.evaluateMapping(MappingEvaluator.java:95) ~[model-impl-3.4.jar:na]
... 45 common frames omitted
Regards,
Brad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 37584 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20170314/df39b625/attachment.bin>
More information about the midPoint
mailing list