javax.naming.NameNotFoundException: QueueConnectionFactory not bound
2016-07-08 12:32
387 查看
javax.naming.NameNotFoundException: QueueConnectionFactory not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
at org.jnp.server.NamingServer.lookup(NamingServer.java:443)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
产生这个错误,主要是因为在Jboss5.0下找不到QueueConnectionFactory/TopicConnectionFactory。登陆http://localhost:8090/jmx-console/,在jboss/service=JNDIView/list/Global JNDI Namespace下查找,只有ConnectionFactory!
因此解决办法有了,把发送消息的java类中的QueueConnectionFactory修改一下即可,如下:
QueueConnectionFactory factory = (QueueConnectionFactory)ctx.lookup("QueueConnectionFactory");
改为-->
QueueConnectionFactory factory = (QueueConnectionFactory)ctx.lookup("ConnectionFactory");
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
at org.jnp.server.NamingServer.lookup(NamingServer.java:443)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
产生这个错误,主要是因为在Jboss5.0下找不到QueueConnectionFactory/TopicConnectionFactory。登陆http://localhost:8090/jmx-console/,在jboss/service=JNDIView/list/Global JNDI Namespace下查找,只有ConnectionFactory!
因此解决办法有了,把发送消息的java类中的QueueConnectionFactory修改一下即可,如下:
QueueConnectionFactory factory = (QueueConnectionFactory)ctx.lookup("QueueConnectionFactory");
改为-->
QueueConnectionFactory factory = (QueueConnectionFactory)ctx.lookup("ConnectionFactory");
相关文章推荐
- 【UOJ 209】【UER #6】票数统计
- 找不到符号: 变量 BuildConfig
- UITextField文本字段控件的位置
- WRONGTYPE Operation against a key holding the wrong kind of value
- UITextField占位文字颜色-attributedPlaceholder
- Java并发编程与技术内幕:ArrayBlockingQueue、LinkedBlockingQueue及SynchronousQueue源码解析
- Process 'command '/Users/wcc/Android/sdk/build-tools/23.0.0/aidl'' finished with non-zero exit valu
- CUICatalog: Invalid asset name supplied:
- Android Bluetooth Low Energy官方文档翻译
- abap 弹出对话框函数POPUP_GET_VALUES的使用方法
- 如何监控项目里所有UI线程的操作(实战,BlockCanary)?
- UITextView的placehoder背景文字实现带并限制文字字数
- UICollectionReusableView 使用时的一些问题
- @value注解使用的简单介绍 ---谷营中西
- 数据类型变换uint8_t uint16_t等等
- Android 在子线程中更新UI的方式,使用handler
- Warning:The remote SSH server rejected X11 forwarding request.
- UICollectionViewLayout
- Errors running builder 'Validation' on project 'jumi_3.0'
- 点击tabBarItem跳转到其他界面 返回后还是之前所选item (跳转注册)