Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Retrofitting an existing Eclipse project (GWT compile error)
I appear to have added the proper facets successfully to an existing project in Eclipse (actually MyEclipse 8.0) - the Vaadin plugin wizards work to create a new project and new template widgets in the existing project.
However, when I try to compile a new GWT based widget, the toolbar button appears to do nothing, and when I force it using the "Apply" button from the Vaadin project properties page "Apply" button I get this ClassCastException:
java.lang.ClassCastException: org.eclipse.core.internal.resources.Project cannot be cast to org.eclipse.core.resources.IFolder at com.vaadin.integration.eclipse.util.VaadinPluginUtil.getWebContentFolder(VaadinPluginUtil.java:259) at com.vaadin.integration.eclipse.util.VaadinPluginUtil.compileWidgetset(VaadinPluginUtil.java:2168) 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.builder.WidgetsetBuildManager.internalCompile(WidgetsetBuildManager.java:384) at com.vaadin.integration.eclipse.builder.WidgetsetBuildManager.access$1(WidgetsetBuildManager.java:380) at com.vaadin.integration.eclipse.builder.WidgetsetBuildManager$CompileWidgetsetJob.run(WidgetsetBuildManager.java:262) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Eclipse Session Data, in case it helps:
eclipse.buildId=unknown java.version=1.6.0_13 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Command-line arguments: -os win32 -ws win32 -arch x86
I assume I've missed something in my configuration. Anyone have any ideas what I've missed? Yes, I did have to hack the .properties and .settings/* files by hand to get this far, so I could have a problem/missing item there, but I did it by comparing the values generated for a new Vaadin project with my existing project's files.
Another wrinkle, our existing project has web content in /WebRoot, while it looks like the Vaadin Eclipse plugin is using /WebContent by default. I changed .settings/org.eclipse.wst.common.component to reference WebRoot instead.
I don't see anything in my web searches for this ClassCastException, so I'm hoping someone here can help me out.
Old thread but I ran into the same issue today. Don't know how I managed to do it but I think I had some plugins missing when I created a Dynamic Web Project. The cause was a missing configuration row in <project>/.settings/org.eclipse.wst.common.component:
<wb-resource deploy-path="/" source-path="/WebContent"/>
When this row is absent the described ClassCastException occur. To fix: simply add the row.