how to resolve java result 1 errors

社会主义新天地 提交于 2019-12-24 17:15:47

问题


How to resolve 1 particular flavor of 'java result 1' in the context of using JVMTI agents?


回答1:


Here's how I resolved an issue in my context:

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)

Now, I would get the error 'java result 1' whenever the server was run, without any indication of the actual error.

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.

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.



来源:https://stackoverflow.com/questions/4230940/how-to-resolve-java-result-1-errors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!