Wednesday, January 21, 2015

Re: Errors migrating to GWT 2.7.0 . Can someone please help me ?

Thomas, Thanks a lot for your responses.

I made a change in my Ant build GWT Compiler by adding the line (text in green) as you suggested to my <java> task;  I copied my build.xml code.

I also copied the error below I am getting after adding this sysproperty.

Can you please check the error and suggest next steps ?

--------------------------------------------------------------------------------------------Start of Build.xml Code----------------------------------------------------------------------------------------------------
<target name="gwtc" depends="javac" description="GWT compile to JavaScript">
    <mkdir dir="${out.dir}" />
    <java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler"  maxmemory="512m">
    <sysproperty key="gwt.usearchives" value="false" />
      <classpath>
        <pathelement location="src"/>
        <path refid="project.class.path"/>
      </classpath>
      <!-- add jvmarg -Xss16M or similar if you see a StackOverflowError -->
      <!-- <jvmarg value="-Xmx256M"/> -->
      <!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
      <arg value="com.acg.mmsea.gwt.Mmsea" />
      <arg value="-war" />
      <arg file="${basedir}/${out.dir}" />
      <arg value="-style" />
      <arg value="PRETTY" />       
  <!--<arg value="-logLevel" />
      <arg value="DEBUG" /> -->      
    </java>
    <copy todir="${web.dir}">
            <fileset dir="${out.dir}/${module}"/>
    </copy>
  </target>
--------------------------------------------------------------------------------------------End of Build.xml Code----------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------Start of ERROR----------------------------------------------------------------------------------------------------
Compiling module com.acg.appname.gwt.Appname
     [java]    [ERROR] Unexpected internal compiler error
     [java] java.lang.RuntimeException: Unexpected IOException on in-memory stream
     [java]     at com.google.gwt.dev.javac.CompilationUnit.getTypes(CompilationUnit.java:383)

     [java]     at com.google.gwt.dev.jjs.impl.UnifyAst.assimilateSourceUnit(UnifyAst.java:999)
     [java]     at com.google.gwt.dev.jjs.impl.UnifyAst.internalFindType(UnifyAst.java:1595)
     [java]     at com.google.gwt.dev.jjs.impl.UnifyAst.translate(UnifyAst.java:1653)
     [java]     at com.google.gwt.dev.jjs.impl.UnifyAst.translate(UnifyAst.java:1645)
     [java]     at com.google.gwt.dev.jjs.impl.UnifyAst.resolveType(UnifyAst.java:1552)
     [java]     at com.google.gwt.dev.jjs.impl.UnifyAst.assimilateSourceUnit(UnifyAst.java:1010)
     [java]     at com.google.gwt.dev.jjs.impl.UnifyAst.internalFindType(UnifyAst.java:1595)
     [java]     at com.google.gwt.dev.jjs.impl.UnifyAst.translate(UnifyAst.java:1653)
     [java]     at com.google.gwt.dev.jjs.impl.UnifyAst.translate(UnifyAst.java:1645)
     [java]     at com.google.gwt.dev.jjs.impl.UnifyAst.resolveType(UnifyAst.java:1552)
     [java]     at com.google.gwt.dev.jjs.impl.UnifyAst.assimilateSourceUnit(UnifyAst.java:1010)
     [java]     at com.google.gwt.dev.jjs.impl.UnifyAst.internalFindType(UnifyAst.java:1595)
     [java]     at com.google.gwt.dev.jjs.impl.UnifyAst.translate(UnifyAst.java:1653)
     [java]     at com.google.gwt.dev.jjs.impl.UnifyAst.translate(UnifyAst.java:1645)
     [java]     at com.google.gwt.dev.jjs.impl.UnifyAst.resolveType(UnifyAst.java:1552)
     [java]     at com.google.gwt.dev.jjs.impl.UnifyAst.assimilateSourceUnit(UnifyAst.java:1010)
     [java]     at com.google.gwt.dev.jjs.impl.UnifyAst.internalFindType(UnifyAst.java:1595)
     [java]     at com.google.gwt.dev.jjs.impl.UnifyAst.addRootTypes(UnifyAst.java:733)
     [java]     at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler$Precompiler.unifyJavaAst(JavaToJavaScriptCompiler.java:1291)
     [java]     at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler$Precompiler.constructJavaAst(JavaToJavaScriptCompiler.java:1038)
     [java]     at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler$Precompiler.precompile(JavaToJavaScriptCompiler.java:954)
     [java]     at com.google.gwt.dev.jjs.MonolithicJavaToJavaScriptCompiler.precompile(MonolithicJavaToJavaScriptCompiler.java:303)
     [java]     at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:38)
     [java]     at com.google.gwt.dev.Precompile.precompile(Precompile.java:286)
     [java]     at com.google.gwt.dev.Precompile.precompile(Precompile.java:229)
     [java]     at com.google.gwt.dev.Precompile.precompile(Precompile.java:145)
     [java]     at com.google.gwt.dev.Compiler.run(Compiler.java:206)
     [java]     at com.google.gwt.dev.Compiler.run(Compiler.java:158)
     [java]     at com.google.gwt.dev.Compiler$1.run(Compiler.java:120)
     [java]     at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55)
     [java]     at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50)
     [java]     at com.google.gwt.dev.Compiler.main(Compiler.java:127)
     [java] Caused by: java.io.InvalidClassException: com.google.gwt.dev.jjs.SourceOrigin$1; local class incompatible: stream classdesc serialVersionUID = -2407201776821563037, local class serialVersionUID = 4713379764594032837
     [java]     at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:619)
     [java]     at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1606)
     [java]     at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1501)
     [java]     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1755)
     [java]     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1334)
     [java]     at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1976)
     [java]     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1900)
     [java]     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1782)
     [java]     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1334)
     [java]     at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1976)
     [java]     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1900)
     [java]     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1782)
     [java]     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1334)
     [java]     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:353)
     [java]     at java.util.ArrayList.readObject(ArrayList.java:731)
     [java]     at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
     [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java]     at java.lang.reflect.Method.invoke(Method.java:600)
     [java]     at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1028)
     [java]     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1878)
     [java]     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1782)
     [java]     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1334)
     [java]     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:353)
     [java]     at com.google.gwt.dev.jjs.ast.JDeclaredType.readMembers(JDeclaredType.java:412)
     [java]     at com.google.gwt.dev.jjs.ast.JProgram.deserializeTypes(JProgram.java:229)
     [java]     at com.google.gwt.dev.javac.CompilationUnit.getTypes(CompilationUnit.java:381)
     [java]     ... 32 more

BUILD FAILED
C:\APPNAME WrkSpc\AppnameApp\build.xml:64: Java returned: 1
--------------------------------------------------------------------------------------------Endof ERROR----------------------------------------------------------------------------------------------------


On Friday, January 16, 2015 at 12:12:14 PM UTC-5, Thomas Broyer wrote:


On Friday, January 16, 2015 at 6:02:18 PM UTC+1, ssg wrote:
Thomas, Thanks a lot for your response.
I am using JDK1.6. I am also new to GWT.

1) Can you please help me how & where to add -Dgwt.usearchives=false ?

In your Ant build, where you call the GWT Compiler, add a <sysproperty key="gwt.usearchives" value="false" /> to your <java> task.
 
2) Are you suggesting me to use GWT 2.8 instead of 2.7 now?

No!
(GWT 2.8 will require Java 7+ anyway)

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment