java.rmi.ConnectException

Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused: connect

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web462

  • via Oracle Community by 843793, 2 weeks ago
    Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused: connect java.net.ConnectException: Connection refused: connect
  • via Oracle Community by 843793, 2 weeks ago
    Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused: connect java.net.ConnectException: Connection refused: connect
  • via Oracle Community by 843793, 1 year ago
    Connection refused to host: <servermachine>; nested exception is: java.net.ConnectException: Connection refused: connect java.net.ConnectException: Connection refused: connect
  • Stack trace

    • java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused: connect at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:389) at com.algoTrader.RemoteServiceLocator.getContext(RemoteServiceLocator.java:119) at com.algoTrader.RemoteServiceLocator.getRuleService(RemoteServiceLocator.java:203) at com.algoTrader.service.mov.MovStarter.start(MovStarter.java:21) at com.algoTrader.service.mov.MovStarter.main(MovStarter.java:14) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'beanRefFactory' defined in URL [file:/ C:/iStuff/cepdemo/AlgoTraderLight/code/target/classes/ beanRefFactoryClient.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.context.support.ClassPathXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext-import-remoteServices.xml]: Cannot create inner bean 'org.springframework.remoting.rmi.RmiProxyFactoryBean#1bd7848' of type [org.springframework.remoting.rmi.RmiProxyFactoryBean] while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.remoting.rmi.RmiProxyFactoryBean#1bd7848' defined in class path resource [applicationContext-import-remoteServices.xml]: Invocation of init method failed; nested exception is org.springframework.remoting.RemoteLookupFailureException: Lookup of RMI stub failed; nested exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused: connect at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:288) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485) 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:580) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) at org.springframework.context.access.ContextSingletonBeanFactoryLocator.initializeDefinition(ContextSingletonBeanFactoryLocator.java:143) at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:384) ... 4 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Once, 2 weeks ago
    37 times, 4 weeks ago
    Unknown user
    Once, 1 month ago
    Once, 2 months ago
    Once, 2 months ago
    255 more bugmates