我正在使用 JBoss AS 5.0.1,当我尝试调用我的 Servlet 时出现以下错误。
17:11:48,060 ERROR [STDERR] javax.naming.NameNotFoundException: EJBSvcApp not bound
我已经使用上面的名称创建了一个 EAR,我已经添加了我的 EJB 和 Web 项目。我还在我的 Web 应用程序的部署程序集中包含了 EJBClient。下面是 JBoss 日志跟踪。我还在日志中看到一个警告,我不确定它是什么。
17:09:27,962 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@457214762{vfszip:/C:/jboss- 5.0.1.GA/server/default/deploy/EJBSvcApp.ear/EJBSvcEJB.jar/}
17:09:27,963 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@457214762{vfszip:/C:/jboss-5.0.1.GA/server/default/deploy/EJBSvcApp.ear/EJBSvcEJB.jar/}
17:09:27,963 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@457214762{vfszip:/C:/jboss-5.0.1.GA/server/default/deploy/EJBSvcApp.ear/EJBSvcEJB.jar/}
7:09:27,986 WARN [Ejb3AnnotationHandler] JBMETA-4: did not find any bean meta data for annotation bean OrderBean, will create some
17:09:33,622 INFO [JBossASKernel] Created KernelDeployment for: EJBSvcEJB.jar
17:09:33,626 INFO [JBossASKernel] installing bean: jboss.j2ee:ear=EJBSvcApp.ear,jar=EJBSvcEJB.jar,name=OrderBean,service=EJB3
17:09:33,626 INFO [JBossASKernel] with dependencies:
17:09:33,626 INFO [JBossASKernel] and demands:
17:09:33,627 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
17:09:33,627 INFO [JBossASKernel] and supplies:
17:09:33,627 INFO [JBossASKernel] Class:com.webpage.ejb.Order
17:09:33,627 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=EJBSvcApp.ear,jar=EJBSvcEJB.jar,name=OrderBean,service=EJB3) to KernelDeployment of: EJBSvcEJB.jar
17:09:33,776 INFO [SessionSpecContainer] Starting jboss.j2ee:ear=EJBSvcApp.ear,jar=EJBSvcEJB.jar,name=OrderBean,service=EJB3
17:09:33,786 INFO [EJBContainer] STARTED EJB: com.webpage.ejb.OrderBean ejbName: OrderBean
17:09:33,791 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
17:09:33,850 WARN [WebServiceDeployerEJB] Ingore ejb deployment with null classname: org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData@6012d7fe{OrderBean}
17:09:33,928 INFO [TomcatDeployment] deploy, ctxPath=/EJBSvcWeb
我创建了一个 EJB 接口
@Remote()
public interface Order {...
和豆
@Stateless(name = "OrderBean")
public class OrderBean implements Order { ...
我正在 My Servlet 中进行如下查找
Order o = (Order)(new InitialContext()).lookup("EJBSvcApp/OrderBean/remote");