vleafletexample / v-leaflet add-on - "failed to load widgetset"

I am using vaading 7.4.3
I need some basic map display in my vaading touch application
I have downloaded the vleafletexample from github into eclipse
I have downloaded the leaflet add-on and added the v-leaflet-0.6.2.jar to the vleafletexample build path

running the vleafletexample I get “failed to load widgetset” error

INFO: Requested resource
[/VAADIN/widgetsets/org.peimari.vleafletexample.AppWidgetSet/org.peimari.vleafletexample.AppWidgetSet.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.

what widget set do I need to add to this example app? what am I missing?

thanks for any help

I been looking at this a bit more

I found the widget set…
AppWidgetSet.gwt.xml - vleafletexample/src/main/java/org/peimari/vleafletexample\AppWidgetSet.gwt.xml

when i try to compile the above widget set I get Widgetset compilation failed

Error: Could not find or load main class com.vaadin.tools.WidgetsetCompiler

the full consolu log is bellow

any help would be greatly appreciated

Executing compiler with command line:
C:\Program Files\Java\jre1.8.0_31\bin\java.exe -Djava.awt.headless=true -Xss8M -Xmx512M -XX:MaxPermSize=512M -classpath C:\Program Files\Java\jre1.8.0_31\lib\resources.jar;C:\Program Files\Java\jre1.8.0_31\lib\rt.jar;C:\Program Files\Java\jre1.8.0_31\lib\jsse.jar;C:\Program Files\Java\jre1.8.0_31\lib\jce.jar;C:\Program Files\Java\jre1.8.0_31\lib\charsets.jar;C:\Program Files\Java\jre1.8.0_31\lib\jfr.jar;C:\Program Files\Java\jre1.8.0_31\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jre1.8.0_31\lib\ext\cldrdata.jar;C:\Program Files\Java\jre1.8.0_31\lib\ext\dnsns.jar;C:\Program Files\Java\jre1.8.0_31\lib\ext\jaccess.jar;C:\Program Files\Java\jre1.8.0_31\lib\ext\jfxrt.jar;C:\Program Files\Java\jre1.8.0_31\lib\ext\localedata.jar;C:\Program Files\Java\jre1.8.0_31\lib\ext\nashorn.jar;C:\Program Files\Java\jre1.8.0_31\lib\ext\sunec.jar;C:\Program Files\Java\jre1.8.0_31\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jre1.8.0_31\lib\ext\sunmscapi.jar;C:\Program Files\Java\jre1.8.0_31\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jre1.8.0_31\lib\ext\zipfs.jar;C:/work/vleafletexample/src/main/java;C:/work/vleafletexample/src/main/resources;C:/work/vleafletexample/src/test/java;C:/work/vleafletexample/target/classes;C:/work/vleafletexample/target/test-classes;C:/Program Files/Java/jre1.8.0_31/lib/resources.jar;C:/Program Files/Java/jre1.8.0_31/lib/rt.jar;C:/Program Files/Java/jre1.8.0_31/lib/jsse.jar;C:/Program Files/Java/jre1.8.0_31/lib/jce.jar;C:/Program Files/Java/jre1.8.0_31/lib/charsets.jar;C:/Program Files/Java/jre1.8.0_31/lib/jfr.jar;C:/Program Files/Java/jre1.8.0_31/lib/ext/access-bridge-64.jar;C:/Program Files/Java/jre1.8.0_31/lib/ext/cldrdata.jar;C:/Program Files/Java/jre1.8.0_31/lib/ext/dnsns.jar;C:/Program Files/Java/jre1.8.0_31/lib/ext/jaccess.jar;C:/Program Files/Java/jre1.8.0_31/lib/ext/jfxrt.jar;C:/Program Files/Java/jre1.8.0_31/lib/ext/localedata.jar;C:/Program Files/Java/jre1.8.0_31/lib/ext/nashorn.jar;C:/Program Files/Java/jre1.8.0_31/lib/ext/sunec.jar;C:/Program Files/Java/jre1.8.0_31/lib/ext/sunjce_provider.jar;C:/Program Files/Java/jre1.8.0_31/lib/ext/sunmscapi.jar;C:/Program Files/Java/jre1.8.0_31/lib/ext/sunpkcs11.jar;C:/Program Files/Java/jre1.8.0_31/lib/ext/zipfs.jar;C:/Users/Aron/.m2/repository/com/vaadin/vaadin-server/7.4.3/vaadin-server-7.4.3.jar;C:/Users/Aron/.m2/repository/com/vaadin/vaadin-sass-compiler/0.9.12/vaadin-sass-compiler-0.9.12.jar;C:/Users/Aron/.m2/repository/com/vaadin/external/flute/flute/1.3.0.gg2/flute-1.3.0.gg2.jar;C:/Users/Aron/.m2/repository/com/vaadin/vaadin-shared/7.4.3/vaadin-shared-7.4.3.jar;C:/Users/Aron/.m2/repository/com/vaadin/external/streamhtmlparser/streamhtmlparser-jsilver/0.0.10.vaadin1/streamhtmlparser-jsilver-0.0.10.vaadin1.jar;C:/Users/Aron/.m2/repository/com/vaadin/external/google/guava/16.0.1.vaadin1/guava-16.0.1.vaadin1.jar;C:/Users/Aron/.m2/repository/org/jsoup/jsoup/1.8.1/jsoup-1.8.1.jar;C:/Users/Aron/.m2/repository/com/vaadin/vaadin-client-compiled/7.4.3/vaadin-client-compiled-7.4.3.jar;C:/Users/Aron/.m2/repository/org/vaadin/addon/v-leaflet/0.5.1/v-leaflet-0.5.1.jar;C:/Users/Aron/.m2/repository/org/peimari/g-leaflet-draw/0.4.2/g-leaflet-draw-0.4.2.jar;C:/Users/Aron/.m2/repository/org/peimari/g-leaflet/0.4.2/g-leaflet-0.4.2.jar;C:/Users/Aron/.m2/repository/org/slf4j/slf4j-simple/1.7.2/slf4j-simple-1.7.2.jar;C:/Users/Aron/.m2/repository/com/vividsolutions/jts/1.13/jts-1.13.jar;C:/Users/Aron/.m2/repository/org/hibernate/hibernate-spatial/4.0-M1/hibernate-spatial-4.0-M1.jar;C:/Users/Aron/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar;C:/Users/Aron/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar;C:/Users/Aron/.m2/repository/org/jboss/logging/jboss-logging/3.1.0.CR2/jboss-logging-3.1.0.CR2.jar;C:/Users/Aron/.m2/repository/org/hibernate/hibernate-core/4.1.7.Final/hibernate-core-4.1.7.Final.jar;C:/Users/Aron/.m2/repository/antlr/antlr/2.7.7/antlr-2.7.7.jar;C:/Users/Aron/.m2/repository/org/jboss/spec/javax/transaction/jboss-transaction-api_1.1_spec/1.0.0.Final/jboss-transaction-api_1.1_spec-1.0.0.Final.jar;C:/Users/Aron/.m2/repository/org/hibernate/javax/persistence/hibernate-jpa-2.0-api/1.0.1.Final/hibernate-jpa-2.0-api-1.0.1.Final.jar;C:/Users/Aron/.m2/repository/org/javassist/javassist/3.15.0-GA/javassist-3.15.0-GA.jar;C:/Users/Aron/.m2/repository/org/hibernate/common/hibernate-commons-annotations/4.0.1.Final/hibernate-commons-annotations-4.0.1.Final.jar;C:/Users/Aron/.m2/repository/org/hibernate/hibernate-entitymanager/4.1.7.Final/hibernate-entitymanager-4.1.7.Final.jar;C:/Users/Aron/.m2/repository/javax/validation/validation-api/1.0.0.GA/validation-api-1.0.0.GA.jar;C:/Users/Aron/.m2/repository/org/hibernate/hibernate-validator/4.0.2.GA/hibernate-validator-4.0.2.GA.jar;C:/Users/Aron/.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar;C:/Users/Aron/.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar;C:/Users/Aron/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar;C:/Users/Aron/.m2/repository/com/sun/xml/bind/jaxb-impl/2.1.3/jaxb-impl-2.1.3.jar;C:/Users/Aron/.m2/repository/postgresql/postgresql/8.4-701.jdbc3/postgresql-8.4-701.jdbc3.jar;C:/Users/Aron/.m2/repository/com/h2database/h2/1.3.174/h2-1.3.174.jar;C:/Users/Aron/.m2/repository/com/vaadin/vaadin-client/7.4.3/vaadin-client-7.4.3.jar;C:/Users/Aron/.m2/repository/org/w3c/css/sac/1.3/sac-1.3.jar;C:/Users/Aron/.m2/repository/javax/validation/validation-api/1.0.0.GA/validation-api-1.0.0.GA-sources.jar;C:/Users/Aron/.m2/repository/com/vaadin/vaadin-push/7.4.3/vaadin-push-7.4.3.jar;C:/Users/Aron/.m2/repository/com/vaadin/external/atmosphere/atmosphere-runtime/2.2.4.vaadin5/atmosphere-runtime-2.2.4.vaadin5.jar;C:/Users/Aron/.m2/repository/com/vaadin/external/slf4j/vaadin-slf4j-jdk14/1.6.1/vaadin-slf4j-jdk14-1.6.1.jar;C:/Users/Aron/.m2/repository/com/vaadin/vaadin-themes/7.4.3/vaadin-themes-7.4.3.jar;C:/Users/Aron/.m2/repository/javax/servlet/javax.servlet-api/3.0.1/javax.servlet-api-3.0.1.jar;C:/Users/Aron/.m2/repository/org/slf4j/slf4j-api/1.7.5/slf4j-api-1.7.5.jar;C:/Users/Aron/.m2/repository/org/slf4j/slf4j-log4j12/1.7.5/slf4j-log4j12-1.7.5.jar;C:/Users/Aron/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar;/toucht1/WebContent/WEB-INF/lib/g-leaflet-0.4.10.jar;/toucht1/WebContent/WEB-INF/lib/validation-api-1.0.0.GA.jar;/toucht1/WebContent/WEB-INF/lib/validation-api-1.0.0.GA-sources.jar;/toucht1/WebContent/WEB-INF/lib/slf4j-api-1.6.2.jar;/toucht1/WebContent/WEB-INF/lib/slf4j-simple-1.7.2.jar;/toucht1/WebContent/WEB-INF/lib/jts-1.13.jar;/toucht1/WebContent/WEB-INF/lib/jackson-databind-2.3.2.jar;/toucht1/WebContent/WEB-INF/lib/jackson-annotations-2.3.0.jar;/toucht1/WebContent/WEB-INF/lib/jackson-core-2.3.2.jar;C:/work/toucht1/WebContent/WEB-INF/lib/v-leaflet-0.6.2.jar -Dgwt.persistentunitcachedir=C:\Users\Aron\AppData\Local\Temp\widgetset_org.peimari.vleafletexample.AppWidgetSet6f6225fc-a63e-4c06-8f0c-d1350ab2788e com.vaadin.tools.WidgetsetCompiler -war src/main/webapp/VAADIN/widgetsets -deploy C:\Users\Aron\AppData\Local\Temp\widgetset_org.peimari.vleafletexample.AppWidgetSet6f6225fc-a63e-4c06-8f0c-d1350ab2788e -extra C:\Users\Aron\AppData\Local\Temp\widgetset_org.peimari.vleafletexample.AppWidgetSet6f6225fc-a63e-4c06-8f0c-d1350ab2788e -localWorkers 8 -logLevel INFO org.peimari.vleafletexample.AppWidgetSet
Error: Could not find or load main class com.vaadin.tools.WidgetsetCompiler
Java HotSpot™ 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
Widgetset compilation failed

Hi,

It should work this way (if you have maven and git installed and in you path), after the following command you should be able to access the example at http://localhost:8080

git clone https://github.com/mstahv/vleafletexample.git cd vleafletexample mvn clean install mvn jetty:run If you are using leaftlet in another project than the vleaflet example, you have to copy paste required dependecies to your project’s pom.xml (or ivy.xml if you are using ivy for dependency management).

If you get stuck, please ask more details and tell more about your project setup (maven, ivy or someting other)?

I recently noticed a problem that can cause unexpected compilation failure with Maven: old Maven. Maven 3.0.x doesn’t work with some current Maven repositories any longer, and the .jar files just contain an HTTP XML error response. And the error isn’t quite obvious; you just get a “could not load class” error during widget set compilation.