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

NullPointerException in FormMarshaller when making a call with a null parameter

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.3.4.Final
    • 2.2.2.GA
    • jaxrs
    • None

      Having a service method with a @Form parameter, like:

      void setStatus(@PathParam("id") long id, @Form Details details);
      

      And calling it with the client framework, using org.jboss.resteasy.client.ProxyFactory, triggers this exception:

      java.lang.NullPointerException
      	at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:36)
      	at sun.reflect.UnsafeObjectFieldAccessorImpl.get(UnsafeObjectFieldAccessorImpl.java:18)
      	at java.lang.reflect.Field.get(Field.java:358)
      	at org.jboss.resteasy.client.core.marshallers.FormMarshaller.build(FormMarshaller.java:198)
      	at org.jboss.resteasy.client.core.ClientInvoker.createRequest(ClientInvoker.java:134)
      	at org.jboss.resteasy.client.core.ClientInvoker.invoke(ClientInvoker.java:99)
      	at org.jboss.resteasy.client.core.ClientProxy.invoke(ClientProxy.java:72)
      

            patriot1burke@gmail.com Bill Burke (Inactive)
            andrei.ivanov@gmail.com Andrei Ivanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: