rmi spring resin启动出错

[00:30:36,734] [ContextLoader,215] - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xxxxServiceExporter' defined in ServletContext resource [/WEB-INF/applicationContext-rmiserver.xml]: Invocation of init method failed; nested exception is java.rmi.ConnectException: Connection refused to host:xxxx.xxx.xxx.xx; nested exception is:
java.net.ConnectException: Connection refused
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1336)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:471)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderServlet.init(ContextLoaderServlet.java:81)
at javax.servlet.GenericServlet.init(GenericServlet.java:70)
at com.caucho.server.dispatch.ServletConfigImpl.createServletImpl(ServletConfigImpl.java:833)
at com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:735)
at com.caucho.server.dispatch.ServletManager.init(ServletManager.java:159)
at com.caucho.server.webapp.WebApp.start(WebApp.java:1874)
at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:667)
at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:549)
at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:160)
at com.caucho.server.webapp.WebAppContainer.start(WebAppContainer.java:659)
at com.caucho.server.host.Host.start(Host.java:450)
at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:667)
at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:549)



[color=red]spring不需要配置:[/color]

        <property name="registryHost"  value="xxx.xxx.xxx.xxx"/>


只需要在resin的resin.conf的jvm参数中添加如下

 <jvm-arg>-Djava.rmi.server.hostname=xxx.xxx.xxx.xxx</jvm-arg>



主要原因是因为服务器有多网卡多IP所引起的,所以我们要指定服务器启动rmi服务的IP
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值