Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-2448

@MultipartForm does not support classes without a default constructor

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 3.6.1.Final
    • jaxrs
    • None

    Description

      Hi,

      We are using resteasy with jackson2-provider.
      We would like to have an API that takes a @MultipartForm with a class that does not have a default constructor but has a "@JsonCreator" (class attached).

      The server is unable to process the request and throws:

      {{
      java.lang.NoSuchMethodException: com.ListToscaTypesRequest.<init>()
      at java.lang.Class.getConstructor0(Class.java:3082)
      at java.lang.Class.newInstance(Class.java:412)
      at org.jboss.resteasy.plugins.providers.multipart.MultipartFormAnnotationReader.readFrom(MultipartFormAnnotationReader.java:64)
      ...
      }}
      (fuller stacktrace is attached).

      The issue was found with 3.6.1.Final but seems it exists in master as well - https://github.com/resteasy/Resteasy/blob/cb95b891e98dca9d5af495aac1ac7b4781cb6510/providers/multipart/src/main/java/org/jboss/resteasy/plugins/providers/multipart/MultipartFormAnnotationReader.java#L63

      Attachments

        Activity

          People

            Unassigned Unassigned
            moshelisha Moshe Elisha (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: