[midPoint] Outbound mapping PostgresDB

Ivan Noris ivan.noris at evolveum.com
Thu Jan 23 12:10:52 CET 2020


Hi Elsa,

I'd recommend to check the resource schema. Namely, icfs:name and
ri:username.

>From the log it looks like the format for the attribute where you put
"alex" is Long.

Also if you're using the DBTable connector and if "username" column is
the primary key, you cannot use "ri:username" and "icfs:name" together.

You have not sent the whole resource example, so I just guess that
<keyColumn> is username in your configuration properties.

Try to comment the mapping for ri:username and see if it helps. But if
you check the configuration properties and schema (not schema handling),
it should help.

Disclaimer: I'm not using DBTable in any recent midpoint deployment.
Someone from this list certainly does.

Best regards,

Ivan

On 23. 1. 2020 11:42, Gómez Martínez, Elsa wrote:
>
> Hi Ivan,
>
>  
>
> I add the midPoint.log file with the error part from one simple test.
>
>  
>
> Steps:
>
> 1.       Create user “alex” from MidPoint GUI
>
> 2.       Assign the resource _Localhost_PostgreSQL DBTable
>
>  
>
> 020-01-23 10:59:09,806 [] [pool-3-thread-5] ERROR
> (com.evolveum.midpoint.web.component.progress.ProgressPanel): Error
> executing changes.
>
> com.evolveum.midpoint.util.exception.ConfigurationException:
> Configuration error: For input string: "alex"
>
>         at
> com.evolveum.midpoint.provisioning.ucf.impl.connid.ConnIdUtil.processConnIdException(ConnIdUtil.java:168)
>
>         at
> com.evolveum.midpoint.provisioning.ucf.impl.connid.ConnIdUtil.processConnIdException(ConnIdUtil.java:94)
>
>         at
> com.evolveum.midpoint.provisioning.ucf.impl.connid.ConnectorInstanceConnIdImpl.addObject(ConnectorInstanceConnIdImpl.java:869)
>
>         at
> com.evolveum.midpoint.provisioning.impl.ResourceObjectConverter.addResourceObject(ResourceObjectConverter.java:266)
>
>         at
> com.evolveum.midpoint.provisioning.impl.ShadowCache.addShadowAttempt(ShadowCache.java:554)
>
>         at
> com.evolveum.midpoint.provisioning.impl.ShadowCache.addShadow(ShadowCache.java:496)
>
>         at
> com.evolveum.midpoint.provisioning.impl.ProvisioningServiceImpl.addObject(ProvisioningServiceImpl.java:280)
>
>         at
> com.evolveum.midpoint.model.impl.lens.ChangeExecutor.addProvisioningObject(ChangeExecutor.java:1580)
>
>         at
> com.evolveum.midpoint.model.impl.lens.ChangeExecutor.executeAddition(ChangeExecutor.java:1362)
>
>         at
> com.evolveum.midpoint.model.impl.lens.ChangeExecutor.executeDelta(ChangeExecutor.java:938)
>
>         at
> com.evolveum.midpoint.model.impl.lens.ChangeExecutor.executeChanges(ChangeExecutor.java:326)
>
>         at
> com.evolveum.midpoint.model.impl.lens.Clockwork.lambda$processSecondary$0(Clockwork.java:796)
>
>         at
> com.evolveum.midpoint.model.impl.lens.ClockworkMedic.partialExecute(ClockworkMedic.java:211)
>
>         at
> com.evolveum.midpoint.model.impl.lens.ClockworkMedic.partialExecute(ClockworkMedic.java:154)
>
>         at
> com.evolveum.midpoint.model.impl.lens.Clockwork.processSecondary(Clockwork.java:794)
>
>         at
> com.evolveum.midpoint.model.impl.lens.Clockwork.click(Clockwork.java:615)
>
>         at
> com.evolveum.midpoint.model.impl.lens.Clockwork.run(Clockwork.java:200)
>
>         at
> com.evolveum.midpoint.model.impl.controller.ModelController.executeChanges(ModelController.java:556)
>
>         at
> com.evolveum.midpoint.web.component.progress.ProgressPanel$14.callWithContextPrepared(ProgressPanel.java:592)
>
>         at
> com.evolveum.midpoint.web.component.progress.ProgressPanel$14.callWithContextPrepared(ProgressPanel.java:578)
>
>         at
> com.evolveum.midpoint.web.component.SecurityContextAwareCallable.call(SecurityContextAwareCallable.java:50)
>
>         at
> java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
>
>         at
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
>
>         at
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
>
>         at java.base/java.lang.Thread.run(Thread.java:834)
>
>  
>
> Regards,
>
> Elsa
>
>  
>
> *De:*midPoint <midpoint-bounces at lists.evolveum.com> *En nombre de
> *Ivan Noris
> *Enviado el:* jueves, 23 de enero de 2020 8:45
> *Para:* midpoint at lists.evolveum.com
> *Asunto:* Re: [midPoint] Outbound mapping PostgresDB
>
>  
>
> Hi Elsa,
>
> can you please check midpoint.log? There should be something more.
>
> Regards,
>
> Ivan
>
> On 22. 1. 2020 15:51, Gómez Martínez, Elsa wrote:
>
>     Hello!
>
>      
>
>     I am trying to mapping the users from MidPoint to a PostgreSQL
>     Database but I am having the next error:
>
>     *Save (GUI)*Configuration error: For input string: "superuserTest"
>
>      
>
>     Account (default) on Basic PostgreSQL DBTable
>
>     	
>     	
>
>     Add:Fatal error -> superuserTest
>
>      
>
>     I am using the next git sample:
>
>     https://github.com/Evolveum/midpoint-samples/blob/master/samples/resources/databasetable/postgresql/resource-dbtable-postgresql.xml
>
>      
>
>     And this is my schema handling configuration (my username is my
>     unique identifier):
>
>             <schemaHandling>
>
>                 <objectTypeid=/"5"/>
>
>                     <displayName>Default Account</displayName>
>
>                     <default>true</default>
>
>                     <objectClass>ri:AccountObjectClass</objectClass>
>
>                     <attributeid=/"6"/>
>
>                         <c:ref>icfs:uid</c:ref>
>
>                         <displayName>User ID</displayName>
>
>                         <limitations>
>
>                             <access>
>
>                                 <read>true</read>
>
>                             </access>
>
>                         </limitations>
>
>                     </attribute>
>
>                     <attributeid=/"7"/>
>
>                         <c:ref>icfs:name</c:ref>
>
>                         <displayName>Name</displayName>
>
>                         <limitations>
>
>                             <minOccurs>0</minOccurs>
>
>                             <access>
>
>                                 <read>true</read>
>
>                                 <add>true</add>
>
>                                 <modify>true</modify>
>
>                             </access>
>
>                         </limitations>
>
>                         <outbound>
>
>                             <source>
>
>                                 <c:path>$user/name</c:path>
>
>                             </source>
>
>                         </outbound>
>
>                     </attribute>
>
>                     <attributeid=/"4"/>
>
>                         <c:ref>ri:username</c:ref>
>
>                         <displayName>_Username_</displayName>
>
>                         <outbound>
>
>                             <source>
>
>                                 <c:path>$user/name</c:path>
>
>                             </source>
>
>                         </outbound>
>
>                     </attribute>
>
>      
>
>     And my database schema:
>
>      
>
>      
>
>     One example user:
>
>      
>
>      
>
>      
>
>      
>
>     Could anyone help me?
>
>      
>
>     Thanks a lot!
>
>      
>
>     minsait <http://www.minsait.com/>
>
>      
>
>     Elsa Gómez Martínez
>
>
>     Ciberseguridad
>
>      
>
>     Espacio Virtual:
>
>     https://join.indra.es <https://join.indra.es/>
>
>     egomezm at cms.indra.es <mailto:egomezm at cms.indra.es>
>
>     ID: 269068
>
>     https://emailingindra.indra.es/archivos/1/12316_mates-firma-interna.png
>     <https://apps.indraweb.net/mates?utm_source=Notificacion-Mates&utm_medium=email&utm_content=Firma&utm_campaign=Firma-interna&recognise-direct=egomezm>
>
>      
>
>      
>
>
>
>     _______________________________________________
>
>     midPoint mailing list
>
>     midPoint at lists.evolveum.com <mailto:midPoint at lists.evolveum.com>
>
>     http://lists.evolveum.com/mailman/listinfo/midpoint
>
> -- 
> Ivan Noris
> Senior Identity Engineer
> evolveum.com
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint

-- 
Ivan Noris
Senior Identity Engineer
evolveum.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20200123/8029d885/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 54881 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20200123/8029d885/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 8943 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20200123/8029d885/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 3646 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20200123/8029d885/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 2554 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20200123/8029d885/attachment-0003.png>


More information about the midPoint mailing list