Eclipse:项目未构建,因为其构建路径不完整。

5
我正在使用Eclipse IDE。 当我尝试构建应用程序时,在“问题”视图下出现了以下错误。
描述:
The project was not built since its build path is incomplete. Cannot find the class file for javax.ejb.EJBObject. Fix the build path then try building this project 

Type

Java Problem
The type javax.ejb.EJBObject cannot be resolved. It is indirectly referenced from required .class files

所以你必须将包含“EJBObject”的JAR添加到构建路径中... - home
4个回答

3
听起来你有一个简单的Java项目,而不是一个Web项目。你缺少一个Server Runtime,它提供了EjbObject到你的项目中。
要么尝试通过右键点击,选择“转换为”,“Faceted Project”,并选择适合你使用情况的Java EE配置来转换项目,要么创建一个带有Java EE属性的新项目,并将你的代码复制到那里。

0

0

我遇到了相同的问题。

我忘记在项目方面选择服务器,当我补上这个步骤后,问题得到解决。


0

如果使用Weblogic,则需要添加服务器运行时的POM依赖 - wlthint3client:

<dependency>
        <groupId>com.oracle.weblogic</groupId>
        <artifactId>wlthint3client</artifactId>
        <version>10.3.5</version>
    </dependency>

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接