This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

No matching RMI stub problem

Feb 15th, 2010, 11:51 AM

I am having a problem where two separate EJBs are trying to invoke another EJB. The first EJB can invoke it with no problems, but when the second tries to, I get a "no matching RMI stub" error. Here's a summary of what's going on:

1 stateless EJB called ServiceA
2 stateless EJBs (EJB_A & EJB_B) that use ServiceA as a remote EJB.
All EJBs are running in the same server, but each are deployed in different EARs.

EJB_A initializes and then invokes ServiceA with no problems.

EJB_B initializes and then when it tries to invoke ServiceA, this error message is generated: No matching RMI stub method found for: .....

This problem can be fixed if ServiceA and EJB2 is restarted. EJB_B and EJB_A can now both successfully invoke ServiceA.

The problem can be traced to org.springframework.remoting.rmi -> RmiClientInterceptorUtils.java:114