从 Tomcat 连接到 Hornetq 时出错
当我运行一个独立的 Hornetq 并尝试从 tomcat 连接到它时,我遇到了这个错误。我收到此错误:
javax.management.InstanceNotFoundException: org.hornetq:module=Core,type=Queue,address="jms.queue.MyQueue",name="jms.queue.MyQueue"
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1094)
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:662)
com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:638)
I'm having this error when I have a standalone Hornetq running I'm trying to connect to it from tomcat. I get this error :
javax.management.InstanceNotFoundException: org.hornetq:module=Core,type=Queue,address="jms.queue.MyQueue",name="jms.queue.MyQueue"
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1094)
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:662)
com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:638)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您试图从一个实际上不存在的实例中获取一个属性。我建议不要在它的实例为 null 时调用 getAttribute。当您尝试 queryName(or) queryMBeans 时,您将知道 Mbean 是否存在。
You are trying to get an attribute from an instance which is really not there. What I would suggest don't call getAttribute on Instance of it is null. While you are trying queryName(or) queryMBeans you will know whether Mbean exists or not.