Announcement Announcement Module
Collapse
No announcement yet.
does remoting not work with generics? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • does remoting not work with generics?

    Hello,

    I'm using spring remoting 2.0.6 and have somer problems with a service.

    If a super interface:

    Code:
    interface IBusinessObjectService<T, U> {
      
      List<T> findAll(); 
      T findById(U id);
      void aggregate(T entity); 
      void insert(T entity);
      void update(T entity);
      void delete(T entity);
      
    }
    And a subinterace:

    Code:
    public interface IProducerService extends IBusinessObjectService<Producer, String> {
    
    }
    When I make a methodcall to

    Code:
    ServiceFactory.getProducerService().findById(producerId);
    I recieve an Exception:
    Code:
    Caused by: java.lang.NoSuchMethodException: $Proxy49.findById(java.lang.Object)
    
    	at java.lang.Class.getMethod(Class.java:1599)
    
    	at org.springframework.remoting.support.RemoteInvocation.invoke(RemoteInvocation.java:178)
    
    	at org.springframework.remoting.support.DefaultRemoteInvocationExecutor.invoke(DefaultRemoteInvocationExecutor.java:33)
    
    	at org.springframework.remoting.support.RemoteInvocationBasedExporter.invoke(RemoteInvocationBasedExporter.java:76)
    
    	at org.springframework.remoting.support.RemoteInvocationBasedExporter.invokeAndCreateResult(RemoteInvocationBasedExporter.java:112)
    
    	at org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter.handleRequest(HttpInvokerServiceExporter.java:82)
    
    	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
    
    	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:723)
    
    	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:663)
    Does this version of Spring not support generics?

    Thanks

    Mike
Working...
X