[midPoint] Exception when translating PP

Wojciech Staszewski wojciech.staszewski at diagnostyka.pl
Sat Dec 31 23:41:29 CET 2016


Hi....

The image (binary) attribute in my ScriptedSQL resource drives me crazy...
What I did:

Custom schema extension:
           <xsd:element name="stamp" type="xsd:base64Binary" minOccurs="0"> 
               <xsd:annotation> 
                   <xsd:appinfo> 
                       <a:indexed>true</a:indexed> 
                       <a:displayName>User stamp</a:displayName> 
                       <a:displayOrder>370</a:displayOrder> 
                   </xsd:appinfo> 
               </xsd:annotation> 
           </xsd:element>

SchemaScript.groovy:
account.addAttributeInfo(AttributeInfoBuilder.build("userstamp", byte[].class));

SearchScript.groovy:
        def stampquery = "select u.stamp from users u" + where;
        row = sql.firstRow(stampquery);
        stamp_blob = (oracle.sql.BLOB)row[0];
        stamp = stamp_blob.getBinaryStream().getBytes();

Midpoint GUI: My ScriptedSQL Resource->Accounts->Resource->click on some user
I see the user stamp attribute, I can download it and open correctly in image viewer.

I made inbound mapping userstamp -> extension/stamp
but reconciliation gives me error:

ERROR (com.evolveum.midpoint.web.component.progress.ProgressReporter): Error executing changes.
com.evolveum.midpoint.util.exception.SchemaException: Exception when translating PP({http://midpoint.evolveum.com/xml/ns/story/unix-1}stamp):[PPV(byte[]:byte[-1,-40,-1,-32,0,16,74,70,73,70,0,1,1,1,0,0,0,0,0,0,-1,-37,0,67,0,9,6,7,19,19,18,21,19,18,18,22,22,21,22,23,23,23,25,24,21,25,21,24,24,27,26,26,29,29,23,23,29,26,25,24,30,40,32,25,,... 10849 bytes total])]: Can't extract value for saving from prism property value
PPV(byte[]:byte[-1,-40,-1,-32,0,16,74,70,73,70,0,1,1,1,0,0,0,0,0,0,-1,-37,0,67,0,9,6,7,19,19,18,21,19,18,18,22,22,21,22,23,23,23,25,24,21,25,21,24,24,27,26,26,29,29,23,23,29,26,25,24,30,40,32,25,,... 10849 bytes total])

*****   What attribute types should I use for image attribute? In schema extension is base64Binary, on resource byte[], I suspect is something wrong here ;(  ******

I know, I'm workaholic...
Happy New Year!!!!



More information about the midPoint mailing list