Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] UUID NumberFormatException

Hello.
I use Talend MDM community v5.4.1
I created a data model entity with a primary key of type UUID.
I selected "custom type" in simple type creation window and choosed UUID. Then an UUID model type appear in right panel, with the base type String.
When I deploy this and create a new item in Web user interface I have this error in console :
20:54:33,131 ERROR Failed to save item Person, For input string: "e375f6de-1b03-4169-acec-c7356472b185"
...
...
Caused by: java.lang.NumberFormatException: For input string: "e375f6de-1b03-4169-acec-c7356472b185"
e375f6de-1b03-4169-acec-c7356472b185 is the UUID generated for my primary key.
Did I missed something ??
Thank you
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Thank you very much.
My problem is SOLVED 0683p000009MACn.png
I deleted all .db files in MDM server related to my container, I redeployed and it works !!
The ID was an AUTO_INCREMENT (int) before, when I changed it to UUID (String) the issue occured. Now I know how to deal with that.

View solution in original post

7 Replies
Anonymous
Not applicable
Author

Hi,
Could you please paste your data model entity xsd into forum so that we can address your issue quickly.
Best regards
Sabrina
Anonymous
Not applicable
Author

Sure, here is my xsd data model :
Thank you for your support 0683p000009MACn.png
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://www.w3.org/2001/XMLSchema" />
<xsd:element name="Task" type="TaskType">
<xsd:unique name="Task">
<xsd:selector xpath="." />
<xsd:field xpath="id" />
</xsd:unique>
</xsd:element>
<xsd:complexType name="TaskType">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="id" type="UUID" />
<xsd:element maxOccurs="10" minOccurs="0" name="subtasks" type="UUID">
<xsd:annotation>
<xsd:appinfo source="X_ForeignKey">Task/id</xsd:appinfo>
<xsd:appinfo source="X_ForeignKey_NotSep">false</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="description" type="DescriptionType" />
<xsd:element maxOccurs="1" minOccurs="0" name="place" type="PlaceType" />
<xsd:element maxOccurs="1" minOccurs="0" name="begin" type="xsd:dateTime" />
<xsd:element maxOccurs="1" minOccurs="0" name="end" type="xsd:dateTime" />
<xsd:element maxOccurs="1" minOccurs="0" name="contact" type="ContactType" />
<xsd:element maxOccurs="1" minOccurs="1" name="recurrent" type="xsd:boolean" />
<xsd:element maxOccurs="1" minOccurs="1" name="repeatable" type="xsd:boolean" />
<xsd:element maxOccurs="1" minOccurs="1" name="waiting" type="xsd:boolean" />
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="DescriptionType">
<xsd:restriction base="xsd:normalizedString">
<xsd:pattern value="{1}*" />
<xsd:whiteSpace value="replace" />
<xsd:minLength value="10" />
<xsd:maxLength value="200" />
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="PlaceType">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="name" type="DescriptionType" />
<xsd:element maxOccurs="1" minOccurs="1" name="address" type="AddressType" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="AddressType">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="0" name="number" type="AddressNumberType" />
<xsd:element maxOccurs="1" minOccurs="0" name="complement" type="AddressNumberComplementType" />
<xsd:element maxOccurs="1" minOccurs="1" name="street" type="AddressStreetType" />
<xsd:element maxOccurs="1" minOccurs="1" name="postCode" type="AddressPostCodeType" />
<xsd:element maxOccurs="1" minOccurs="1" name="town" type="AddressTownType" />
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="AddressNumberType">
<xsd:restriction base="xsd:unsignedShort">
<xsd:minInclusive value="1" />
<xsd:maxInclusive value="9999" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="AddressNumberComplementType">
<xsd:restriction base="xsd:normalizedString">
<xsd:minLength value="1" />
<xsd:maxLength value="5" />
<xsd:pattern value="{1,5}" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="AddressStreetType">
<xsd:restriction base="xsd:normalizedString">
<xsd:minLength value="10" />
<xsd:maxLength value="200" />
<xsd:whiteSpace value="collapse" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="AddressPostCodeType">
<xsd:restriction base="xsd:normalizedString">
<xsd:length value="5" />
<xsd:pattern value="{5}" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="AddressTownType">
<xsd:restriction base="xsd:normalizedString">
<xsd:minLength value="2" />
<xsd:maxLength value="200" />
<xsd:whiteSpace value="collapse" />
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="ContactType">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="firstname" type="xsd:string" />
<xsd:element maxOccurs="1" minOccurs="1" name="lastname" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="UUID">
<xsd:restriction base="xsd:string" />
</xsd:simpleType>
</xsd:schema>
Anonymous
Not applicable
Author

Hi,
Quite strangely, you have this error:
20:54:33,131 ERROR Failed to save item Person, For input string: "e375f6de-1b03-4169-acec-c7356472b185"

But no "Person" entity in your data model. Are you sure you posted the correct data model?
Anonymous
Not applicable
Author

Hooo I posted the correct data model and the wrong error.
Sorry
For the "Task" data model the error is :
20:09:07,820 ERROR Failed to save item Task, For input string: "7053383c-c818-4fd3-be3b-7282d18504a7"

It seems that Talend wants to convert the string "7053383c-c818-4fd3-be3b-7282d18504a7" into a number ...
Thanks
Anonymous
Not applicable
Author

Note that I translated the error message above in English.
Here is the complete error stack :


To see the whole post, download it here
OriginalPost.pdf
Anonymous
Not applicable
Author

Here's my guess: you first deployed the data model with an id typed as xsd:long (or xsd:integer... something that holds numeric values). Then you changed to UUID (a xsd:string based type) and redeployed the data model. But this doesn't change the column type in the database .
Please do the following:
* Check if the column type for "x_id" of the Task table is typed as numeric or string.
* If numeric: perform "alter table" statement to change the column to a varchar OR drop the whole database schema and restart MDM (MDM will recreate the schema from scratch).
: For conservative reasons, MDM only adds new stuff in the database but doesn't change existing database schema elements. For example, if you first deployed with an string Id and then change to numeric, the column will still be a string (because some values may already exist and some values can't be converted to a number).
Anonymous
Not applicable
Author

Thank you very much.
My problem is SOLVED 0683p000009MACn.png
I deleted all .db files in MDM server related to my container, I redeployed and it works !!
The ID was an AUTO_INCREMENT (int) before, when I changed it to UUID (String) the issue occured. Now I know how to deal with that.