Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Unable to read from byte cache?

    Using SmartGWT 3.0 under Firefox 7.0, Mac OSX (latest version):

    After renaming some classes, I'm suddenly getting this error in my client-side logs. I've cleared all caches (development environment and browser), recompiled everything from scratch and restarted the browser. I'm not calling any external servers where references to prior versions of the software might be found.

    Exception in thread "UnitCacheLoader" java.lang.RuntimeException: Unable to read from byte cache
    at com.google.gwt.dev.util.DiskCache.transferFromStream(DiskCache.java:166)
    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: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 com.google.gwt.dev.javac.PersistentUnitCache.loadUnitMap(PersistentUnitCache.java:493)
    at com.google.gwt.dev.javac.PersistentUnitCache.access$000(PersistentUnitCache.java:92)
    at com.google.gwt.dev.javac.PersistentUnitCache$UnitCacheMapLoader.run(PersistentUnitCache.java:122)
    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:154)
    ... 16 more

    I wish I could see what line in my program is triggering this. Notice that none of my code is referenced in the stack trace.

    What causes this type of error, and how do I fix it? Curiously, it seems like the app itself is still working fine (getting correct data from database, Data Transport Objects working fine, etc...).

    Thanks in advance.

    #2
    Did you ever solve this? I suddenly started getting this problem too.

    Comment


      #3
      Same error

      Hi Folks,

      Smart GWT 3.1, Chrome Version 24.0.1312.57 m

      I am also getting the same error while compiling. However the compilation succeeds.

      Compiling module com.mad.test.Test
      [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.GeneratedMethodAccessor17.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.GeneratedMethodAccessor16.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.GeneratedMethodAccessor19.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:85)
      at com.google.gwt.dev.util.DiskCache.transferFromStream(DiskCache.java:159)
      ... 40 more
      Compiling 6 permutations
      Compiling permutation 0...
      Compiling permutation 1...
      Compiling permutation 2...
      Compiling permutation 3...
      Compiling permutation 4...
      Compiling permutation 5...
      Compile of permutations succeeded
      Linking into D:\Code\workspace-sts-3.0.0.RELEASE\Test\src\main\webapp\com.mad.test.Test
      Link succeeded
      Compilation succeeded -- 27.631s

      Comment


        #4
        Perhaps the directory is not writable, or your disk is beginning to intermittently fail.

        Comment


          #5
          Same problem here

          Originally posted by Isomorphic View Post
          Perhaps the directory is not writable, or your disk is beginning to intermittently fail.
          I'm getting the same problem. I don't believe its a disk problem. Some Isomorphic-based applications fail like this while others don't.

          I don't think "your disk is beginning to intermittently fail" is an adequate response. We need to have some way of finding the part of our code which is invoking this failure.

          Comment


            #6
            Try deleting your gwt-UnitCache where the precompiled units are cached. It might have become corrupt or the error can be caused by the incompatible format introduced with GWT 2.5.1 and prior versions of gwt-UnitCache

            You can also temporarily pass the following to your GWT dev mode JVM args to see if it resolves your problem.

            Code:
            -Dgwt.persistentunitcache=false

            Comment


              #7
              Just to clarify, if you wanted to insist upon a resolution for this, you'd want to direct that to the GWT team in the form of a bug report - this is the GWT compiler having issues.

              Comment

              Working...
              X