I have a web service where the client request a file to be created through a SOAP request. When the file is ready the client will download it through REST:
But I get the following error:Code:@Controller("servicesX") public class ServicesXImpl implements ServicesX { [...] @Override @RequestMapping(value="/downloads/{id}",method=RequestMethod.GET) public Object getFile(@PathVariable UUID id) throws Exception { return new ServletContextResource(context,getFilePath(id)); } [...]
Earlier I had this error, but I solved it removing the @Transactional annotation from this class.Code: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:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597)
Now the error came back, and I don't know why or how to solve it. I'm able to call the method successfully if the method is static, so the problem isn't the UUID parameter. So the problem is probably the wrong instance of this class being used for reflection.
Does anyone have a clue?
Thanks!!


Reply With Quote
