I am trying to debug any problems in my Java application which does not throw any errors, there is no exception It does not even crash the app (it seems that failure occurs in a different thread).
The problem is inside a library function (it is inside the call for JAXBContext.newInstance (string)
). This program will reach the first line of the call, but only after this nobody is there. My hold
blocks have not been entered and the program is currently in progress.
The problem occurs when trying to present an XML response to the web request coming through a string, the request has been handled and the code should be martial to the response object. Customer receives immediate response (hence the code does not seem to hang in the loop), but it is just empty.
I have set a breakpoint before the problem line but debugger is over now, I have no clue.
I am using eclipse and it is run inside an OSGi container (Apache Felix) which was started from -Xdebug -Xrunjdwp: transport = dt_socket, address = 8000 , Server = y, suspended = y
. From the eclipse I use the debug setting for the "Remote Java application" to add the debugger.
What are the techniques to go to such a problem?
Maybe there is a clear question, but are you sure you're catching throws? An unwanted exception can be the reason for the thread to die easily (no one is assuming you in the call stack).
Since you are suspending VM on startup with your debug logic, you have confirmed that the debugger is correctly attached to it. The fact is that you can say that Debugger stops right back to the call, it is very doubtful. Are you able to hit any breakpoint in this app? What will happen in this class? What about this thread?
How did you collapse the line in question without a debugger? Println / debugging in a file?
Can you paste a code snippet of the method in question?
You can confirm this principle that the thread is dying before creating a second thread, and if it joins the thread you feel that it is dying. Then the second thread () will be applied (when the thread comes out in the question), and you know that it has died (but still do not know why.)
In response to your general question, when I There is a bug in the Java app that I can not reproduce the debugger (which happens periodically for several reasons), I modify my code with sysout printlns or output files. If necessary, I can modify the code which is implementing my code. If you do not have a source code for code, you can try one of several BCI frameworks to inject your byte code in the questions in question. This is a tedious process, but only occasionally this happens.
Comments
Post a Comment