关于从所需的.class文件间接引用的类型的Eclipse中的错误 [英] Error in Eclipse about type indirectly referenced from required .class file

查看:853
本文介绍了关于从所需的.class文件间接引用的类型的Eclipse中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


类型为org.apache.axiom.om.OMElement不能解决,它是
间接引用的必需的.class文件


我一直在阅读很多帖子,试图找到一个解决方案。我到目前为止发现的是将apache tomcat 5.5库添加到构建路径。它删除了java文件中的错误,但是当我在项目中执行任何java程序时,我收到了这个错误:


'启动myApp'遇到一个问题异常发生
执行命令行。无法运行程序C:\Program
Files \Java\jdk1.5.0_22\bin\javaw.exe(在目录
D:\Digicel\workspace\ Digicel\myClassSample):CreateProcess error = 87,
参数不正确


那么如果我删除apache tomcat图书馆从构建路径,我可以运行其他java程序,但不是最初提到的程序。



任何想法?

解决方案

好的,我在朋友的帮助下找到了问题的原因:)



事实是,Eclipse知道我的一个依赖关系取决于另一个库,而Eclipse在尝试构建代码时正在检查它。



那么,什么我做的是尝试检查哪个jar文件包含这个库:org.apache.axiom.om.OMElement。



我已经google了,发现它是axiom-api-1.2.10.jar,最后我的文件编译0个错误。



他还向我解释说,我添加apache tomcat服务器库的原始解决方案是添加所有与apache tomcat相关的jar(这是一个很大的列表),并且可能与我目前的添加列表列出版本冲突。



因此,修复程序是找到适当的jar并将其添加到项目中。


I'm having this exception with some stubs generateds by Axis2:

"The type org.apache.axiom.om.OMElement cannot be resolved. It is indirectly referenced from required .class files"

I've been reading many posts, and trying to find a solution. What I've found so far is to add the apache tomcat 5.5 library to the build path. It removed the error in the java file, but then, when I to execute any java program inside the project, I got this error:

'Launching myApp' has encountered a problem Exception occurred executing command line. Cannot run program "C:\Program Files\Java\jdk1.5.0_22\bin\javaw.exe" (in directory "D:\Digicel\workspace\Digicel\myClassSample"): CreateProcess error=87, The parameter is incorrect

then if I remove the apache tomcat library from the build path, I can run the other java programs, but not the one mentioned initially.

Any thoughts about it?

解决方案

Okay, I've found the cause of the problem with the help of a friend :)

The thing is that Eclipse is aware that one of my dependencies, depends of another library, and Eclipse is checking for it when it tries to build the code.

So, what I've done is try to check which jar file contains this library: " org.apache.axiom.om.OMElement".

I've googled it and found that it is "axiom-api-1.2.10.jar" and finally my file compiled with 0 errors.

He also explained to me that my original solution of adding the apache tomcat server library is adding all the jars that cames with apache tomcat (which is a big list), and probably there may have been a version conflict with my current list of added jars.

So, the fix was to find the appropriate jar and add it to the project.

这篇关于关于从所需的.class文件间接引用的类型的Eclipse中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆