Exception in thread "main" javax.jms.JMSException: java.net.ConnectException: C nnection refused:
2017-10-16 19:59
585 查看
执行环境 Windows 7 旗舰版 32位
apache-activemq-5.9.0
执行cmd命令java -cp target/amqp-example-0.1-SNAPSHOT.jar example.Listener,提示Exception in thread "main" javax.jms.JMSException: java.net.ConnectException: Connection refused: connect,效果如下图:
原因是在执行例子过程中未将ActiveMQ开启,将ActiveMQ 5.9.0开启,即可成功运行Java程序
运行examples文件夹下其它java程序均需将ActiveMQ5.9.0开启
apache-activemq-5.9.0
执行cmd命令java -cp target/amqp-example-0.1-SNAPSHOT.jar example.Listener,提示Exception in thread "main" javax.jms.JMSException: java.net.ConnectException: Connection refused: connect,效果如下图:
原因是在执行例子过程中未将ActiveMQ开启,将ActiveMQ 5.9.0开启,即可成功运行Java程序
运行examples文件夹下其它java程序均需将ActiveMQ5.9.0开启
相关文章推荐
- Exception in thread "main" java.net.SocketTimeoutException: connect timed ou错误处理
- Exception in thread "main" redis.clients.jedis.exceptions.JedisConnectionException: java.net.ConnectException: Connection refused (Connection refused)
- 【转载】Exception in thread "main" java.lang.NoClassDefFoundError: net/sf/cglib/proxy/CallbackFilter
- Exception in thread "main" redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketT
- Exception in thread "main" java.net.ProtocolException: Invalid HTTP method: get
- Exception in thread "main" java.lang.NoClassDefFoundError: javax/transaction/Synchronization
- xom报错 Exception in thread "main" java.net.UnknownHostException: file
- spark Exception in thread "main" java.lang.IllegalArgumentException: java.net.URISyntaxException: Re
- Exception in thread "main" java.lang.NoClassDefFoundError: javax/servlet/ServletContext
- Exception in thread "main" java.lang.NoSuchMethodError: javax.persistence.OneToOne.orphanRemoval()Z
- Exception in thread "main" java.lang.NoClassDefFoundError: javax/transaction/Synchronization
- Exception in thread "main" java.lang.NoClassDefFoundError: javax/servlet/ServletContext
- Exception in thread "main" java.lang.NoSuchMethodError: javax.persistence.OneToOne.orphanRemoval()Z
- exception in thread "main" java.lang.RuntimeException: java.lang.IllegalArgumentException: java.net.
- Exception in thread "main" java.lang.InternalError: Can't connect to X11 window
- Exception in thread "main" java.lang.SecurityException: class "javax.servlet.FilterRegistration"'s s
- l backtype.storm.ui.core Exception in thread "main" java.net.BindException: Address already in use
- Exception in thread "main" java.lang.NoClassDefFoundError: javax/servlet/Filter
- Exception in thread "main" java.lang.NoClassDefFoundError: javax/transaction/Synchronization
- hibernate Exception in thread "main" java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException