Sphynx
Sphynx

Reputation: 502

Wildfly swarm jax-rs multipart form NotSupportedException

I have a fairly simple jax-rs application running on wildfly 9. It makes use of resteasy multipart form. It runs 100%. Now I am trying to run the same application with wildfly swarm, but get a

javax.ws.rs.NotSupportedException: Could not find message body reader for type .... multipart/form-data on execute of the resource post operation.

This as far as I understand is the resteasy-multipart-provider. In my pom I have the wildfly-swarm-weld-jaxrs fraction. Is this not suppose to take care of the multipart features? If not how do I get it included in the swarm fat jar/package? I have tried including the resteasy-multipart-provider as a compile dependency, but this breaks the swarm application and it refuses to start/boot. Or have I missed something else?

Upvotes: 0

Views: 505

Answers (1)

Sphynx
Sphynx

Reputation: 502

JAX-RS Multipart support is declared as an optional module in WildFly, so the necessary classes to make it work were not included in the application.

Since then Ken Finnigan added a new WildFly Swarm API for the module.

If you build the latest from wildfly-swarm/wildfly-swarm on GitHub you can add the wildfly-swarm-jaxrs-multipart artifact as a dependency to the project and that should resolve the problem.

Upvotes: 1

Related Questions