Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 648
Marco Wagner Avatar asked Jan 07 '15 12:01

Marco Wagner


People also ask

Why debug is not working in Intellij?

To solve this, simply remove the jar of the debugged module from all modules' dependencies in the Project Structure. If you do not know which modules have the debugged module jar as dependencies, you can use some tools (Eg. Sublime Text, bash, ...) to search for the module name which is stored in Intellij *.

How do I debug and run in Intellij?

Run the program in debug modeClick the Run icon in the gutter, then select Modify Run Configuration. Enter arguments in the Program arguments field. Click the Run button near the main method. From the menu, select Debug.

How do I enable run in Intellij?

From the main menu, select Run | Edit Configurations. Alternatively, press Alt+Shift+F10 , then 0 . on the toolbar or press Alt+Insert . The list shows the run/debug configuration templates.

How do I continue after breakpoint in Intellij?

You can press F8 to step to the next statement and f9 to step to the next breakpoint.


1 Answers

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

like image 83
yole Avatar answered Sep 19 '22 06:09

yole