1

I am desperately trying to build a little Vaadin project with login secured pages/views. I have found vaadin4spring and thought I could start based on the security sample. However, after importing the project and running it, I am receiving the message (without any changes at the project):

Failed to load the widgetset: ./VAADIN/widgetsets/org.vaadin.spring.samples.security.Widgetset/org.vaadin.spring.samples.security.Widgetset.nocache.js?1424243461387

I have also tried to compile the widgetset manually, which wasn’t possible at the beginning (missing WebContent folder). After converting the project to use WebFacets and adding Dynamic Web Module the compilation was possible. But the widgetset related error message was still the same.

Can anybody help me with this problem? I have the feeling that it is just a little thing I am missing.

1 Answers1

1

I think you have imported the sample somehow wrong, because you are talking about WebContent folder. I bet you are using eclipse (because of WTP related WebContent folder).

  1. Delete the old project from workspace and possible settings files eclipse created
  2. Choose File->Import->Maven->Existing Maven Project

You probably want to make one fresh install before you start to play with the project: from the top level "parent-pom" project, choose with right click: Run as -> Maven install. Get a cup of coffee, the build will take a while.

Enjoy!

To start e.g. the Security sample you seem to have tried, just execute the main method from org.vaadin.spring.samples.security.ApplicationInitializer. In eclipse, right click on the class and choose Run as Java Application and the app will launch with embedded Tomcat at http://localhost:8080/

mstahv
  • 1,784
  • 9
  • 7
  • Thank you so much! That solved the problem for me. I have first tried to just reimport the project and run Maven install, which failed as some artifacts could not be resolved (spring-boot-vaadin, spring-vaadin, spring-vaadin-security, spring-vaadin-mvp). I have therefore added 0.0.4.RELEASE as version to these dependencies. Now I am able to run Maven install, run the ApplicationInitializer and open the page in my web-browser. Hope the version chages won’t affect anything else? – Manuel Eisele Feb 18 '15 at 12:57
  • Additional remark: compiling the widgetset is still not possible as eclipse is not able to find the WebContent folder. I have imported the project just as you suggested. – Manuel Eisele Feb 18 '15 at 13:02
  • The project in the source control uses snapshots versions and depends on parent project. Thus you should do the mvn install on the parent level before opening/running the example. If you don't want to import all projects to your eclipse, you can can do that from CLI as well. Vaadin Eclipse plugin don't support Maven projects, which is a shame, but you can do the widgetset compilation with the maven build. It is hooked to happen during install target, but you can force it with "mvn vaadin:compile -Dgwt.compiler.force=true" as well. – mstahv Feb 18 '15 at 14:02