Deploying Webapp in Eclipse+Maven+Tomcat

Hi,

I am trying to take the demo dashboard app, tweak it, and get it running on my machine. I’ve hooked it up with Spring and I can get it running within Tomcat standalone. But in order to speed up my development process, I was trying to get it running in a Tomcat Server within Eclipse. I’ve run into issues I can’t find a solution to.

Basically, it deploys fine, but when I start the app from the browser, I get:

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.

If I add


<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-client-compiled</artifactId>
    <version>${vaadin.version}</version>
</dependency>

… it does resolve that error - but then I cannot see any of the custom widgets in the Dashboard app.

Sure enough, /VAADIN/widgetsets/com.vaadin.DefaultWidgetSet is not in my webapps directory, but the dashboard widgetset is. I’m not sure where it lives by default.

I’ve configured the Eclipse Tomcat Server to include the ‘web app libraries’ in the classpath (thinking the widgets were ultimately in there) but that did not help.

Can someone point me in the right direction here? Ive searched for forums and can’t find the same issue being addressed.

Or is there another efficient way to code/test?

Thanks

I dediced to take things back to first principles and eliminate any of my code changes from this problem.

I followed these steps:

  1. Download the dashboard code from github and extract into its own directory
  2. Create a new Vaadin 7 project in ecliprse for the dashboard.
  3. Using the M2E maven plugin, convert the plugin to a maven managed project in eclipse.
  4. Add maven dependencies to the classpath for the Tomcat server (otherwise it cannot find the vaadin core classes)
  5. Run in server.

I get the same error as above.

Again, if I run in a standalone tomcat (i.e. not through eclipse) it works.

Can the Vaadin team who manages the Dashboard tell me how they run and test it?

Looks like you have to run a widgetset compile.

Thanks for responding.

I thought I was doing that with an ‘mvn clean package’ command.

I can see the dashboard widgetset being created


[INFO]
    Compiling 1 permutation
[INFO]
       Compiling permutation 0...
[INFO]
    Compile of permutations succeeded

and I can see its output in /VAADIN/widgetset

But I don’t know where the /VAADIN/widgetsets/com.vaadin.DefaultWidgetSet is supposed to come from.

Did i run the wrong command?

bah!!!

I just found my error. I commented out the widgetset in the web.xml when I was trying to get the integration with Spring working. Stupid mistake.

So many moving parts…