We have some REST API for our OSGI framework based application and we are trying to get the code coverage using clover. However when we try to hit the REST API using postman getting below error -
"MessageBodyReader not found for media type=multipart/form-data;boundary=----WebKitFormBoundaryYWJL9uLrv2ZrzalW, type=class org.glassfish.jersey.media.multipart.FormDataMultiPart, genericType=class org.glassfish.jersey.media.multipart.FormDataMultiPart."
The parameters for the REST API has input of type FormDataMultiPart.
This is happening only with the cloverized JAR, however it works with normal JAR.
The Jersey version we are using is 2.22.2.
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-multipart</artifactId>
<version>${jersey.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
<version>${jersey.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>${jersey.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-multipart</artifactId>
<version>${jersey.version}</version>
<scope>${multipart.scope}</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>${jersey.version}</version>
<scope>provided</scope>
</dependency>
Can you please check for this issue.