简体   繁体   English

从所需的.class文件中间接引用

[英]Indirectly referenced from required .class file

I'm getting an error message when I try to build my project in eclipse: 当我尝试在eclipse中构建我的项目时,我收到一条错误消息:

The type weblogic.utils.expressions.ExpressionMap cannot be resolved. It is indirectly referenced from required .class files

I've looked online for a solution and cannot find one (except for those sites that make you pay for help). 我在网上寻找解决方案而找不到一个(除了那些让你付费的网站)。 Anyone have any idea of a way to find out how to go about solving this problem? 任何人都知道如何找到解决这个问题的方法? Any help is appreciated, thanks! 任何帮助表示赞赏,谢谢!

How are you adding your Weblogic classes to the classpath in Eclipse? 如何将您的Weblogic类添加到Eclipse中的类路径? Are you using WTP, and a server runtime? 您使用的是WTP还是服务器运行时? If so, is your server runtime associated with your project? 如果是,您的服务器运行时是否与您的项目相关联?

If you right click on your project and choose build path->configure build path and then choose the libraries tab. 如果右键单击项目并选择构建path->configure构建路径,然后选择库选项卡。 You should see the weblogic libraries associated here. 您应该看到此处关联的weblogic库。 If you do not you can click Add Library->Server Runtime . 如果不这样做,可以单击“ Add Library->Server Runtime If the library is not there, then you first need to configure it. 如果库不存在,那么首先需要配置它。 Windows->Preferences->Server->Installed runtimes

添加spring-tx jar文件,它应该解决它。

Have you Googled for "weblogic ExpressionMap"? 你有Google搜索“weblogic ExpressionMap”吗? Do you know what it is and what it does? 你知道它是什么以及它有什么作用吗?

Looks like you definitely need to be compiling alongside Weblogic and with Weblogic's jars included in your Eclipse classpath, if you're not already. 看起来你肯定需要与Weblogic以及Eclipse类路径中包含的Weblogic的jar一起编译,如果你还没有。

If you're not already working with Weblogic, then you need to find out what in the world is referencing it. 如果您尚未使用Weblogic,那么您需要了解世界上哪些内容正在引用它。 You might need to do some heavy-duty grepping on your jars, classfiles, and/or source files looking for which ones include the string "weblogic". 您可能需要对您的jar,classfiles和/或源文件执行一些重要的grepping,以查找包含字符串“weblogic”的文件。

If I had to include something that was relying on this Weblogic class, but couldn't use Weblogic, I'd be tempted to try to reverse-engineer a compatible class. 如果我必须包含依赖于这个Weblogic类的东西,但是不能使用Weblogic,那么我很想尝试对兼容类进行逆向工程。 Create your own weblogic.utils.expressions.ExpressionMap class; 创建自己的weblogic.utils.expressions.ExpressionMap类; see if everything compiles; 看看是否一切都在编译; use any resultant errors or warnings at compile-time or runtime to give you clues as to what methods and other members need to be in this class. 在编译时或运行时使用任何结果错误或警告,以便为您提供有关此类中需要哪些方法和其他成员的线索。 Make stub methods that do nothing or return null if possible. 使stub方法不执行任何操作或尽可能返回null。

This issue happen because of few jars are getting references from other jar and reference jar is missing . 出现这个问题是因为很少有jar从其他jar获取引用并且缺少引用jar。

Example : Spring framework 示例:Spring框架

Description Resource    Path    Location    Type
The project was not built since its build path is incomplete. Cannot find the class file for org.springframework.beans.factory.annotation.Autowire. Fix the build path then try building this project   SpringBatch     Unknown Java Problem

In this case "org.springframework.beans.factory.annotation.Autowire" is missing. 在这种情况下,缺少“org.springframework.beans.factory.annotation.Autowire”。

Spring-bean.jar is missing

Once you add dependency in your class path issue will resolve. 一旦在类路径中添加依赖项,问题就会解决。

I was getting this error: 我收到了这个错误:

The type com.ibm.portal.state.exceptions.StateException cannot be resolved. 无法解析类型com.ibm.portal.state.exceptions.StateException。 It is indirectly referenced from required .class files 它是从所需的.class文件间接引用的

Doing the following fixed it for me: 为我做了以下修复:

Properties -> Java build path -> Libraries -> Server Library[wps.base.v61]unbound -> Websphere Portal v6.1 on WAS 7 -> Finish -> OK 属性 - > Java构建路径 - >库 - >服务器库[wps.base.v61]未绑定 - > WAS 7上的Websphere Portal v6.1 - >完成 - >确定

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Eclipse ::间接地从必需的.class文件中引用 - Eclipse::Indirectly referenced from required .class files 间接引用所需的.class文件 - Indirectly referenced from required .class files java.nio.file.Path无法解析。 从所需的.class文件间接引用它 - java.nio.file.Path cannot be resolved. It is indirectly referenced from required .class files 从所需的 .class 文件间接引用,即使构建路径设置正确 apache POI ..? - Indirectly referenced from required .class file, even the build path is set correctly apache POI..? 无法解析类型java.lang.Charsequence。 从所需的.class文件间接引用 - The type java.lang.Charsequence cannot be resolved. It is indirectly referenced from required .class file Spring Boot从所需的.class文件间接引用 - Spring boot It is indirectly referenced from required .class files SingleBOdy无法解决。 从所需的.class文件间接引用它 - SingleBOdy cannot be resolved. It is indirectly referenced from required .class files 无法解决 DataAccessException。 它是从所需的 .class 文件间接引用的 - DataAccessException cannot be resolved. It is indirectly referenced from required .class files Spring MVC + STS + Maven:无法解析WebSecurity。 从所需的.class文件间接引用它 - Spring MVC + STS + Maven: WebSecurity cannot be resolved. It is indirectly referenced from required .class files 无法解析org.codehaus.jackson.JsonGenerationException类型。 它是从所需的.class文件间接引用的 - The type org.codehaus.jackson.JsonGenerationException cannot be resolved. It is indirectly referenced from required .class files
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM