0
The service Code looks like below. I have defined @PATH in main class.

@POST
    @Timed
    @Produces(MediaType.MULTIPART_FORM_DATA)
    @ResponseStatusOverride(httpStatus = 202)
    public MetaLinks CreateEdmUpload(@ApiParam(hidden = true) @Auth User user,
                                     @FormDataParam("importInput") FormDataBodyPart jsonPart,
                                     @FormDataParam("file") InputStream mdfStream,
                                     @FormDataParam("file") FormDataContentDisposition cdh)

            throws ApiException {

        jsonPart.setMediaType(MediaType.APPLICATION_JSON_TYPE);
        ImportInput importInput = jsonPart.getValueAs(ImportInput.class);

I have the following dependency in POM

<dependency>
            <groupId>org.glassfish.jersey.media</groupId>
            <artifactId>jersey-media-multipart</artifactId>
            <version>2.23.1</version>
        </dependency>

AND I am registering the class as well in my client request but when i start the JAVA application to try to POST i get the following error

alidation of the application resource model has failed during application initialization. [[FATAL] No injection source found for a parameter of type public com.rm

What could be wrong.. Can someone please suggest

user3897533
  • 417
  • 1
  • 8
  • 24

1 Answers1

0

Yes registering multipartFeature solved the problem.

user3897533
  • 417
  • 1
  • 8
  • 24