Cannot build or Deploy war file

Cannot Build War

After extending SpringBootServletInitializer, and executing: ./gradlew -Pvaadin.productionMode=true bootWar, I get the message below, only after i comment out @PWA does it build

I get Execution failed for task ‘:vaadinBuildFrontend’.
←[33m> ←[39mcom.vaadin.flow.server.ExecutionFailedException: Error occured during goal execution: There can only be one @PWA annotation and it must be set on the AppShellConfigurator implementor.

Cannot Deploy war

After commenting out @PWA it builds but then gets exception on the @Push and @Theme annotation, and the application does not start.

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘vaadinApplicationContextInitializer’ defined in class path resource [com/vaadin/flow/spring/VaadinApplicationConfiguration.class]: Found configuration annotations that will not be used in the application.
Move it to a single route/a top router layout/web component of the application.
Class ‘com.assurant.ccd.omnichannelui.OmniChannelUIApplication’ contains ‘@Push’, but it is not a router layout/top level route/web component.

Using jmix 2.2.0-233
Javier

Hi,

Could you please provide a sample of your project to have more info on it?

Regards,
Alex

It is too big to upload to this site, do you have another site I could upload the war to?

Hi,

You can use this
Use Jmix → Gradle → Zip Project (Jmix Tool Window :: Jmix Documentation).

Regards,
Alex

Ok, I have resolved this, i think the documentation should be updated.

You need to extend SpringBootServletInitializer AND implement AppShellConfigurator.

Javier

1 Like

Hi Javier,
Thanks for noticing, we’ve updated the docs!