Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-10032

Wildfly 12 Final (RestEASy 3.5 Final) can't discover JsonBindingProvider for Jax-RS

    Details

    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      IF you include resteasy-json-binding-provider dependency directly in your project, than JsonBindingProvider will be discovered and used with priority just like Jax-RS 2.1 specs demand.
      Of course, I think this is not correct since you should not be forced to include a specific implementation library to use JsonBinding over other implementations.
      Even more if this dependency is already delivered with the application server.

      Show
      IF you include resteasy-json-binding-provider dependency directly in your project, than JsonBindingProvider will be discovered and used with priority just like Jax-RS 2.1 specs demand. Of course, I think this is not correct since you should not be forced to include a specific implementation library to use JsonBinding over other implementations. Even more if this dependency is already delivered with the application server.

      Description

      Even if started in JavaEE8 Preview Mode :

      <property name="ee8.preview.mode" value="true"/>

      Wildfly 12 + RestEasy 3.5 Final can't find this MessageBodyWriter (or Reader) :

      org.jboss.resteasy.plugins.providers.jsonb.JsonBindingProvider

      Such is provided inside this dependecy :

      <dependency>
      <groupId>org.jboss.resteasy</groupId>
      <artifactId>resteasy-json-binding-provider</artifactId>
      <version>3.5.0.Final</version>
      </dependency>

      resteasy-json-binding-provider.jar is already provided inside WIldfly 12.

      RestEASY 3.5 Final documentation stats that JsonBindingProvider should be automatically loaded :

      RESTEasy JAX-RS

      If you forcefully exclude Jackson with NoJackson annotation an error will appear stating no MessageWrite is found for json media type when serializing objects for Jax-RS.

      I debugged a little to try and find out what was happening and I can confirm that in

      org.jboss.resteasy.spi.ResteasyProviderFactory at row 2592

      JsonBindingProvider won't be discovered

      Can you reproduce/fix this issue ?

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jim.ma Jim Ma
                  Reporter:
                  alessandromoscatelli Alessandro Moscatelli
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: