Announcement Announcement Module
No announcement yet.
RMI problem with SslRMIClientSocketFactory over single RegistryPort Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • RMI problem with SslRMIClientSocketFactory over single RegistryPort

    Hi All,

    I need to set up my RMI through SSL so I set registryClientSocketFactory with SslRMIClientSocketFactory instance. It work fine if I only run 1 RMI services, however when I try to export 2 interfaces I get the following error:

    Exception in thread "main" org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'dummyDOExporter' defined in class path resource [au/bt/stp/rmi-server-config.xml]: Invocation of init method failed; nested exception is java.rmi.server.ExportException: internal error: ObjID already in use
    at AutowireCapableBeanFactory.initializeBean(Abstract
    at AutowireCapableBeanFactory.doCreateBean(AbstractAu
    at AutowireCapableBeanFactory$
    at Method)
    at AutowireCapableBeanFactory.createBean(AbstractAuto
    at BeanFactory$1.getObject( 51)
    at ingletonBeanRegistry.getSingleton(DefaultSingleton
    at BeanFactory.getBean(
    at BeanFactory.getBean(
    at istableBeanFactory.preInstantiateSingletons(Defaul
    at ationContext.finishBeanFactoryInitialization(Abstr
    at ationContext.refresh(AbstractApplicationContext.ja va:369)
    at plicationContext.<init>(ClassPathXmlApplicationCon
    at plicationContext.<init>(ClassPathXmlApplicationCon
    Caused by: java.rmi.server.ExportException: internal error: ObjID already in use

    Any idea?

    Note, I also find this:
    If I use default registryClientSocketFactory from Spring, it works fine.
    As I can only have one port for registryPort, I have set it to registryPort=1099. Technically, we only need a registryPort and many servicePort for RMI right?

    Please help. THank you very much

    <bean id="stpExporter" class="org.springframework.remoting.rmi.RmiServiceExporter">
    		<property name="serviceName" value="stpProcess"/>
    		<property name="serviceInterface" value=""/>
    		<property name="service" ref="stpProcess"/>
    		<property name="registryPort" value="1099"/>
    		<property name="registryClientSocketFactory" ref="SslRMIClientSocketFactory"></property>
    	<bean id="dummyDOExporter" class="org.springframework.remoting.rmi.RmiServiceExporter">
    		<property name="serviceName" value="dummyDO"/>
    		<property name="serviceInterface" value=""/>
    		<property name="service" ref="dummyDO"/>
    		<property name="registryPort" value="1099"/>
    		<property name="registryClientSocketFactory" ref="SslRMIClientSocketFactory"></property>
    	<bean id="stpProcess" class=""/>
    	<bean id="dummyDO" class=""/>
    	<bean id="SslRMIClientSocketFactory" class="javax.rmi.ssl.SslRMIClientSocketFactory"></bean>