Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Vaadin : Integration with Spring framework fails.
Hello friends,
I am working on a Maven based Spring-MVC application with which I would like to integrate Vaadin for some features Vaadin has. Currently it is not going so well. I have the entire Spring-config in XML. When I call the method, I get the following error :
HTTP Status 404 - Request was not handled by any registered handler.
Along with that, I see these errors in Console :
=================================================================
Nov 16, 2015 2:50:52 PM com.vaadin.server.VaadinServlet serveStaticResourcesInVAADIN
INFO: Requested resource [/VAADIN/themes/reindeer/styles.css] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.
Nov 16, 2015 2:50:52 PM com.vaadin.server.VaadinServlet serveStaticResourcesInVAADIN
INFO: Requested resource [/VAADIN/widgetsets/com.vaadin.DefaultWidgetSet/com.vaadin.DefaultWidgetSet.nocache.js] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.
Nov 16, 2015 2:50:52 PM com.vaadin.server.VaadinServlet serveStaticResourcesInVAADIN
INFO: Requested resource [/VAADIN/themes/reindeer/favicon.ico] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.
Nov 16, 2015 2:50:52 PM com.vaadin.server.VaadinServlet serveStaticResourcesInVAADIN
INFO: Requested resource [/VAADIN/themes/reindeer/favicon.ico] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.
Nov 16, 2015 2:50:55 PM com.vaadin.server.DefaultDeploymentConfiguration checkProductionMode
WARNING:
From which dependency can I get the resources file in classpath and how to get rid of the above 404.
The Vaadin UI code :
@Theme("valo")
@SpringUI
@SuppressWarnings("serial")
public class MyVaadinUI extends UI {
@WebServlet(value = "/testvaadin", asyncSupported = true)
public static class Servlet extends SpringVaadinServlet {
}
@Override
protected void init(VaadinRequest request) {
final VerticalLayout layout = new VerticalLayout();
layout.setMargin(true);
setContent(layout);
Button button = new Button("Click Me");
button.addClickListener(event -> layout.addComponent(new Label("Thank you for clicking")));
layout.addComponent(button);
}
}
web.xml :
<servlet>
<servlet-name>Vaadin Application</servlet-name>
<servlet-class>com.vaadin.server.VaadinServlet</servlet-class>
<init-param>
<description>
Vaadin UI class to use</description>
<param-name>UI</param-name>
<param-value>com.journaldev.spring.Vaadin.MyVaadinUI</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>Vaadin Application</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
POM.xml :
<!-- Vaadin dependency-->
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-spring</artifactId>
<version>1.0.0</version>
</dependency>
Spring's root-context.xml :
<beans:bean class="com.journaldev.spring.Vaadin.MyVaadinUI"/>
<context:component-scan base-package="com.journaldev.spring">
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
</context:component-scan>
So, what am I doing wrong here that I am unable to see the UI as well. Also, I would like to load these gannt-charts https://github.com/tltv/gantt . Any pointers on how I can go ahead with it. Thanks a lot... :-)
Hi,
Those are theme resources, in "com.vaadin:vaadin-themes" package. To use gantt add-on, you'll also need an application "widgetset" and get that compiled (easiest with vaadin-maven-plugin). Refer to e.g. raw project stub created by vaadin-archetype-application to see how it is done.
cheers,
matti