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

当我尝试在eclipse中构build项目时,出现错误消息:

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

我在网上寻找解决scheme,找不到一个(除了那些让你付费的网站)。 任何人有任何想法找出如何解决这个问题? 任何帮助表示赞赏,谢谢!

你如何将你的Weblogic类添加到Eclipse中的类path中? 你使用WTP和服务器运行时? 如果是这样,你的服务器运行时是否与你的项目关联?

如果你右键点击你的项目并select构buildpath->configure构buildpath,然后select库标签。 您应该看到这里关联的weblogic库。 如果你不这样做,你可以点击Add Library->Server Runtime 。 如果图书馆不在那里,那么你首先需要configuration它。 Windows->Preferences->Server->Installed runtimes

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

你是否search了“weblogic ExpressionMap”? 你知道它是什么,它做了什么?

看起来你肯定需要和Weblogic一起编译,如果还没有,那么Weblogic的jar包含在你的Eclipse classpath中。

如果你还没有使用Weblogic,那么你需要找出世界上引用它的东西。 您可能需要在您的jar,classfiles和/或源文件上执行一些重要的操作,以查找包含string“weblogic”的文件。

如果我不得不包含依赖于这个Weblogic类,但不能使用Weblogic的东西,我会试图去反向工程一个兼容的类。 创build自己的weblogic.utils.expressions.ExpressionMap类; 看看是否一切正常; 在编译时或运行时使用任何由此产生的错误或警告,为您提供关于此类中需要的方法和其他成员的线索。 使存根方法不做任何事情,或者如果可能的话返回null。

这个问题的发生是因为很less的jar子从其他jar子获得引用,并且引用jar子丢失了。

例如: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 

在这种情况下缺less“org.springframework.beans.factory.annotation.Autowire”。

 Spring-bean.jar is missing 

一旦你在你的类path添加依赖问题将解决。

我得到这个错误:

com.ibm.portal.state.exceptions.StateExceptiontypes无法parsing。 它是从所需的.class文件间接引用的

为我做了以下修复:

属性 – > Java构buildpath – >库 – >服务器库[wps.base.v61] unbound – > Websphere Portal V6.1在WAS 7上 – >完成 – >确定