Dear All, Should anybody be in the scenario that I've been in today, trying vainly for hours to get an rmi service and proxy running in surefire to no avail, and they are getting the exception something like that included below, then I have hope. This is a JVM error which is manifested when you try and invoke an RMI service inside a directory in windows which has spaces in the path. The way to get around this problem is to move your maven install dir to a directory (ex c:\maven\m2.0.2) which contains no spaces. You also need to repoint your M2_HOME variable to this dir. It would seem that the RMI server that is being created is invoked from the m2_HOME/bin directory and if you have spaces you get this error. Rather poorly this bug seems to have been in the JVM since 1.2 I hope this is useful to someone other than me. [1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4496398 <http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4496398> Chris
java.net.MalformedURLException: no protocol: Files/Apache java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.net.MalformedURLException: no protocol: Files/Apache at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source) at java.rmi.Naming.lookup(Naming.java:84) at org.springframework.remoting.rmi.RmiClientInterceptor.lookupStub(RmiClientIn terceptor.java:156) at org.springframework.remoting.rmi.RmiClientInterceptor.prepare(RmiClientInter ceptor.java:125) at org.springframework.remoting.rmi.RmiClientInterceptor.afterPropertiesSet(Rmi ClientInterceptor.java:110) at org.springframework.remoting.rmi.RmiProxyFactoryBean.afterPropertiesSet(RmiP roxyFactoryBean.java:66) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory .invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1059) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory .createBean(AbstractAutowireCapableBeanFactory.java:363) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra ctBeanFactory.java:226) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra ctBeanFactory.java:147) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst antiateSingletons(DefaultListableBeanFactory.java:269) at org.springframework.context.support.AbstractApplicationContext.refresh(Abstr actApplicationContext.java:320) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(Cl assPathXmlApplicationContext.java:87) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(Cl assPathXmlApplicationContext.java:72) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(Cl assPathXmlApplicationContext.java:63) at com.drkw.cpds.proxy.config.SpringEnvironmentApplicationContext.getSpringAppC ontext(SpringEnvironmentApplicationContext.java:52) at com.drkw.cpds.proxy.config.SpringEnvironmentApplicationContext.getAppContext (SpringEnvironmentApplicationContext.java:27) at com.drkw.cpds.impl.proxy.authorisation.AuthorisationProxyFactory.constructPr oxy(AuthorisationProxyFactory.java:68) at com.drkw.cpds.impl.proxy.authorisation.AuthorisationProxyFactory.getProxyIns tance(AuthorisationProxyFactory.java:26) at com.drkw.cpds.it.authorisation.TestCasePing.testPing(TestCasePing.java:20) 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:324) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) Chris Stevenson Dresdner Kleinwort Wasserstein -------------------------------------------------------------------------------- The information contained herein is confidential and is intended solely for the addressee. Access by any other party is unauthorised without the express written permission of the sender. If you are not the intended recipient, please contact the sender either via the company switchboard on +44 (0)20 7623 8000, or via e-mail return. If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. --------------------------------------------------------------------------------