0 Replies Latest reply on Aug 24, 2012 12:18 PM by Josh Smith

    RESTEasy Async Deployment on AS7

    Josh Smith Newbie

      I am trying to prototype async webservices using RestEash on AS7, and when I try to deploy my app I get the following error on startup.

       

       

      Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions

      org.jboss.resteasy.spi.AsynchronousResponse is an interface, and JAXB can't handle interfaces.

                this problem is related to the following location:

                          at org.jboss.resteasy.spi.AsynchronousResponse

                          at private org.jboss.resteasy.spi.AsynchronousResponse home.adex.jersey.jaxws_asm.ProcessRequest.arg0

                          at home.adex.jersey.jaxws_asm.ProcessRequest

      org.jboss.resteasy.spi.AsynchronousResponse does not have a no-arg default constructor.

                this problem is related to the following location:

                          at org.jboss.resteasy.spi.AsynchronousResponse

                          at private org.jboss.resteasy.spi.AsynchronousResponse home.adex.jersey.jaxws_asm.ProcessRequest.arg0

                          at home.adex.jersey.jaxws_asm.ProcessRequest

       

      Here is my code

       

      {code}

       

       

          @Path("/bidrequest")

          @POST

          @Produces("text/plain")

          public void processRequest(final @Suspend(10000) AsynchronousResponse response) throws Exception {

              Thread t = new Thread() {

                  @Override

                  public void run() {

                      try {

                          Response jaxrs = Response.ok("basic").type(MediaType.APPLICATION_JSON).build();

                          response.setResponse(jaxrs);

                      } catch (Exception e) {

                          e.printStackTrace();

                      }

                  }

              };

              t.start();

          }

      {code}

       

       

      Any ideas as to why i am seeing this issue

       

      Using JBoss 7.1.1 Final

      RestEasy 2.3.4 Final