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

Interfaced resources cause scanning issues

XMLWordPrintable

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

      The client documentation says that this is possible, but I wasn't able to get the server side to work, I get an IndexOutOfBoundsException in the POJOResourceFactory when it tries to create the resource from the interface. The documentation leads me to believe that the proper way to share an interface is to annotate the interface and the server side implementation would just implement the interface without having to specify any annotations. Here's how it looks:

      @Path("/")

      public interface Service

      { @GET @Path("/foo") @Produces("application/xml) public Foo getFoo(); }

      public class ServiceImpl { public Foo getFoo()

      { return new Foo(); }

      }

      At startup I get an ArrayIndexOutOfBoundsException from here:

      POJOResourceFactory:31 "Constructor constructor = scannableClass.getDeclaredConstructors()[0];"

      Seems like a bug to me, but if I'm doing anything wrong any help is appreciated. Thanks.

            patriot1burke@gmail.com Bill Burke (Inactive)
            patriot1burke@gmail.com Bill Burke (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: