WebLogic中的一个名为CounterEJB的Stateless SessionBean,运行正确。移植到JBoss中后,我将weblogic的配置文件删去,改动后的目录结构如下:
\index.jsp
\META-INF\MANIFEST.MF
\WEB-INF\web.xml
********\classes\statelesssession\Counter.class
*********************************\CounterHome.class
*********************************\CounterTest.class
\ejb_build\META-INF\ejb-jar.xml
**********\statelesssession\Counter.class
***************************\CounterHome.class
***************************\CounterBean.class
程序运行是这样的:index.jsp――CounterTest――EJB
我将以上文件分别打包为CounterIndex.war和CounterEJB.jar,放到Jboss的deploy目录下。没有什么出错信息。
打开浏览器,键入http://localhost:8080/CounterIndex/index.jsp,页面可以正常打开。当我按下页面中的按钮,页面提交给Servlet,Servlet调用EJB时,产生如下错误:
12:12:45,045 ERROR [STDERR] javax.naming.NameNotFoundException: CounterEJB not bound
.java:643)
12:12:45,075 ERROR [Engine] StandardWrapperValve[CounterTest]: Allocate exception for servlet CounterTest
javax.servlet.ServletException: CounterEJB not bound
哪位大侠可以帮我看看,哪里出问题了?