【发布时间】:2012-09-07 00:41:30
【问题描述】:
我正在学习企业应用程序开发课程。我是 JSF 的新手。我正在尝试使用 JSF 和 Netbeans IDE 使用 Glassfish 3.1 部署我的应用程序。
我得到的错误如下所示。
Error occurred during deployment: Exception while preparing the app : Unable to load the EJB module. DeploymentContext does not contain any EJB. Check the archive to ensure correct packaging for F:\Seagate\docs backup\NetBeansProjects\ent-app-dev\Slamka_Project1\build\web.
If you use EJB component annotations to define the EJB, and an ejb or web deployment descriptor is also used, please make sure that the deployment descriptor references a Java EE 5 or higher version schema, and that the metadata-complete attribute is not set to true, so the component annotations can be processed as expected. Please see server.log for more details.
以下是我对 EJB 的引用。
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.ejb.EJB;
@EJB
任何帮助将不胜感激。
编辑:这是一个 Java Web 应用程序。
编辑 战争文件结构树
- META-INF/MANIFEST.MF
- WEB-INF/类
- WEB-INF/lib/primefaces-2.1.1.jar
- WEB-INF/web.xml
- index.shtml
我的文件在 xhtml 文档中没有 EJB 标记。它有下面列出的内容。
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:c="http://java.sun.com/jsf/core">
【问题讨论】:
-
贴出更多代码和jar结构
-
似乎无法将目录结构转换为列表格式。