Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Problem with Spring Remote (RMI) and RCP application
Problem with Spring Remote (RMI) and RCP application [message #528015] Sun, 18 April 2010 18:36 Go to next message
Jorge is currently offline JorgeFriend
Messages: 11
Registered: March 2010
Junior Member
I am trying to use RMI in client-server RCP application with spring framework. I create four projects: client, common, server and libs. If I define one service no problem, but with two services defined in XML file, a error occurs. When I run the same application in normal java project, without plugins, it works. Has anyone had a similar problem?

This is the XML for server configuration:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>
    <bean id="remoteServiceA" class="test.rcpspring.server.services.RemoteServiceA">        
    </bean>

    <bean class="org.springframework.remoting.rmi.RmiServiceExporter">
        <property name="serviceName" value="remote-service-A"/>
        <property name="service" ref="remoteServiceA"/>
        <property name="serviceInterface" value="test.rcpspring.common.interfaces.IRemoteServiceA"/>
        <property name="registryPort" value="34567"/>
    </bean>

    <bean id="remoteServiceB" class="test.rcpspring.server.services.RemoteServiceB">        
    </bean>

	<bean class="org.springframework.remoting.rmi.RmiServiceExporter">
        <property name="serviceName" value="remote-service-B"/>
        <property name="service" ref="remoteServiceB"/>
        <property name="serviceInterface" value="test.rcpspring.common.interfaces.IRemoteServiceB"/>
        <property name="registryPort" value="34567"/>
    </bean>
</beans>


This is the console output in server:

0    [main] DEBUG org.springframework.core.io.support.PathMatchingResourcePatternResolver  - Found Equinox FileLocator for OSGi bundle URL resolution
11   [main] INFO  org.springframework.context.support.ClassPathXmlApplicationContext  - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@3c342b: startup date [Sun Apr 18 20:25:34 CEST 2010]; root of context hierarchy
67   [main] INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader  - Loading XML bean definitions from class path resource [conf/rmi-server-context.xml]
70   [main] DEBUG org.springframework.beans.factory.xml.DefaultDocumentLoader  - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl]
99   [main] DEBUG org.springframework.beans.factory.xml.BeansDtdResolver  - Found beans DTD [http://www.springframework.org/dtd/spring-beans.dtd] in classpath: spring-beans.dtd
118  [main] DEBUG org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader  - Loading bean definitions
143  [main] DEBUG org.springframework.beans.factory.xml.BeanDefinitionParserDelegate  - Neither XML 'id' nor 'name' specified - using generated bean name [org.springframework.remoting.rmi.RmiServiceExporter#0]
144  [main] DEBUG org.springframework.beans.factory.xml.BeanDefinitionParserDelegate  - Neither XML 'id' nor 'name' specified - using generated bean name [org.springframework.remoting.rmi.RmiServiceExporter#1]
144  [main] DEBUG org.springframework.beans.factory.xml.XmlBeanDefinitionReader  - Loaded 4 bean definitions from location pattern [conf/rmi-server-context.xml]
144  [main] DEBUG org.springframework.context.support.ClassPathXmlApplicationContext  - Bean factory for org.springframework.context.support.ClassPathXmlApplicationContext@3c342b: org.springframework.beans.factory.support.DefaultListableBeanFactory@17ec9f7: defining beans [remoteServiceA,org.springframework.remoting.rmi.RmiServiceExporter#0,remoteServiceB,org.springframework.remoting.rmi.RmiServiceExporter#1]; root of factory hierarchy
165  [main] DEBUG org.springframework.context.support.ClassPathXmlApplicationContext  - Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@131c89c]
167  [main] DEBUG org.springframework.context.support.ClassPathXmlApplicationContext  - Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@7a4489]
169  [main] INFO  org.springframework.beans.factory.support.DefaultListableBeanFactory  - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@17ec9f7: defining beans [remoteServiceA,org.springframework.remoting.rmi.RmiServiceExporter#0,remoteServiceB,org.springframework.remoting.rmi.RmiServiceExporter#1]; root of factory hierarchy
169  [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory  - Creating shared instance of singleton bean 'remoteServiceA'
169  [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory  - Creating instance of bean 'remoteServiceA'
188  [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory  - Eagerly caching bean 'remoteServiceA' to allow for resolving potential circular references
189  [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory  - Finished creating instance of bean 'remoteServiceA'
189  [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory  - Creating shared instance of singleton bean 'org.springframework.remoting.rmi.RmiServiceExporter#0'
189  [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory  - Creating instance of bean 'org.springframework.remoting.rmi.RmiServiceExporter#0'
192  [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory  - Eagerly caching bean 'org.springframework.remoting.rmi.RmiServiceExporter#0' to allow for resolving potential circular references
234  [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory  - Returning cached instance of singleton bean 'remoteServiceA'
243  [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory  - Invoking afterPropertiesSet() on bean with name 'org.springframework.remoting.rmi.RmiServiceExporter#0'
243  [main] INFO  org.springframework.remoting.rmi.RmiServiceExporter  - Looking for RMI registry at port '34567'
262  [main] DEBUG org.springframework.remoting.rmi.RmiServiceExporter  - RMI registry access threw exception
java.rmi.ConnectException: Connection refused to host: 127.0.1.1; nested exception is: 
	java.net.ConnectException: Connection refused
	at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
	at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
	at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
	at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
	at sun.rmi.registry.RegistryImpl_Stub.list(Unknown Source)
	at org.springframework.remoting.rmi.RmiServiceExporter.testRegistry(RmiServiceExporter.java:415)
	at org.springframework.remoting.rmi.RmiServiceExporter.getRegistry(RmiServiceExporter.java:394)
	at org.springframework.remoting.rmi.RmiServiceExporter.getRegistry(RmiServiceExporter.java:372)
	at org.springframework.remoting.rmi.RmiServiceExporter.getRegistry(RmiServiceExporter.java:331)
	at org.springframework.remoting.rmi.RmiServiceExporter.prepare(RmiServiceExporter.java:264)
	at org.springframework.remoting.rmi.RmiServiceExporter.afterPropertiesSet(RmiServiceExporter.java:227)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
	at test.rcpspring.server.ServerApplication.start(ServerApplication.java:25)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	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:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1406)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1382)
Caused by: java.net.ConnectException: Connection refused
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
	at java.net.Socket.connect(Socket.java:525)
	at java.net.Socket.connect(Socket.java:475)
	at java.net.Socket.<init>(Socket.java:372)
	at java.net.Socket.<init>(Socket.java:186)
	at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
	at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
	at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
	... 37 more
264  [main] INFO  org.springframework.remoting.rmi.RmiServiceExporter  - Could not detect RMI registry - creating new one
269  [main] DEBUG org.springframework.remoting.rmi.RmiServiceExporter  - RMI service [test.rcpspring.server.services.RemoteServiceA@18bd7f1] is an RMI invoker
282  [main] DEBUG org.springframework.aop.framework.JdkDynamicAopProxy  - Creating JDK dynamic proxy: target source is SingletonTargetSource for target object [test.rcpspring.server.services.RemoteServiceA@18bd7f1]
295  [main] INFO  org.springframework.remoting.rmi.RmiServiceExporter  - Binding service 'remote-service-A' to RMI registry: RegistryImpl[UnicastServerRef [liveRef: [endpoint:[127.0.1.1:34567](local),objID:[0:0:0, 0]]]]
301  [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory  - Finished creating instance of bean 'org.springframework.remoting.rmi.RmiServiceExporter#0'
301  [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory  - Creating shared instance of singleton bean 'remoteServiceB'
301  [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory  - Creating instance of bean 'remoteServiceB'
302  [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory  - Eagerly caching bean 'remoteServiceB' to allow for resolving potential circular references
302  [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory  - Finished creating instance of bean 'remoteServiceB'
302  [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory  - Creating shared instance of singleton bean 'org.springframework.remoting.rmi.RmiServiceExporter#1'
302  [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory  - Creating instance of bean 'org.springframework.remoting.rmi.RmiServiceExporter#1'
302  [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory  - Eagerly caching bean 'org.springframework.remoting.rmi.RmiServiceExporter#1' to allow for resolving potential circular references
302  [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory  - Returning cached instance of singleton bean 'remoteServiceB'
303  [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory  - Invoking afterPropertiesSet() on bean with name 'org.springframework.remoting.rmi.RmiServiceExporter#1'
303  [main] INFO  org.springframework.remoting.rmi.RmiServiceExporter  - Looking for RMI registry at port '34567'
380  [main] DEBUG org.springframework.remoting.rmi.RmiServiceExporter  - RMI service [test.rcpspring.server.services.RemoteServiceB@6db724] is an RMI invoker
380  [main] DEBUG org.springframework.aop.framework.JdkDynamicAopProxy  - Creating JDK dynamic proxy: target source is SingletonTargetSource for target object [test.rcpspring.server.services.RemoteServiceB@6db724]
387  [main] INFO  org.springframework.remoting.rmi.RmiServiceExporter  - Binding service 'remote-service-B' to RMI registry: RegistryImpl_Stub[UnicastRef [liveRef: [endpoint:[127.0.1.1:34567](remote),objID:[0:0:0, 0]]]]
430  [main] INFO  org.springframework.beans.factory.support.DefaultListableBeanFactory  - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@17ec9f7: defining beans [remoteServiceA,org.springframework.remoting.rmi.RmiServiceExporter#0,remoteServiceB,org.springframework.remoting.rmi.RmiServiceExporter#1]; root of factory hierarchy
430  [main] DEBUG org.springframework.beans.factory.support.DisposableBeanAdapter  - Invoking destroy() on bean with name 'org.springframework.remoting.rmi.RmiServiceExporter#0'
430  [main] INFO  org.springframework.remoting.rmi.RmiServiceExporter  - Unbinding RMI service 'remote-service-A' from registry at port '34567'
!SESSION 2010-04-18 20:25:32.957 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_16
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=es_ES
Framework arguments:  -product test.rcpspring.server.product
Command-line arguments:  -product test.rcpspring.server.product -data /home/jorge/workspace-3.6M6/../runtime-server.product -dev file:/home/jorge/workspace-3.6M6/.metadata/.plugins/org.eclipse.pde.core/server.product/dev.properties -os linux -ws gtk -arch x86 -consoleLog

!ENTRY org.eclipse.osgi 4 0 2010-04-18 20:25:35.044
!MESSAGE Application error
!STACK 1
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.remoting.rmi.RmiServiceExporter#1' defined in class path resource [conf/rmi-server-context.xml]: Invocation of init method failed; nested exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 
	java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
	java.lang.ClassNotFoundException: org.springframework.remoting.rmi.RmiInvocationHandler (no security manager: RMI class loader disabled)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1412)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
	at test.rcpspring.server.ServerApplication.start(ServerApplication.java:25)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	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:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1406)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1382)
Caused by: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 
	java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
	java.lang.ClassNotFoundException: org.springframework.remoting.rmi.RmiInvocationHandler (no security manager: RMI class loader disabled)
	at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:396)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250)
	at sun.rmi.transport.Transport$1.run(Transport.java:159)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
	at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
	at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
	at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:359)
	at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
	at org.springframework.remoting.rmi.RmiServiceExporter.prepare(RmiServiceExporter.java:286)
	at org.springframework.remoting.rmi.RmiServiceExporter.afterPropertiesSet(RmiServiceExporter.java:227)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
	... 25 more
Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
	java.lang.ClassNotFoundException: org.springframework.remoting.rmi.RmiInvocationHandler (no security manager: RMI class loader disabled)
	at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
	at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:386)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250)
	at sun.rmi.transport.Transport$1.run(Transport.java:159)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: org.springframework.remoting.rmi.RmiInvocationHandler (no security manager: RMI class loader disabled)
	at sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.java:535)
	at java.rmi.server.RMIClassLoader$2.loadProxyClass(RMIClassLoader.java:628)
	at java.rmi.server.RMIClassLoader.loadProxyClass(RMIClassLoader.java:294)
	at sun.rmi.server.MarshalInputStream.resolveProxyClass(MarshalInputStream.java:238)
	at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1531)
	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1493)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
	... 12 more


Re: Problem with Spring Remote (RMI) and RCP application [message #528020 is a reply to message #528015] Sun, 18 April 2010 18:59 Go to previous messageGo to next message
Jorge is currently offline JorgeFriend
Messages: 11
Registered: March 2010
Junior Member
I uploaded the 4 projects that I'm running:

http://www.2shared.com/file/12654617/18e6b0a8/testrcpspring. html

If you comment in conf/rmi-server-context.xml (test.rcpspring.server plugin) the fourth bean, it's run ok.

Jorge.
Re: Problem with Spring Remote (RMI) and RCP application [message #558269 is a reply to message #528015] Fri, 10 September 2010 17:28 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 1
Registered: September 2010
Junior Member
Hi,

I am stuck with the same error as you. Did you manage to resolve it ?
java.lang.ClassNotFoundException: org.springframework.remoting.rmi.RmiInvocationHandler (no security manager: RMI class loader disabled)

Thanks
Naresh
Re: Problem with Spring Remote (RMI) and RCP application [message #699479 is a reply to message #558269] Thu, 21 July 2011 15:53 Go to previous message
Adam  is currently offline Adam Friend
Messages: 1
Registered: July 2011
Junior Member
Hi! You have to add:
System.setSecurityManager(new RMISecurityManager());

before:
LocateRegistry.createRegistry(port);

and in bin/dmk.bat:

set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -Djava.security.policy="%CONFIG_DIR%\server.policy"

server.policy:
grant codeBase "file:${java.home}/lib/ext/-" {
	permission java.security.AllPermission;
};

// default permissions granted to all domains

grant { 

	permission java.security.AllPermission;
};

but after that I am having:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 
	java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
	java.lang.ClassNotFoundException: org.springframework.remoting.rmi.RmiInvocationHandler

on line 291 in RmiServiceexporter class ;/

...and I have imported 'org.springframework.remoting.rmi' package in my bundle ;/

[Updated on: Thu, 21 July 2011 15:54]

Report message to a moderator

Previous Topic:How to control view location when attaching (un-detached)it?
Next Topic:Correct way to access IWorkbenchThemeConstants
Goto Forum:
  


Current Time: Thu Apr 25 14:49:07 GMT 2024

Powered by FUDForum. Page generated in 0.03746 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top