Vaadin 7 RC1 - Unable to compile my Widgetset

Hi all,

I started few month ago a new project with vaadin 7.0.0 beta 10. Everything worked fine (widgetset compilation, …). Yesterday I decided to updgrade to RC1 but I’m no more able to compile my Widgetset. I tried

mvn vaadin:clean vaadin:update-widgetset
=> works
and then

mvn vaadin:clean vaadin:compile
=> Failed: see the stacktrace

[font=Courier New]
[INFO]
— vaadin-maven-plugin:7.0.0.rc1:compile (default-cli) @ ideodirectory-web-admin —
[INFO]
auto discovered modules [com.sqli.sante.ideodirectory.wadmin.AppWidgetset]

[INFO]
Compiling module com.sqli.sante.ideodirectory.wadmin.AppWidgetset
[INFO]
[ERROR]
Unexpected internal compiler error
[INFO]
java.lang.RuntimeException: Unexpected IOException on in-memory stream
[INFO]
at com.google.gwt.dev.javac.CompilationUnit.getTypes(CompilationUnit.java:360)
[INFO]
at com.google.gwt.dev.jjs.impl.UnifyAst.assimilateUnit(UnifyAst.java:672)
[INFO]
at com.google.gwt.dev.jjs.impl.UnifyAst.searchForTypeBySource(UnifyAst.java:985)
[INFO]
at com.google.gwt.dev.jjs.impl.UnifyAst.addRootTypes(UnifyAst.java:530)
[INFO]
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:621)
[INFO]
at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:33)
[INFO]
at com.google.gwt.dev.Precompile.precompile(Precompile.java:278)
[INFO]
at com.google.gwt.dev.Precompile.precompile(Precompile.java:229)
[INFO]
at com.google.gwt.dev.Precompile.precompile(Precompile.java:141)
[INFO]
at com.google.gwt.dev.Compiler.run(Compiler.java:232)
[INFO]
at com.google.gwt.dev.Compiler.run(Compiler.java:198)
[INFO]
at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
[INFO]
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
[INFO]
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
[INFO]
at com.google.gwt.dev.Compiler.main(Compiler.java:177)
[INFO]
Caused by: java.io.InvalidClassException: com.google.gwt.dev.jjs.ast.JDeclaredType; local class incompatible: stream classdesc serialVersionUID = -7263593854771827141, local class serialVersionUID = -8155793964565947646
[INFO]
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:579)
[INFO]
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1601)
[INFO]
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1514)
[INFO]
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1601)
[INFO]
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1514)
[INFO]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750)
[INFO]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
[INFO]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
[INFO]
at java.util.ArrayList.readObject(ArrayList.java:733)
[INFO]
at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
[INFO]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO]
at java.lang.reflect.Method.invoke(Method.java:601)
[INFO]
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:991)
[INFO]
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1866)
[INFO]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
[INFO]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
[INFO]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
[INFO]
at com.google.gwt.dev.jjs.ast.JProgram.deserializeTypes(JProgram.java:203)
[INFO]
at com.google.gwt.dev.javac.CompilationUnit.getTypes(CompilationUnit.java:358)
[INFO]
… 14 more
[/font]

I tried to create a new project with

mvn archetype:generate -DarchetypeGroupId=com.vaadin -DarchetypeArtifactId=vaadin-archetype-application -DarchetypeVersion=7.0.0.rc1 -DgroupId=your.company -DartifactId=project-name -Dversion=1.0 -Dpackaging=war

And it works, but unfortunately I can not start from scratch !

Any help would be really appreciated
Thks

Try cleaning the project, including running “mvn vaadin:clean”.
I suspect you have precompiled GWT unit cache files which are no longer up to date with the latest Vaadin version.

Hi,

only a guess, but the compiler output

[INFO]
 Caused by: java.io.InvalidClassException: com.google.gwt.dev.jjs.ast.JDeclaredType;
 local class incompatible: stream classdesc serialVersionUID = -7263593854771827141,
 local class serialVersionUID = -8155793964565947646

gives a hint that something has changed in an unexpected way.

Have you tried to clean all your immediate build results, especially the temporary directory src\main\webapp\VAADIN\gwt-unitCache which is not cleared by ‘mvn clean’ by default? This directory can be deleted. More than once some of my builts failed due to stale data from this directory.

HTH

Hi Henri and Roland,

Thanks so much for your quick answer. You were both right and Roland gave me the good hint !
My build failed due to stale data from the directory src\main\webapp\VAADIN\gwt-unitCache. I just removed it.

Can’t the vaadin:clean goal clear this directory?

Your help saved my day, thanks again

If vaadin:clean doesn’t remove the unit cache, could you
create a ticket
about it.

You’re welcome. To alleviate that problem, I have extended the configuration of the maven-clean-plugin in my pom as follows:

<plugin>
	<artifactId>maven-clean-plugin</artifactId>
	<version>2.4.1</version>
	<configuration>
		<filesets>
			<fileset>
				<directory>src/main/webapp/VAADIN/widgetsets</directory>
				[b]
<directory>src/main/webapp/VAADIN/gwt-unitCache</directory>
[/b]
			</fileset>
		</filesets>
	</configuration>
</plugin>

This shouldn’t prevent you from filing a ticket as Henri suggested though :wink:

Thanks Roland, I’ll add the unit-cache directory to the maven-clean-plugin configuration.

And I also created the ticket :wink: =>
http://dev.vaadin.com/ticket/10795