Cannot build for production Vaadin 24

pardon, here we go

https://hastebin.skyra.pw/imazoxeqeq.bash

So, the issue is that you may have a plugin that uses class from flow polymer templates module, that is a commercial start from Vaadin 24 and not provided out-of-the box

Caused by: java.lang.ClassNotFoundException: com.vaadin.flow.component.polymertemplate.PolymerTemplate

PolymerTemplate class may be used by an add-on, that has not been upgraded to Vaadin 24

or you may be using an old version of the add-on

Sounds like the perfect example to improve the flow code to not hide the exception above / make some educated guess and show the user what’s wrong

Executing the following command may help detecting who is referencing the flow-polymer-template artifact
mvn dependency:tree -Dverbose -Dincludes=com.vaadin:flow-polymer-template

/cc @sanguine-whale

Running with -X is really hard with bigger projects… I had to do it once for one of my bigger projects, it took literally 50min in our CI and created 500mb logs :grimacing: (so I would hope flow shows those info without resorting to such low level debugging)

i have deleted the dependency for the class
com.github.appreciated.card.ClickableCard
i ll use another class for that purpose.

now i can compile

thanks :slightly_smiling_face:

FYI, the error message refers to the vaadin.frontend.hotdeploy system property, not setting in application.properties.
The message should be updated to be clearer

I had a deeper look and probably I was wrong with the above statement. I’ll check it again

I tried this Maven call, the verbose has nothing meaningfull,
I also trying the migration call from the Vaadin website,

trying to move from 23 to 24.

attached is my POM
Thank you
message.txt (7.82 KB)

There are a lot of plugins. Make sure that you are using the latest version of them all.

Hello everyone. I made a simple test project starting from Vaadin project start choosing Maven + Spring Boot, added some stuffs and running from Eclipse it works like a charm opening the browser and running the Java code. If I build from Eclipse Maven build , it generates the myexample.jar in target folder successful; but if I try to run from command line: java -jar myexample.jar --trace then it always reports error related to frontendHotDeploy which it is present in my pom.xml as someone in this thread said to add. Here the pastebin of the error and of my pom.xml: https://pastebin.com/W5Drbfkp …maybe I missed something or maybe there is some part that I should remove? Thanks in advance! Cheers!

You forgot to activate the production profile to build the application so that the created jar contains anything it needs to run without development tools.

Hello @knoobie , thanks for your answer, I thought I settled right for activation the production profile in my pom.xml file as you can see here my pastebin Pom XML Production mode (I just tried to add <vaadin.productionMode>true</vaadin.productionMode> too ) and when I compile, as like as the documentation says here Production build at least that so production profile should be activated as you said, I use mvn clean package -Pproduction -Dvaadin.force.production.build=true , but when I try to run it keeps returning same error as I reported in my previous comment about no DevModeHandlerManager implementation found but but dev server enabled. Either disable by setting vaadin.frontend.hotdeploy=false (and run the build-frontend maven goal) or include the vaadin-dev-server dependency , maybe could be not really related to production mode stuff?.. Thanks in advance to all! Cheers

Hello again @knoobie , investigating some more it looks adding:

<plugin> <groupId>com.vaadin</groupId> <artifactId>vaadin-maven-plugin</artifactId> <version>${vaadin.version}</version> <executions> <execution> <goals> <goal>prepare-frontend</goal> </goals> </execution> </executions> </plugin>

in build section did the trick, so it wasn’t really related to production activation or frontendHotdeploy stuff… now seems to work even if I have to open manually the browser and put localhost:8080 … thanks anyway! Cheers

1 Like