-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vaadin 23.2.17 - Build for production fails #16577
Comments
Is there any chance that you compiled classes with a different JDK (e.g. 17) before running maven? Maybe the IDE compiled classes during development with Java 17? Or some dependency compiled with Java 17? Does it fail even if you run a |
Hello Marco, no I didn't use JDK17 neither the IDE compile with Java 17 nor have any dependency compiled with that java verion. |
May I ask you to put a breakpoint in the
Line 99 should contain the following code
When the breakpoint is reached, try to evaluate the expression In addition, if you put another breakpoint at the end of the method (on the |
In the log I can see at lest a dependency to
I don't know if this one is the cause, but you should change version, as you are on Vaadin 23.2 Based on the add-on page on directory, I suppose you should use version 4.0.0, as 5.0.0 is for Vaadin 23.3+ and 6.0.0 for Vaadin 24. |
Thanks Marco, actually the addon was not used in the project, maybe added from someone else in the team to the pom.xml |
As this seems to be an issue that pops up every now and then, is there anything we can do to improve the situation? For instance an error message that would hint at a Java version problem, or a missing |
For this particular issue, a quick and dirty way to have additional information about the class compiled with an unsupported JDK may be to overwrite the We can surround the super execution in a try/catch, log the offending class and propagate the exception. |
Ran into this issue also this morning. Code compiled just fine. Only the vaadin-maven-plugin failed.
Eventually settled on adding a With this we're able to use Java (21) preview features in Vaadin page classes. |
Description of the bug
Hello,
my application runs fine in development mode, but when I try to run it in production mode (-Pproduction) build-frontend task fails.
Please look at the log attached.
vaadin_compile.log
Expected behavior
Build for production should not fail
Minimal reproducible example
mvn -Pproduction spring-boot:run
Versions
The text was updated successfully, but these errors were encountered: