如何解决java结果1错误 [英] how to resolve java result 1 errors
问题描述
如何在使用JVMTI代理的情况下解决 java结果1的1种特殊风味?
How to resolve 1 particular flavor of 'java result 1' in the context of using JVMTI agents?
推荐答案
我在我的环境中解决了一个问题:
Here's how I resolved an issue in my context:
服务器通过ANT脚本运行,并且jvm配置了代理(以下属性名称 agentfile与一个值相关联)指向代理库)
The server is run through an ANT script with jvm configured with an agent (the property name 'agentfile' below is associated with a value pointing to the agent library)
现在,我会收到错误信息'java result每当服务器运行时都为1',没有任何实际错误的指示。
Now, I would get the error 'java result 1' whenever the server was run, without any indication of the actual error.
这是调试此问题的方式。
1)代理已关闭(即,以上两行已被注释掉)。
2)然后,在运行ANT时,清楚地显示了实际的错误消息-问题是:缺少类文件。该错误已被代理吞噬,因为它是低级C代码,并且看起来只是加载无法找到的类并引发Java错误。
Here's how this issue was debugged. 1) The agent was turned off (i.e.) the above 2 lines were commented out. 2) Then when ANT was run, the actual error message was clearly shown - the problem was: a class file was missing. This error was being eaten by the agent, since it is low level C code and just looks to load a class that it cannot find and throws the Java error.
经验教训:如果您有代理,请先将其关闭,然后再运行您的ANT-这可能会引发出现错误的原因。当然,这是Java结果1错误引起注意的许多情况之一。
Lesson learnt: if you have an agent, turn it off and then run your ANT - it may throw up the reasons for error seen. This is of course one of many scenarios noticed for the java result 1 error.
这篇关于如何解决java结果1错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!