6 Replies Latest reply on Jan 7, 2015 10:48 AM by rvansa

    Unable to load a File Store cache.

    akhare22

      0 down vote  favorite  

       

      I recieve the following exception when trying to load Single File Store Cache in Infinispan 6.0.2 Final version.

      Exception in thread "main" org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.persistence.manager.PersistenceManagerImpl.start() on object of type PersistenceManagerImpl at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:185) at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:869) at org.infinispan.factories.AbstractComponentRegistry.invokeStartMethods(AbstractComponentRegistry.java:638) at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:627) at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:530) at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:216) at org.infinispan.CacheImpl.start(CacheImpl.java:675) at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:553) at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:516) at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:398)

      Caused by: org.infinispan.commons.CacheException: Unable to start cache loaders at org.infinispan.persistence.manager.PersistenceManagerImpl.start(PersistenceManagerImpl.java:155) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:183) ... 12 more Caused by: org.infinispan.persistence.spi.PersistenceException: org.infinispan.persistence.spi.PersistenceException: ISPN000279: Failed to read stored entries from file. Error in file /data/VidMassTable_1/VidMassTable.dat at offset 260949664286 at org.infinispan.persistence.file.SingleFileStore.start(SingleFileStore.java:123) at org.infinispan.persistence.manager.PersistenceManagerImpl.start(PersistenceManagerImpl.java:122) ... 17 more Caused by: org.infinispan.persistence.spi.PersistenceException: ISPN000279: Failed to read stored entries from file. Error in file /data/VidMassTable_1/VidMassTable.dat at offset 260949664286 at org.infinispan.persistence.file.SingleFileStore.rebuildIndex(SingleFileStore.java:183) at org.infinispan.persistence.file.SingleFileStore.start(SingleFileStore.java:119) ... 18 more

      Any pointers on this will be highly appreciated.

        • 1. Re: Unable to load a File Store cache.
          rvansa

          Seems like the file is corrupt. Delete this file and start again. Does it happen if you shutdown the node cleanly?

          • 2. Re: Unable to load a File Store cache.
            akhare22

            Yes this has happened when I have shutdown the node cleanly.The data is very important.Is there a way in which i can save the data or try loading the cache again? Any help will be greatly appreciated.

            • 3. Re: Unable to load a File Store cache.
              rvansa

              There is no automated system for data recovery, but you can try to write your own, knowing the data. The format of the file is quite simplistic - see the SingleFileStore class itself for more comments. As marshaller, usually the VersionAwareMarshaller is used.

              1 of 1 people found this helpful
              • 4. Re: Unable to load a File Store cache.
                wdfink

                Does this happen with every clean shutdown? If yes it seems like an issue with your data or a bug in the SingleFileStore implementation.

                If so you should provide an example for reproducing and create a JIRA for it.

                 

                The file structure is simple but it's a bit tricky with the marshalled key/values. You need to use the JBossMarshaller for both with the correct offset/data.

                But if the file is corrupted that might fail also

                Maybe you can enable trace logging for org.infinispan and start to see whether there are more informations during cache load.

                • 5. Re: Unable to load a File Store cache.
                  akhare22

                  Radim,

                  Could you please throw some light on what is the process that has to be followed or provide any link for the same.

                  • 6. Re: Unable to load a File Store cache.
                    rvansa

                    There's no process to be followed. It's not a common problem, and I don't have enough info to tell you what happened (full disc, IO errors, whatever). What you can do now is to

                    1) get understand how SingleFileStore works: it's not a rocket science, the code is here https://github.com/infinispan/infinispan/blob/master/core/src/main/java/org/infinispan/persistence/file/SingleFileStore.java

                    2) write your own, more resilient application that goes through the file and loads the entries, and see where the error happens - you can try to skip this one entry, fix the file format if a bit flipped somewhere on disk etc...