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

NullPointerException : ProxyFactory.create

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.1.GA
    • 1.1.RC2
    • None
    • None

      I have one interface for REST service, for example:

      @Produces(

      {"application/json", "application/xml"})
      @Consumes({"application/json", "application/xml"}

      )
      public interface SomeService {
      List<SomeClass> getAnotherList();

      @GET
      @Path("/")
      @Wrapped
      List<SomeClass> getList();
      }

      And I'm trying to create proxy:
      locationsService = ProxyFactory.create(SomeService.class, new URI(baseUrl), client, ResteasyProviderFactory.getInstance());

      And I've got an exception:
      java.lang.NullPointerException at org.jboss.resteasy.client.ProxyFactory.create(ProxyFactory.java:68)

      Because method IsHttpMethod.getHttpMethods(method) can return null value in case when method in interface doesn't have GET or POST annotations.

      Also as I see there is no way to create proxy for such interfaces.

              patriot1burke@gmail.com Bill Burke (Inactive)
              mandrikov Evgeny Mandrikov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: