我正在使用resteasy jax-rs实现,其余api的工作完全正常,但在升级到wildfly面临一些问题后,如下所示
我有一个API如下:
@GET
@Path("/{sp}/services")
@Produces("application/json")
public Response getSearchPoint(@PathParam("sp") String searchpoint)
这个api在疯狂之前工作正常,但现在失败了
2018-05-29 20:07:18,345 ERROR [org.jboss.resteasy.resteasy_jaxrs.i18n] (default task-30) RESTEASY002005: Failed executing GET /services/storage/serviceprofiles/DebugProfile/services: org.jboss.resteasy.spi.InternalServerErrorException: RESTEASY003020: Bad arguments passed to org.jboss.resteasy.spi.metadata.ResourceMethod@3db5e33b ( java.lang.String DebugProfile )
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:179)
at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295)
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249)
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:236)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:402)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:209)
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:221)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
....
....
Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:139)
... 67 more
你可以帮忙吗? widlfly版本是wildfly-10.1.0.Final