0

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)

Peter
  • 21
  • 5
  • Using breakpoints requires that the code has been compiled with debug information and that the source has been correctly attached. Please provide a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example). – howlger Jun 03 '22 at 09:37
  • I am sure it must be an eclipse / tomcat / maven issue. I have updated the question above. I hope it helps clarify. I cannot see how to add the demo.zip to the question. I get this issue on my machine you will in all probability not get the same issue on yours. – Peter Jun 03 '22 at 10:46
  • Prove it by a minimal reproducible example. If it is not reproducible, it can't be an Eclipse, Tomcat or Maven issue. You can use GitHub, etc. to share your minimal example project. – howlger Jun 03 '22 at 11:04
  • This is about as minimal as I can get. https://github.com/22ka/demo Thank you for taking the time to look at this. – Peter Jun 03 '22 at 11:26
  • You have the same problem in there? In which file and line number? – nitind Jun 03 '22 at 13:22
  • In DemoApplication.java on line (13) the line with with SpringApplication.run(DemoApplication.class, args); but that line is correct it just Eclipse or Tomcat or Maven that is not working – Peter Jun 03 '22 at 14:27
  • When running your application as a web application in Tomcat, I would guess (without being a web developer) the main method will never be called. – howlger Jun 04 '22 at 10:36

0 Answers0