JNDI 名称未绑定
我正在疯狂地尝试修复此异常: javax.naming.NameNotFoundException: lawless not bound
这是一个在 Intellij 中构建的 Stripes Web 应用程序,并部署在 Jboss 4.2.3 上(使用 4.2.3 因为 Stripes 在更高版本中存在问题。我过去曾成功使用过 4.2.3,所以我知道这不是问题)。我有一个名为“ListingManagerBean”的会话 bean。我检查了 jboss jndi 树,没有找到它。所以看来问题是 jar 没有被部署。我查看了我的耳朵档案,里面既有战争,也有罐子。耳朵结构如下所示:
lawless.ear
|- lawless.jar
|- lawless.war
|- [a bunch of other jars]
|- META-INF
|- application.xml
|- MANIFEST.MF
application.xml 如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/application_5.xsd"
version="5">
<display-name>Lawless</display-name>
<module id="Lawless-EJB">
<ejb>lawless.jar</ejb>
</module>
<module id="Lawless-Web">
<web>
<web-uri>lawless.war</web-uri>
<context-root>/</context-root>
</web>
</module>
</application>
我错过了什么吗?请帮忙。
I'm going crazy trying to fix this exception: javax.naming.NameNotFoundException: lawless not bound
This is a Stripes web app built in Intellij and being deployed on Jboss 4.2.3 (Using 4.2.3 because Stripes has issues with later versions. I have successfully used 4.2.3 in the past so I know that's not the problem). I have one session bean called "ListingManagerBean". I checked the jboss jndi tree, and its nowhere to be found. So it seems the problem is that the jar isn't being deployed. I looked in my ear file, and it has both the war and jar. The ear structure looks like this:
lawless.ear
|- lawless.jar
|- lawless.war
|- [a bunch of other jars]
|- META-INF
|- application.xml
|- MANIFEST.MF
application.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/application_5.xsd"
version="5">
<display-name>Lawless</display-name>
<module id="Lawless-EJB">
<ejb>lawless.jar</ejb>
</module>
<module id="Lawless-Web">
<web>
<web-uri>lawless.war</web-uri>
<context-root>/</context-root>
</web>
</module>
</application>
Am I missing something? Help please.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以检查服务器日志文件并跟踪您的ear 文件的部署。如果无法部署 jar 文件,您会在那里找到它,并有一条或多或少有意义的错误消息,指出在哪里查找错误。
You can check the server logfile and follow the deployment of your ear file. If the jar file cannot be deployed you'll find it there and a more or less meaningful error message pointing to where to look for the error.