无法在浏览器上加载GWT应用程序

时间:2014-02-28 14:20:05

标签: java gwt intellij-idea

我尝试了各种stackoverflow问题的建议答案,但我仍然有这个错误。我试图删除.Intellijidea / system / gwt / *

删除gwt cahce

浏览器:chrome,firefox

操作系统:Centos 6.5

IDE:IntellijIdea

[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.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:188)
        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.DevModeBase$UiBrowserWidgetHostImpl.createModuleSpaceHost(DevModeBase.java:106)
        at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:197)
        at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526)
        at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
        at java.lang.Thread.run(Thread.java:744)
    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.GeneratedMethodAccessor3.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
        at java.util.ArrayList.readObject(ArrayList.java:771)
        at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
        at com.google.gwt.dev.javac.CachedCompilationUnit.readObject(CachedCompilationUnit.java:205)
        at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
        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:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        ... 1 more
    Caused by: java.io.StreamCorruptedException: unexpected EOF in middle of data block
        at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2539)
        at java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2702)
        at java.io.ObjectInputStream.read(ObjectInputStream.java:865)
        at java.io.InputStream.read(InputStream.java:101)
        at com.google.gwt.dev.util.DiskCache.transferFromStream(DiskCache.java:159)
        ... 39 more

1 个答案:

答案 0 :(得分:1)

它是由损坏的gwt缓存引起的。删除gwt-unitCache文件夹的内容并运行您的应用程序。