Bonjour,
J'ai une application client - serveur utilisant le protocle RMI. De plus, je suis un peu novice ds le domaine des RMI.. 
J'utilise SPRING afin de récupérer mon BEAN contenant les données de mon appli que je souhaite récupérer...
Le problème est que lorsque je souhaite récupérer mon BEAN à travers la factory, j'ai cette erreur:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
Erreur Main : ---> Error creating bean with name 'FournisseurServiceRmi' defined in class path resource [Launch.xml]: Initialization of bean failed; nested exception is java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.net.MalformedURLException: no protocol: and
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'FournisseurServiceRmi' defined in class path resource [Launch.xml]: Initialization of bean failed; nested exception is java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.net.MalformedURLException: no protocol: and
java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.net.MalformedURLException: no protocol: and
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Unknown Source)
at org.springframework.remoting.rmi.RmiClientInterceptor.lookupStub(RmiClientInterceptor.java:156)
at org.springframework.remoting.rmi.RmiClientInterceptor.prepare(RmiClientInterceptor.java:125)
at org.springframework.remoting.rmi.RmiClientInterceptor.afterPropertiesSet(RmiClientInterceptor.java:110)
at org.springframework.remoting.rmi.RmiProxyFactoryBean.afterPropertiesSet(RmiProxyFactoryBean.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(AbstractBeanFactory.java:226)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at com.protokiabi.launch.FournisseurConsole.<init>(FournisseurConsole.java:39)
at com.protokiabi.launch.launcher.main(launcher.java:61)
Caused by: java.net.MalformedURLException: no protocol: and
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at sun.rmi.server.LoaderHandler.pathToURLs(Unknown Source)
at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
at java.rmi.server.RMIClassLoader$2.loadClass(Unknown Source)
at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
at sun.rmi.server.MarshalInputStream.resolveClass(Unknown Source)
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
... 12 more |
Si quelqu'un à une idée d'où ça pourrait provenir?
J'ai créer un fichier java.policy contenant:
1 2 3 4 5 6 7
| grant
{
permission java.net.SocketPermission "*:80-65535","connect,accept,listen,resolve";
permission java.security.AllPermission;
permission java.net.SocketPermission "localhost:1199-", "listen";
}; |
J'ai paramétré ce fichier ds la JVM eclipse à l'aide de la ligne suivante:
-Djava.security.policy="D:\Documents and Settings\remertz\Mes documents\Travail\ProjectEclipse\protoKiabiServeur\java.policy"
Mais rien n'y fait, entre les erreurs
UnmarshalException et notBoundException .... je ny comprends plus gd chose.
Merci d'avance
yoko
Partager