0 Replies Latest reply on Mar 10, 2013 9:40 AM by Eugeny Balakhonov

    Using JdbmCacheLoader

    Eugeny Balakhonov Newbie

      Hello!

       

      I want to use JdbmCacheLoader in my configuration for a cache persistence. I have created simple config:

       

      <?xml version="1.0" encoding="UTF-8"?>

      <jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                  xmlns="urn:jboss:jbosscache-core:config:3.2">

          <loaders passivation="false" shared="false">

                <loader

                      class="org.jboss.cache.loader.jdbm.JdbmCacheLoader"

                      async="false"

                      fetchPersistentState="true"

                      ignoreModifications="false"

                      purgeOnStartup="false">

                  <properties>

                      location=D:/cache/#data

                  </properties>

              </loader>

          </loaders>  

      </jbosscache>

       

      But this isn't working:

      1. After a first start of application I see two DB files created in the directory d:/cache/.

      2. I don't use cache during application run: I just start it and stop immediately.

      3. During a second start of application I see a lot of errors. JBoss cache can't read persistence database which were created during first start. Generic reason:

       

      Caused by: jdbm.helper.WrappedRuntimeException: org.jboss.cache.loader.jdbm.JdbmFqnComparator

                at jdbm.helper.DefaultSerializer.deserialize(DefaultSerializer.java:99)

                at jdbm.recman.BaseRecordManager.fetch(BaseRecordManager.java:341)

                at jdbm.recman.CacheRecordManager.fetch(CacheRecordManager.java:263)

                at jdbm.recman.CacheRecordManager.fetch(CacheRecordManager.java:242)

                at jdbm.btree.BTree.load(BTree.java:276)

                at org.jboss.cache.loader.jdbm.JdbmCacheLoader.openDatabase(JdbmCacheLoader.java:186)

                at org.jboss.cache.loader.jdbm.JdbmCacheLoader.start(JdbmCacheLoader.java:157)

                at org.jboss.cache.loader.CacheLoaderManager.startCacheLoader(CacheLoaderManager.java:461)

       

      4. If I change in my config file JdbmCacheLoader to FileCacheLoader then cache works fine.

       

      Where is my error in the configuration? How to correctly use JdbmCacheLoader ?

      Please help me by good advice

       

      Best regards,

      Eugeny