1 Reply Latest reply on Feb 7, 2012 7:39 PM by mick_mcgovern1

    RestEasy on 7.1.0CR1 "random" "Bad Arguments/Object is not instance of defining class" failures

    mick_mcgovern1

      Hi,

       

      We have SLSB as REST resources. Call to the services fail randomly - e.g. may take several server restarts to make error "go away".

       

      The error is:

      org.jboss.resteasy.spi.InternalServerErrorException: Bad arguments passed to public com.vantage.capital.service.wssimple.system.SystemStatusCheck com.vantage.capital.service.wssimple.system.SystemService.systemStatus()  ( )
      at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:195) [resteasy-jaxrs-2.3.0.GA.jar:]
      at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257) [resteasy-jaxrs-2.3.0.GA.jar:]
      at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222) [resteasy-jaxrs-2.3.0.GA.jar:]
      at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211) [resteasy-jaxrs-2.3.0.GA.jar:]
      at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525) [resteasy-jaxrs-2.3.0.GA.jar:]
      .......
      Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_21]
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [:1.6.0_21]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [:1.6.0_21]

       

      Snip of code
      @GET
      @Path("/status")
      @Produces("application/vnd.vantage.capital.system.status+xml")
      public SystemStatusCheck systemStatus() {
      return new SystemStatusCheck("OK");
      }

       

      I'm unable to determine a pattern to the work/fails behaviour - but nothing more than a server restart is needed to make it go away.

       

      Any thoughts?

       

      Thanks

      Michael