Forum Stats

  • 3,752,633 Users
  • 2,250,529 Discussions
  • 7,867,903 Comments

Discussions

java.rmi.ConnectException: Connection refused to host: 127.0.0.1

User_7BFXQ
User_7BFXQ Member Posts: 2 Green Ribbon
edited Jun 14, 2021 2:04PM in Java Programming

 Initialization of bean failed; nested exception is java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:

    java.net.ConnectException: Connection refused (Connection refused)

java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:

    java.net.ConnectException: Connection refused (Connection refused)

    at java.rmi/sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:623)

    at java.rmi/sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:209)

    at java.rmi/sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:196)

    at java.rmi/sun.rmi.server.UnicastRef.newCall(UnicastRef.java:343)

    at java.rmi/sun.rmi.registry.RegistryImpl_Stub.lookup(RegistryImpl_Stub.java:116)

    at java.rmi/java.rmi.Naming.lookup(Naming.java:101)

    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 org.springframework.beans.factory.support.AbstractBeanFactory.getType(AbstractBeanFactory.java:342)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.isBeanTypeMatch(DefaultListableBeanFactory.java:249)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:144)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:198)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:192)

    at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:204)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.findMatchingBeans(DefaultListableBeanFactory.java:358)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:883)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:817)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:345)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getType(AbstractBeanFactory.java:342)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.isBeanTypeMatch(DefaultListableBeanFactory.java:249)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:144)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:198)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:192)

    at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:204)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.findMatchingBeans(DefaultListableBeanFactory.java:358)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:883)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:817)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:345)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getType(AbstractBeanFactory.java:342)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.isBeanTypeMatch(DefaultListableBeanFactory.java:249)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:144)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:198)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:192)

    at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:204)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.findMatchingBeans(DefaultListableBeanFactory.java:358)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:883)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:817)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:345)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getType(AbstractBeanFactory.java:342)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.isBeanTypeMatch(DefaultListableBeanFactory.java:249)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:144)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:198)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:192)

    at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:204)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.findMatchingBeans(DefaultListableBeanFactory.java:358)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:883)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:817)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:345)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getType(AbstractBeanFactory.java:342)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.isBeanTypeMatch(DefaultListableBeanFactory.java:249)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:144)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:198)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:192)

    at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:204)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.findMatchingBeans(DefaultListableBeanFactory.java:358)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:883)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:817)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:345)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getType(AbstractBeanFactory.java:342)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.isBeanTypeMatch(DefaultListableBeanFactory.java:249)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:144)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:198)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:192)

    at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:204)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.findMatchingBeans(DefaultListableBeanFactory.java:358)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:883)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:817)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:345)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getType(AbstractBeanFactory.java:342)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.isBeanTypeMatch(DefaultListableBeanFactory.java:249)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:144)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:198)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:192)

    at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:204)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.findMatchingBeans(DefaultListableBeanFactory.java:358)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:883)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:817)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:345)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:151)

    at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:559)

    at org.springframework.context.support.AbstractApplicationContext.initMessageSource(AbstractApplicationContext.java:419)

    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:308)

    at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:134)

    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)

    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)

    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)

    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4685)

    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5146)

    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)

    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)

    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)

    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)

    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)

    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)

    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)

    at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)

    at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)

    at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:773)

    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)

    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1576)

    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)

    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)

    at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)

    at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)

    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)

    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)

    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)

    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)

    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)

    at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)

    at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)

    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)

    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)

    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)

    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)

    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

    at org.apache.catalina.startup.Catalina.start(Catalina.java:633)

    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.base/java.lang.reflect.Method.invoke(Method.java:566)

    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)

    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)

Caused by: java.net.ConnectException: Connection refused (Connection refused)

    at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)

    at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)

    at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)

    at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)

    at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)

    at java.base/java.net.Socket.connect(Socket.java:609)

    at java.base/java.net.Socket.connect(Socket.java:558)

    at java.base/java.net.Socket.<init>(Socket.java:454)

    at java.base/java.net.Socket.<init>(Socket.java:231)

    at java.rmi/sun.rmi.transport.tcp.TCPDirectSocketFactory.createSocket(TCPDirectSocketFactory.java:40)

    at java.rmi/sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:617)

Comments