This looks very cool indeed. I tried it with a simple Spring starter project and it launched just fine. However, when I tried with a the main app project, I ran into this odd issue:
com.vaadin.flow.server.InvalidApplicationConfigurationException: Found configuration annotations that will not be used in the application.
Move the following annotations to a single route or the top RouterLayout of the application:
Non RouterLayout: bc.ui.MainAppLayout contains: Push, Viewport
at com.vaadin.flow.server.startup.AbstractAnnotationValidator.validateClasses(AbstractAnnotationValidator.java:65) ~[classes/:na]
at com.vaadin.flow.spring.VaadinServletContextInitializer$AnnotationValidatorServletContextListener.contextInitialized(VaadinServletContextInitializer.java:147) ~[vaadin-spring-10.1.1.jar:na]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4641) [tomcat-embed-core-9.0.12.jar:9.0.12]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5109) [tomcat-embed-core-9.0.12.jar:9.0.12]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [tomcat-embed-core-9.0.12.jar:9.0.12]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429) [tomcat-embed-core-9.0.12.jar:9.0.12]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419) [tomcat-embed-core-9.0.12.jar:9.0.12]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_171]
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) [tomcat-embed-core-9.0.12.jar:9.0.12]
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) [na:1.8.0_171]
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944) [tomcat-embed-core-9.0.12.jar:9.0.12]
I tried to add “implements RouterLayout” to the AppLayoutView, but this resulted in another issue:
Caused by: java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
bc/ui/MainAppLayout.createAppLayoutInstance()Lcom/github/appreciated/app/layout/behaviour/AppLayout; @87: invokevirtual
Reason:
Type 'com/github/appreciated/app/layout/component/appmenu/MenuHeaderComponent' (current frame, stack[2]
) is not assignable to 'com/vaadin/flow/component/Component'
Current Frame:
bci: @87
flags: { }
locals: { 'bc/ui/MainAppLayout', 'com/github/appreciated/app/layout/component/appmenu/left/LeftNavigationComponent' }
stack: { 'com/github/appreciated/app/layout/builder/AppLayoutBuilder', 'com/github/appreciated/app/layout/component/appmenu/left/builder/LeftAppMenuBuilder', 'com/github/appreciated/app/layout/component/appmenu/MenuHeaderComponent', 'com/github/appreciated/app/layout/entity/Section' }
Project is on 12.0.4. The simple Spring starter was on 12.0.4 too, but didn’t have any problems.
It’s almost as if Java considers App-Layout to be using different Flow version/classes than the project. According to the Maven dependency tree, they are both using 12.0.4, so not sure what’s going on.
Anyone else seen anything like this?