This looks very cool indeed. I tried it with a simple Spring starter projec

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?

I wonder why you are try implementing RouterLayout since AppLayoutRouterLayout already implements it (are you trying to wrap a RouterLayout inside a RouterLayout, which I guess is fine but why?). Please open an issue on Github with an url to example project to let me reproduce the issue I’ll gladly help you out.

Very good question. I didn’t want to, but Flow complained that it wasn’t a valid RouterLayout, despite AppLayoutRouterLayout already implemented it. I added implements RouterLayout at my own class to see if it would make a difference (it didn’t).

I happened to solve the issue a few minutes ago. I had a spring-devtools.properties under META-INF. Removing that file caused the problem to go away. My guess is that the issue was caused by some of the files to be loaded by a different spring class loader, but I don’t know for sure.