简体   繁体   English

在JMS中使用JBoss进行JNDI查找错误

[英]JNDI look up error using JBoss in JMS

I am trying to do JNDI lookup using JMS and JBoss for my practice application. 我正在尝试为我的练习应用程序使用JMS和JBoss进行JNDI查找。 But I am not able to figure out why it is not able to lookup. 但是我无法弄清楚为什么它无法查找。 I added entries into destination-service.xml for JBoss. 我将条目添加到JBoss的destination-service.xml中。 But as you can see my code in the images, its still giving me an error. 但是正如您在图像中看到我的代码一样,它仍然给我一个错误。

Is there any code part that I am missing or do I have to add some jar file to path or some other problem do you see after looking at my stacktrace for the error. 是否有我缺少的任何代码部分,还是我必须在查看堆栈跟踪错误后看到的一些jar文件添加到路径或其他问题?

My Class 我的课 我的班级

destination-service.xml destination-service.xml destination-service.xml

Error 错误 错误

It looks like you can't connect to the JNDI server at all. 看来您根本无法连接到JNDI服务器。 Check host/port of the jndi server that you supply in the client code 检查您在客户端代码中提供的jndi服务器的主机/端口

As a 'self-check' I would also try to connect to any other object that resides in the JNDI tree, I think the exception will be the same :) 作为“自检”,我还将尝试连接到驻留在JNDI树中的任何其他对象,我认为例外是相同的:)

Hope this helps 希望这可以帮助

When you start jboss, use "run.sh -b 0.0.0.0". 启动jboss时,请使用“ run.sh -b 0.0.0.0”。 By default, jboss is secure and bound to localhost only. 默认情况下,jboss是安全的,并且仅绑定到localhost。

Maybe this will help you. 也许会对您有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM