JSON Binding deserialization error in Wildfly 24.0.0

810 views
Skip to first unread message

Jaydeep Chauhan

unread,
Feb 22, 2024, 10:56:36 PM2/22/24
to WildFly

hello,
I have shifted Wildfly 10.1.0 to Wildfly 24.0.0
I am getting this Errors in logs.

2024-02-23 09:03:35,108 SEVERE [org.eclipse.yasson.internal.Unmarshaller] (default task-4) JsonParser#getString() is valid only for KEY_NAME, VALUE_STRING, VALUE_NUMBER parser states. But current parser state is VALUE_TRUE
2024-02-23 09:03:35,118 INFO [stdout] (default task-4) 23 Feb 2024 09:03:35:[pman_nyc]:[default task-4]ERROR com.shipco.phoenix.core.server.exception.ExceptionManagerAspect Method: error javax.ws.rs.ProcessingException: RESTEASY008200: JSON Binding deserialization error: javax.json.bind.JsonbException: Internal error: JsonParser#getString() is valid only for KEY_NAME, VALUE_STRING, VALUE_NUMBER parser states. But current parser state is VALUE_TRUE

2024-02-23 09:03:35,118 INFO [stdout] (default task-4) javax.ws.rs.client.ResponseProcessingException: javax.ws.rs.ProcessingException: RESTEASY008200: JSON Binding deserialization error: javax.json.bind.JsonbException: Internal error: JsonParser#getString() is valid only for KEY_NAME, VALUE_STRING, VALUE_NUMBER parser states. But current parser state is VALUE_TRUE

2024-02-23 09:03:35,152 INFO [stdout] (default task-4) Caused by: javax.json.bind.JsonbException: Internal error: JsonParser#getString() is valid only for KEY_NAME, VALUE_STRING, VALUE_NUMBER parser states. But current parser state is VALUE_TRUE

2024-02-23 09:03:35,152 INFO [stdout] (default task-4) at org.eclipse.yasson.internal.Unmarshaller.deserializeItem(Unmarshaller.java:68) ~[yasson-1.0.9.jar!/:?]

2024-02-23 09:03:35,152 INFO [stdout] (default task-4) at org.eclipse.yasson.internal.Unmarshaller.deserialize(Unmarshaller.java:51) ~[yasson-1.0.9.jar!/:?]

2024-02-23 09:03:35,153 INFO [stdout] (default task-4) at org.eclipse.yasson.internal.JsonBinding.deserialize(JsonBinding.java:59) ~[yasson-1.0.9.jar!/:?]

2024-02-23 09:03:35,153 INFO [stdout] (default task-4) at org.eclipse.yasson.internal.JsonBinding.fromJson(JsonBinding.java:99) ~[yasson-1.0.9.jar!/:?]

2024-02-23 09:03:35,153 INFO [stdout] (default task-4) at org.jboss.resteasy.plugins.providers.jsonb.JsonBindingProvider.readFrom(JsonBindingProvider.java:84) ~[resteasy-json-binding-provider-3.15.1.Final.jar!/:3.15.1.Final]

Please Let me know What causing this error?

Thanks
Jaydeep Chauhan

James Perkins

unread,
Feb 28, 2024, 6:05:31 PM2/28/24
to WildFly
Are you including RESTEasy in your deployment by chance or Yasson?

Also, is there a reason to go WildFly 24? For Jakarta EE 8, WildFly 26.1.3.Final is the last release.

Jaydeep Chauhan

unread,
Feb 29, 2024, 4:17:14 AM2/29/24
to WildFly
Hello James,
Solution:-
I have excluded in Jboss-deployment-stucture.xml 

<module name=”org.jboss.resteasy.resteasy-json-binding-provider”/>
Error reason is i think :-

JAX-RS 2.1 uses JSON-B to serialize and deserialize JSON to objects, but JAX-RS 2.0 uses Jackson. Subtle differences might exist in serialization and deserialization and might produce a different JSON output. Options are included with these differences. For example, you can customize the JSON-to-object transformation by using the various JSON-B APIs, such as @JsonProperty, @JsonbIgnore, and more. Alternatively, instead of using JSON-B with JAX-RS 2.1, you can package Jackson with the application and use the Jackson JAX-RS provider.
To use JSON-B APIs, enable the jsonb-1.0 feature.


Second Question Answer:-

i have used wildfly-migration-tool stable version 1.11.0.Final
that supports wildfly 24.0.0.Final migration that's why I have migrated from 10.1.0 to 24.0.0.

Reply all
Reply to author
Forward
0 new messages