Are you running on Windows? Many people have reported issues with RMI on Windows, but they are not Maven bugs, simply JVM/JDK issues.
You should take a look at this thread from April 25: [M2] Problem running tests on Windows (white-space in repository?) And here's some text from that thread, quoting from Thorstein Heit: <quote> A couple of weeks ago there was a discussion that RMI tests fail if there are whitespace characters in the path name. As far as I remember this is because of some quite old bugs still contained even in the latest JDK; see also http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4273532 Does your code reside in such a directory? If yes, could you move it to a different location that doesn't contain any whitespace in the paths and check again? </quote> Not sure if this helps, but search the Maven User email archive for "RMI" and you'll see a bunch of hits, and the general advice has been to move repositories and project files around until you have no spaces in any directory names. Wayne On 4/27/06, Todd Nine <[EMAIL PROTECTED]> wrote: > Hi all, hopefully this thread is not dead. I think the problem may be with > the classworlds code. We recently tried to deploy the client with the > uberjar, and we are experiencing the same problem. If I write a shell > script to add all the jars to the classpath from the extracted Uber jar, the > client works. Does anyone have any idea why this would fail? > > Thanks, > Todd > > On 4/12/06, Wayne Fay <[EMAIL PROTECTED]> wrote: > > > > This has been discussed in the last month or two on the User list. Not > > sure if there was a solution. But search the Archives to find past > > email threads. > > > > Wayne > > > > On 4/12/06, Todd Nine <[EMAIL PROTECTED]> wrote: > > > I'm unable to run any unit test that will connect to a remove JVM from > > my > > > Maven 2.0.2 unit tests. I always receive either a > > > javax.naming.CommunicationException for Remote EJB's or > > > java.rmi.ConnectException for RMI connections. The unit tests work in > > > Eclipse as well as from the command line, has anyone else experienced > > this > > > behavior? If so how did you resolve it? This seems like a security > > policy > > > problem with the VM that is used for unit testing, but I'm unsure how to > > fix > > > it. Any advice would be greatly appreciated. > > > > > > Thanks, > > > Todd > > > > > > > > > >
