IntelliJ IDEA: ClassNotFoundException if run Debug, execution/run does work
Asked Answered
E

3

25

I have a Java Maven Project started in Eclipse, worked on it a few days, then imported it in IntelliJ IDEA, again working on it a few days.

The normal Run/Execution in IDEA and via shell does work, but not the Debug.

When I click the Bug Icon for Debug, it opens up URLClassLoader.java file and points on the Line "throw new ClassNotFoundException(name)" and pauses the Debug, if I click Resume Debug, it shows several Classes that do not belong to my project. I can click the Resume Button endless, it shows the same classes, also ClassNotFoundException over and over again in a continuously loop and does not debug my source.

If I click Build -> Rebuild Project it says at the Debug icon "Hot Swap failed myClassname: schema change not implemented; myClassname: Operation not supported by VM"

In the Debug window under Variables it says: "Frame is not available"

The Debug of this project in IntelliJ IDEA did work previously, whats wrong now?

Eon answered 7/1, 2015 at 12:56 Comment(0)
L
62

Looks like you have an exception breakpoint on ClassNotFoundException. Please try to open Run | View Breakpoints... and uncheck the breakpoint under "Java Exception Breakpoints".

Lialiabilities answered 7/1, 2015 at 20:55 Comment(5)
Thanks! It works. I can now debug my program. But why is there a ClassNotFoundException?Eon
It's a normal part of a Java program initialization.Lialiabilities
Thanks a lot, I was forced to remember how to use remote debug - same as I did in 2011-12 :)Berhley
how is that normal ?Lyricist
Anyone know how the all exceptions breakpoint would suddenly get turned on without being noticed.Pole
A
0

This is really helpful. Go to your breakpoints in debug mode and make sure to deselect all the breakpoints first and then select only the ones in your class.

A1 answered 16/1, 2019 at 6:27 Comment(0)
W
0

in my situation, just neglect the evaluate language drop down. enter image description here

Without answered 23/8, 2019 at 16:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.