Eclipse : 项目未构建,因为其构建路径不完整
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8193027/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse :The project was not built since its build path is incomplete
提问by Revathi
I am using Eclipse IDE . When i tried to build the Applicaion , its giving me this error under Problems view
我正在使用 Eclipse IDE。当我尝试构建应用程序时,它在问题视图下给了我这个错误
Description
描述
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
采纳答案by jkschneider
Sounds like you have a simple Java project and not an web project. You are missing a Server Runtime that provides the EjbObject to your project.
听起来您有一个简单的 Java 项目而不是 Web 项目。您缺少为您的项目提供 EjbObject 的服务器运行时。
Either try converting the project by right-clicking, "Convert To", "Faceted Project", and select the appropriate Java EE configurations for your use case or create a new project with a Java EE nature and copy your code there.
尝试通过右键单击“转换为”、“分面项目”来转换项目,然后为您的用例选择适当的 Java EE 配置,或者创建一个具有 Java EE 性质的新项目并将您的代码复制到那里。
回答by pingu
Incase of weblogic you have to add server runtime POM dependency - wlthint3client :
在 weblogic 的情况下,您必须添加服务器运行时 POM 依赖项 - wlthint3client :
<dependency>
<groupId>com.oracle.weblogic</groupId>
<artifactId>wlthint3client</artifactId>
<version>10.3.5</version>
</dependency>
回答by Manish Bhadani
I went through same error and i found solution.You can import external jar file JAVAX.ejb.jar and configure it in your project.
回答by user2520736
I was getting the same problem.
我遇到了同样的问题。
I was missing to select the server in the project facet. After doing that, it solved.
我没有在项目方面选择服务器。这样做后,它解决了。