Although I have tagged this with java it is not explicitly a java issue. I am upgrading a Vaadin application from Vaadin 8 to Vaadin 23. my set up is OS windows 10 Eclipse Version: 2022-03 (4.23.0) Build id: 20220310-1457 apache tomcat 9.0.60 apache maven 3.8.5 Java adopt open jdk-11.0.10.9
I am unable to run any application as a Tomcat server or a Maven build and debug it in eclipse. I am able to debug when it is a pure java application. I was initially able to build and debug the Vaadin 8 application with a Tomcat server or a Maven build.
However after I started the upgrade to Vaadin 23 Eclipse "broke" and I cannot fix it. I keep getting “unable to install breakpoint in “ when debugging with Tomcat server or Maven. And even if I just continue Eclipse ignores the break points.(NB I dont get this when I run it as a java application)
I have tried to make a new Spring Vaadin application at https://spring.io/quickstart and I am getting the same issue. So new work space and project does not fix the issue. I have also deleted and rebuild the .m2 and .eclipse folders.
I have unset and applied and reset and applied Window => Preferences => Java =>Compiler (class file generation)
- Add variable attributes...
- Add line number attributes...
- Add source file name...
I have unset and applied and reset and applied Window => Preferences => Maven
- Debug Output
I have checked that the Window => Preferences => Maven => installations
- points to my maven 3.8.5 installation
Window => Run/Debug
- Launch in debug mode when workspace contains break points (.) ALWAYS
Window => Server => Runtime Environment
- points to the apache tomcat 9.0.60 installation
The following environment vars are also set and point to the relevant installation
- JAVA_HOME
- M2_HOME
- MAVEN_HOME
I have checked and gone through:
Eclipse - Unable to install breakpoint due to missing line number attributes
Eclipse Unable to install breakpoint
I don't want to un-install an re- install every thing. What have I missed?
Edit
Steps to reproduce go to https://start.spring.io/ select
- Mavan project
- Language Java
- Spring boot 2.6.8
- Packaging War
- Java 11
In dependencies add
- Vaadin
- Spring boot Dev tools
- Liquibase Migration
Select generate and download
- Demo.zip
Import into eclipse
In eclipse Select Windows => View
Create new server
Point to Tomcat 9 installation
VM arguments are.
-Dcatalina.base="C:\work\programming\spring.metadata.plugins\org.eclipse.wst.server.core\tmp0" -Dcatalina.home="C:\work\projects\common_libraries\apache-tomcat-9.0.60" -Dwtp.deploy="C:\work\programming\spring.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps" --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
Create debug line break point in DemoApplication.java on line with SpringApplication.run(DemoApplication.class, args);
Start server : Get error message “unable to install breakpoint in...“
(NB If I debug this as a java application it stops at the breakpoint)