Results 1 to 3 of 3

Thread: Client Link to exported services using RMI fail

  1. #1
    Join Date
    Aug 2004
    Location
    China
    Posts
    11

    Default Client Link to exported services using RMI fail

    I Refers Reference-Documentation's 16.2. Exposing services using RMI implement RMI service interface, and i create client to invoke server side RMI interface ,but when loading client application context xml file, create org.springframework.remoting.rmi.RmiProxyFactoryBe an, system throws exception:
    ava.lang.ExceptionInInitializerError
    Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'client' defined in class path resource [org/springframework/samples/petclinic/client/applicationContext-Client.xml]: Can't resolve reference to bean 'clinicService' while setting property 'clinicService'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'clinicService' defined in class path resource [org/springframework/samples/petclinic/client/applicationContext-Client.xml]: Initialization of bean failed; nested exception is java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
    java.net.MalformedURLException: no protocol: Files/Apache
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:180)
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveValueIfNecessary(BeanDe finitionValueResolver.java:105)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.applyPropertyValues(Abs tractAutowireCapableBeanFactory.java:1012)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:823)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:345)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:226)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:147)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:275)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:318)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:81)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:66)
    at org.springframework.samples.petclinic.client.PetCl inicClient.<clinit>(PetClinicClient.java:18)
    Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'clinicService' defined in class path resource [org/springframework/samples/petclinic/client/applicationContext-Client.xml]: Initialization of bean failed; nested exception is java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
    java.net.MalformedURLException: no protocol: Files/Apache
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:370)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:226)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:147)
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:176)
    ... 11 more
    Caused by: 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.RmiClientIntercep tor.lookupStub(RmiClientInterceptor.java:156)
    at org.springframework.remoting.rmi.RmiClientIntercep tor.prepare(RmiClientInterceptor.java:125)
    at org.springframework.remoting.rmi.RmiClientIntercep tor.afterPropertiesSet(RmiClientInterceptor.java:1 10)
    at org.springframework.remoting.rmi.RmiProxyFactoryBe an.afterPropertiesSet(RmiProxyFactoryBean.java:66)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1058)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:363)
    ... 14 more
    Caused by: java.net.MalformedURLException: no protocol: Files/Apache
    at java.net.URL.<init>(URL.java:567)
    at java.net.URL.<init>(URL.java:464)
    at java.net.URL.<init>(URL.java:413)
    at sun.rmi.server.LoaderHandler.pathToURLs(LoaderHand ler.java:747)
    at sun.rmi.server.LoaderHandler.loadClass(LoaderHandl er.java:147)
    at java.rmi.server.RMIClassLoader$2.loadClass(RMIClas sLoader.java:620)
    at java.rmi.server.RMIClassLoader.loadClass(RMIClassL oader.java:247)
    at sun.rmi.server.MarshalInputStream.resolveClass(Mar shalInputStream.java:197)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectI nputStream.java:1538)
    at java.io.ObjectInputStream.readClassDesc(ObjectInpu tStream.java:1460)
    at java.io.ObjectInputStream.readOrdinaryObject(Objec tInputStream.java:1693)
    at java.io.ObjectInputStream.readObject0(ObjectInputS tream.java:1299)
    at java.io.ObjectInputStream.readObject(ObjectInputSt ream.java:339)
    ... 22 more

  2. #2

    Default

    Can you post your wiring for the client?

  3. #3
    Join Date
    Aug 2004
    Location
    China
    Posts
    11

    Default

    Quote Originally Posted by tgrecojr
    Can you post your wiring for the client?
    thanks!

    I have resolved the question:it is a bug in the JDK which makes RMI fail if Tomcat is installed in directory containing spaces (e.g. C:\Program Files\Apache Group\Jakarta Tomcat 5.0).

    the detail informaiton as following link:http://forum.springframework.org/showthread.php?t=18728

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •