斷點

          每天進步一點點!
          posts - 174, comments - 56, trackbacks - 0, articles - 21

          我在Jboss5.0下開發MessageDrivenBean時,遇到了一個小錯誤,提示如下:
          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)
           
          產生這個錯誤,主要是因為在Jboss5.0下找不到QueueConnectionFactory。我登陸jboss5.0的
          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");

          OK,搞定!


          posted @ 2009-03-27 17:56 斷點 閱讀(618) | 評論 (3)

          Feedback

          # re: javax.naming.NameNotFoundException: QueueConnectionFactory not bound   回復  更多評論   

          2012-03-01 10:14 by =v=
          非常感謝!!太愛你了=3=
          主站蜘蛛池模板: 吐鲁番市| 芜湖市| 浑源县| 隆回县| 西平县| 黄浦区| 三门峡市| 井研县| 宕昌县| 北宁市| 黑龙江省| 宁阳县| 浏阳市| 扶沟县| 台前县| 巴南区| 民权县| 卫辉市| 惠安县| 福鼎市| 奈曼旗| 寻甸| 韩城市| 邹平县| 奉新县| 民勤县| 无为县| 边坝县| 仪陇县| 肃宁县| 青岛市| 四川省| 大港区| 建昌县| 华阴市| 佛教| 寿阳县| 陈巴尔虎旗| 罗江县| 安宁市| 中卫市|