UUID JSON serialization issue

hantsy bai <[email protected]> Fri, 4 Apr 2025 22:35:09 +0800
Newsgroups gmane.comp.java.openejb.user
Message-ID <CAMq3Qk1YPcHC6uar7VVYW+5RY9woecJb1LftVvKMzdtL08iyBA@mail.gmail.com>
--000000000000cab4920631f4cb53
Content-Type: text/plain; charset="UTF-8"

Hi
Special thanks to Richard Zowalla for helping me resolve some issues of the
TomEE and Aruqillian configuration.

Another issue I found in the Github actions log is the serialization issue
of UUID, TomEE used Apache Johnzon as JSON-B implementation.

```
Caused by: jakarta.json.bind.JsonbException: Todo property 'id' of type ID
cannot be mapped to json object value:
{"leastSignificantBits":-5668611215224300934,"most...
UUID has no suitable constructor or factory. Cannot deserialize json object
value: {"leastSignificantBits":-5668611215224300934,"most...
Use Johnzon @ConstructorProperties or @JsonbCreator if constructor
arguments are needed
class java.util.UUID not instantiable
at org.apache.johnzon.jsonb.JohnzonJsonb.fromJson(JohnzonJsonb.java:253)
at
org.glassfish.jersey.jsonb.internal.JsonBindingProvider.readFrom(JsonBindingProvider.java:91)

... 58 more
```

Check the complete log here:
https://github.com/hantsy/jakartaee10-starter-boilerplate/actions/runs/14233160351/job/39887609042#step:4:1657

Do we need extra configuration to enable UUID support in Johnzon?

---

Regards,

*Hantsy Bai*

Self-employed consultant, fullstack developer, agile coach,
freelancer/remote worker

GitHub: https://github.com/hantsy

Twitter: https://twitter.com/@hantsy
Medium: https://medium.com/@hantsy

--000000000000cab4920631f4cb53--