javaeclipsespring-bootspring-tool-suite

How to fix Eclipse IDE Run Configuration (Problem occurred dialog)


I use Eclipse IDE(Spring Tool Suite) for many years, and periodically I have the same problem with the Launching project

The problem happens with the existing "Run Configuration" after time, maybe after the IDE update, but I unable to reproduce why this happens. To quick fix, I just remove "Run Configuration" with error, and just "mouse right-click on Application.java -> Run As -> Spring Boot App" and all work, but I need again add environment variables to this new configuration ... etc

I bored to have this problem for many years repeatedly from time to time. I think other Eclipse or Spring STS users have the same problem/experience.

Does anyone know how to fix this error? Except Delete and Create again "Run Configuration"...

enter image description here

Problem Occurred

An internal error occurred during: "Launching Operational".
Cannot invoke "org.eclipse.jdt.core.IJavaProject.getProject()" because "project" is null

enter image description here

An error has occurred. See error log for more details.
Cannot invoke "org.eclipse.jdt.core.IJavaProject.getProject()" because "project" is null

Solution

    1. Close Eclipse IDE
    2. Go to your workspace directory e.g: workspace/.metadata/.plugins/org.eclipse.debug.core/.launches (for linux I use command "locate .launch" to quick find)
    3. Find your broken Launching configuration in this directory, and open it with a text editor
    4. Check these two lines is exist, if not exist, you must add these two lines with your 'value="web"' module name. If you don't know the module name, just create a new "Run Configuration" and find differences with the previous "Run Configuration" in the .launch file
    <stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="web"/>
    <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="web"/>
    

    After all, Run Eclipse IDE