<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Aptos;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Aptos",sans-serif;
        mso-ligatures:standardcontextual;
        mso-fareast-language:EN-US;}
span.E-MailFormatvorlage20
        {mso-style-type:personal-compose;
        font-family:"Aptos",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="#467886" vlink="#96607D" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-GB">Hi Community,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">I'm currently working on a custom connector for a REST API. I'm struggling with an exception while running an import task:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB"><br>
2025-01-13 00:22:21,078 [] [midPointScheduler_Worker-4] WARN (com.evolveum.midpoint.provisioning.ucf.impl.connid.ConnIdUtil): Got ConnId exception (might be handled by upper layers later) org.identityconnectors.framework.common.exceptions.ConnectorException
 in connector:806950e3-6333-429d-9e3c-ffa9f12a6e63(ConnId de.kogit.connector.cafm.rest.CafmRestConnector v1.0 -SNAPSHOT): ConnectorSpec.Main(resource:eb89aa49-e7f0-44fd-93bf-9e1d215e90de(CAFM)) while updating object identified by ConnId UID 'ab123': Couldn't
 modify attribute values from object ObjectClass: __ACCOUNT__ with uid Attribute: {Name=__UID__, Value=[ab123], NameHint=Attribute: {Name=__NAME__, Value=[ab123]}} , reason: java.lang.IllegalArgumentException: can't parse argument number: , reason: Couldn't
 modify attribute values from object ObjectClass: __ACCOUNT__ with uid Attribute: {Name=__UID__, Value=[ab123], NameHint=Attribute: {Name=__NAME__, Value=[ab123]}} , reason: java.lang.IllegalArgumentException: can't parse argument number:  (class org.identityconnectors.framework.common.exceptions.ConnectorException)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB">…<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB">Caused by: java.lang.NumberFormatException: For input string: ""<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">My connector code is preparing a delta update right before the error is thrown (“FreeString41” is the name of the attribute from application side):<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-GB">2025-01-13 00:22:21,077 [] [midPointScheduler_Worker-4] TRACE (de.kogit.connector.cafm.rest.CafmRestConnector): method: null msg:execute updateUser for uid Attribute: {Name=__UID__, Value=[ab123],
 NameHint=Attribute: {Name=__NAME__, Value=[ab123]}} with sets: replace: [Attribute: {Name=FreeString41, Value=[;M;S;]}], add: [], remove: []<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">From my observation, the error seems to be independent of the connector code at this point, as I have already disabled the part that adds all attributes and values from the set of attributes to the json to be sent to
 the API. The error is still thrown. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">The error is thrown for a variety of users, the only thing they might have in common is an empty field ("EndDate") that is also read from the endpoint during import, but is already declared as a string, not a number.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">I'm a bit lost at this point as I don't have any fields declared as number in my schema, nor am I trying to convert ints in my code.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">How can I investigate this further? Or has anyone already stumbled across this? I am grateful for any pointers in any direction.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Best regards and thanks in advance<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Sebastian<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
</div>
<br>
<br>
<br>
<div style="font-size:10pt; font-family:'Verdana',sans-serif;"><b>Sebastian Beetz
</b>| Solution Consultant, Head of Internal IT<br>
Mobil: +49 151 67806842 | Tel: +49 6151 7869-142 <br>
<br>
<b>KOGIT GmbH </b>| Rheinstr. 40-42 | 64283 Darmstadt <br>
<a href="https://www.kogit.de">www.kogit.de</a> | <a href="https://de.linkedin.com/company/kogit-gmbh">
LinkedIn</a> | <a href="https://www.xing.com/pages/kogitgmbh">Xing</a> | <a href="https://www.instagram.com/kogit_gmbh/">
Instagram</a> <br>
<br>
Geschäftsführer: Gerald Kaufhold <br>
Amtsgericht Darmstadt | HRB 8640 | Ust-IdNr: DE224251141<br>
Datenschutzhinweise | <a href="https://www.kogit.de/datenschutz">www.kogit.de/datenschutz</a><br>
<br>
</div>
</body>
</html>