ArtOfWarfare
ArtOfWarfare

Reputation: 21476

Some IntelliJ Breakpoints are X'd during Remote Debugging

I'm attempting to debug a remote application running on WebSphere Liberty Profile through IntelliJ.

I'm able to set breakpoints within my own code - those show up with a checkmark in the margin and work fine.

The specific problem I'm having though is with a java.io.ObjectInputStream. When I call readObject() on the stream, it throws an exception. I would like to know more about which specific part of my stream is bad, though, so I right clicked readObject() and picked Go To > Implementation, and attempted to set a few breakpoints within this method.

When I run the debugger, those breakpoints show up with X's through the breakpoint instead of checkmarks, and this message shows up in a tooltip:

Warning: No executable code found at line 603 in class java.io.ObjectInputStream

But that line clearly has this code in it:

return Class.forName(name, false, latestUserDefinedLoader());

So I'm really confused why I'm getting this error message.

Any suggestions for how I can either have a breakpoint within java.io.ObjectInputStream or otherwise see some of the values being deserialized before an exception being thrown would be much appreciated.

Upvotes: 3

Views: 1151

Answers (1)

gogstad
gogstad

Reputation: 3739

This usually happens when the version of the source code you're breakpointing in is not the same as the version running on the remote JVM. Look for the version of the jar in the title bar of IntelliJ and verify that it's the same as the jar on Websphere.

Upvotes: 4

Related Questions