Error when trying to use style variants

Hello. This is my first message here and I’m pretty new to front end developing and Vaadin, so maybe this question is pretty basic, but I haven’t found any solution so far.

I’m using v.23 and every time I try to use anything but the default Lumo style I get an error when I try to run the app. I’m providing an image with an example, the only change I did for having this error was adding the line with the @Theme.

I’d appreciate any help or advice. Thank you very much!

Error traces: Exception sending context initialized event to listener instance of class [com.vaadin.flow.spring.VaadinServletContextInitializer$CompositeServletContextListener]

java.lang.RuntimeException: Unable to initialize com.vaadin.flow.spring.VaadinServletContextInitializer$VaadinAppShellContextListener
image.png

I’ve already done this from this Vaadin support article, but it didn’t work: https://vaadin.com/forum/thread/18288659/exception-sending-context-initialized-event-to-listener-instance-of-class

Checkout the end of the stacktrace

There should be mentioned that you have to put the @Theme annotation on a class implementing AppShellConfigurer

That solved the problem! Thank you very much and sorry for my noob questions!

No worries :blush: