Button "Compile Vaadin widgets" not work

Hello,

Followed the steps of book-of-vaadin.pdf, I created a sample project and a widget, then clicked button “Compile Vaadin widgets”, the compilation output wasn’t written to folder WebContent/VAADIN/widgetsets.

The project can run except a message asking for VAADIN/widgetsets/com.example.mysample.MysampleWidgetset/com.example.mysample.MysampleWidgetset.nocache.js which is generated by widgets compilation.

The screenshot of the sample was attached, please let me know what I should check.

Thanks,
Watt
11464.png

Try to turn on verbose widgetset compilation (Project Properties → Vaadin → Verbose …) and then click the “Compile widgetset” button. Then check for any error messages as well as what is written on the console.

If you get no output on the console, or if the wrong widgetset is compiled, try to select the project of the widgetset in the Project Explorer view and then click on the button again.

If you still get nothing, open the Eclipse error log (Window → Show view → Other… → Error Log) and see if something gets output there.

If the problems persist, it would also be useful to know the Eclipse and plugin versions you are using and have some more details on what does happen when you click the button.

Please see the error log and associated working environment (My Vaadin version is 6.4.6):

!ENTRY com.vaadin.integration.eclipse 4 0 2010-10-20 19:17:12.476
!MESSAGE Cannot run program "C:\eclipse\bin\java.exe" (in directory "C:\workspace\mysample"): CreateProcess error=2 
!STACK 0
java.io.IOException: Cannot run program "C:\eclipse\bin\java.exe" (in directory "C:\workspace\mysample"): CreateProcess error=2 
	at java.lang.ProcessBuilder.start(Unknown Source)
	at com.vaadin.integration.eclipse.util.VaadinPluginUtil.compileWidgetset(VaadinPluginUtil.java:2273)
	at com.vaadin.integration.eclipse.builder.WidgetsetBuildManager.compileWidgetsetIfNotRunning(WidgetsetBuildManager.java:566)
	at com.vaadin.integration.eclipse.builder.WidgetsetBuildManager.compileWidgetsets(WidgetsetBuildManager.java:466)
	at com.vaadin.integration.eclipse.handlers.CompileWidgetsetHandler$1.run(CompileWidgetsetHandler.java:92)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.io.IOException: CreateProcess error=2 
	at java.lang.ProcessImpl.create(Native Method)
	at java.lang.ProcessImpl.<init>(Unknown Source)
	at java.lang.ProcessImpl.start(Unknown Source)
	... 6 more

!ENTRY com.vaadin.integration.eclipse 4 0 2010-10-20 19:23:17.811
!MESSAGE Cannot run program "C:\eclipse\bin\java.exe" (in directory "C:\workspace\mysample"): CreateProcess error=2 
!STACK 0
java.io.IOException: Cannot run program "C:\eclipse\bin\java.exe" (in directory "C:\workspace\mysample"): CreateProcess error=2 
	at java.lang.ProcessBuilder.start(Unknown Source)
	at com.vaadin.integration.eclipse.util.VaadinPluginUtil.compileWidgetset(VaadinPluginUtil.java:2273)
	at com.vaadin.integration.eclipse.builder.WidgetsetBuildManager.compileWidgetsetIfNotRunning(WidgetsetBuildManager.java:566)
	at com.vaadin.integration.eclipse.builder.WidgetsetBuildManager.compileWidgetsets(WidgetsetBuildManager.java:466)
	at com.vaadin.integration.eclipse.handlers.CompileWidgetsetHandler$1.run(CompileWidgetsetHandler.java:92)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.io.IOException: CreateProcess error=2 
	at java.lang.ProcessImpl.create(Native Method)
	at java.lang.ProcessImpl.<init>(Unknown Source)
	at java.lang.ProcessImpl.start(Unknown Source)
	... 6 more
!SESSION 2010-10-20 19:24:06.982 -----------------------------------------------
eclipse.buildId=I20100608-0911
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_GB
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

!ENTRY com.vaadin.integration.eclipse 4 0 2010-10-20 19:27:18.284
!MESSAGE Cannot run program "C:\eclipse\bin\java.exe" (in directory "C:\workspace\mysample"): CreateProcess error=2 
!STACK 0
java.io.IOException: Cannot run program "C:\eclipse\bin\java.exe" (in directory "C:\workspace\mysample"): CreateProcess error=2 
	at java.lang.ProcessBuilder.start(Unknown Source)
	at com.vaadin.integration.eclipse.util.VaadinPluginUtil.compileWidgetset(VaadinPluginUtil.java:2273)
	at com.vaadin.integration.eclipse.builder.WidgetsetBuildManager.compileWidgetsetIfNotRunning(WidgetsetBuildManager.java:566)
	at com.vaadin.integration.eclipse.builder.WidgetsetBuildManager.compileWidgetsets(WidgetsetBuildManager.java:466)
	at com.vaadin.integration.eclipse.handlers.CompileWidgetsetHandler$1.run(CompileWidgetsetHandler.java:92)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.io.IOException: CreateProcess error=2 
	at java.lang.ProcessImpl.create(Native Method)
	at java.lang.ProcessImpl.<init>(Unknown Source)
	at java.lang.ProcessImpl.start(Unknown Source)
	... 6 more

The Vaadin plugin first asks Eclipse for the location of the JVM you have selected for the project. If none is found, it then proceeds to ask for the default JVM in your installation. Apparently, there is no standard JVM in either location, or finding the JRE fails in some other way.

Do you have something configured under Window → Preferences → Java → Installed JREs? One of the JREs selected as default? You should have one installed somewhere as you are able to run Eclipse.

If you did have JREs configured, you could create a
bug report
with as much information on the Eclipse, JRE and project setup as possible, as well as the stack trace above. In any case, the error reporting could be improved.

Please see the attached screenshot that “Stardard VM” is found by Eclipse. and please create a bug report for me because I have have no right to do that.
11469.png

Eclipse does contain its own Java compiler and runtime modules, but it is not executable from the command line using the standard “bin/java” command. Also Eclipse itself is normally run with a separate JRE/JDK (specified in eclipse.ini), and several Eclipse plugins (e.g. m2eclipse for Maven support) require the executing JRE to be a JDK.

Try creating an entry in the JRE list for a JRE/JDK other than the Eclipse embedded one, installing a JDK if necessary. The widgetset compilation wizard only supports separate standard JVMs, not the Eclipse embedded one. This is not a bug but a known limitation, but perhaps there could be an enhancement request for improving the reporting of the problem or eventually extending the support.

As for creating tickets, it simply requires registration on dev.vaadin.com .