奇怪的GWT编译错误

时间:2012-11-30 16:00:26

标签: gwt

  

可能重复:
  exception in GWT RPC app

编译我的项目时(2,我遇到了这个例外。以前有人见过这个吗?

[ERROR] Failure in unit cache map load.
java.util.concurrent.ExecutionException: java.lang.RuntimeException: Unable to read from byte cache
    at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
    at java.util.concurrent.FutureTask.get(FutureTask.java:83)
    at com.google.gwt.dev.javac.PersistentUnitCache.awaitUnitCacheMapLoad(PersistentUnitCache.java:466)
    at com.google.gwt.dev.javac.PersistentUnitCache.find(PersistentUnitCache.java:391)
    at com.google.gwt.dev.javac.CompilationStateBuilder.addArchive(CompilationStateBuilder.java:365)
    at com.google.gwt.dev.ArchivePreloader.preloadArchives(ArchivePreloader.java:65)
    at com.google.gwt.dev.Precompile.precompile(Precompile.java:243)
    at com.google.gwt.dev.Precompile.precompile(Precompile.java:229)
    at com.google.gwt.dev.Precompile.precompile(Precompile.java:141)
    at com.google.gwt.dev.Compiler.run(Compiler.java:232)
    at com.google.gwt.dev.Compiler.run(Compiler.java:198)
    at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
    at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
    at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
    at com.google.gwt.dev.Compiler.main(Compiler.java:177)
Caused by: java.lang.RuntimeException: Unable to read from byte cache
    at com.google.gwt.dev.util.DiskCache.transferFromStream(DiskCache.java:171)
    at com.google.gwt.dev.util.DiskCacheToken.readObject(DiskCacheToken.java:87)
    at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
    at java.util.ArrayList.readObject(ArrayList.java:593)
    at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
    at com.google.gwt.dev.javac.CachedCompilationUnit.readObject(CachedCompilationUnit.java:205)
    at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
    at com.google.gwt.dev.javac.PersistentUnitCache.loadUnitMap(PersistentUnitCache.java:517)
    at com.google.gwt.dev.javac.PersistentUnitCache.access$800(PersistentUnitCache.java:96)
    at com.google.gwt.dev.javac.PersistentUnitCache$4.run(PersistentUnitCache.java:222)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.StreamCorruptedException: unexpected EOF in middle of data block
    at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2494)
    at java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2657)
    at java.io.ObjectInputStream.read(ObjectInputStream.java:843)
    at java.io.InputStream.read(InputStream.java:82)
    at com.google.gwt.dev.util.DiskCache.transferFromStream(DiskCache.java:159)
    ... 40 more

1 个答案:

答案 0 :(得分:26)

从这个链接:

        

很可能由于某些原因缓存已损坏,因此请尝试   从项目中删除文件夹gwt-UnitCache,这应该有所帮助。