Javax. Naming. namenotfoundexception: queueconnectionfactory not bound

Source: Internet
Author: User

I encountered a small error when developing messagedrivenbean under jboss5.0 with the following prompt:
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 O RG. jnp. server. namingserver. lookup (namingserver. java: 443)
at Sun. reflect. nativemethodaccessorimpl. invoke0 (native method)

this error occurs mainly because the queueconnectionfactory . I log on to http: // localhost: 8090/JMX-console/of jboss5.0 and search for it under JBoss/service = jndiview/LIST/Global JNDI namespace, only connectionfactory !

Therefore, you can modify queueconnectionfactory in the Java class that sends the message as follows:
Queueconnectionfactory factory = (queueconnectionfactory) CTX. Lookup("Queueconnectionfactory");
Change to -->
Queueconnectionfactory factory = (queueconnectionfactory) CTX. Lookup("Connectionfactory");

OK!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.