how to resolve java result 1 errors
Asked Answered
B

1

1

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

Brilliant answered 20/11, 2010 at 2:45 Comment(2)
self-answering questions are perfectly acceptable here but the usual convention is to post the question without the answer, then answer it yourself. That way, we still get the clear demarcation between questions and answers. I would suggest editing the question and posting an answer, otherwise it's likely to be closed as "not a real question". Everyone else, maybe it would be worthwhile holding off closing until crazy has a chance to fix, yes?Childers
thank you for pointing out this convention - I have modified my post.Brilliant
B
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.

Brilliant answered 21/11, 2010 at 17:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.