2 Replies Latest reply on Jul 3, 2015 6:44 AM by Jordi Puigsegur Figueras

    Error: Cannot find a parser for element 'remote-store' in namespace 'urn:infinispan:config:store:remote:7.0'

    Jordi Puigsegur Figueras Newbie

      Hi all,

       

      I am trying to test the remote-store configuration for Infinispan, but I am running into the following error:

       

      Exception in thread "main" java.lang.ExceptionInInitializerError

        at com.barcelo.infinispanpoc.Application.main(Application.java:12)

      Caused by: org.infinispan.commons.CacheConfigurationException: ISPN000327: Cannot find a parser for element 'remote-store' in namespace 'urn:infinispan:config:store:remote:7.0'. Check that your configuration is up-to date for this version of Infinispan.

        at org.infinispan.configuration.parsing.ParserRegistry.parseElement(ParserRegistry.java:130)

        at org.infinispan.configuration.parsing.XMLExtendedStreamReaderImpl.handleAny(XMLExtendedStreamReaderImpl.java:37)

        at org.infinispan.configuration.parsing.Parser70.parsePersistence(Parser70.java:1636)

        at org.infinispan.configuration.parsing.Parser70.parseCacheElement(Parser70.java:1068)

        at org.infinispan.configuration.parsing.Parser70.parseLocalCache(Parser70.java:792)

        at org.infinispan.configuration.parsing.Parser70.parseContainer(Parser70.java:517)

        at org.infinispan.configuration.parsing.Parser70.readElement(Parser70.java:84)

        at org.infinispan.configuration.parsing.ParserRegistry.parseElement(ParserRegistry.java:132)

        at org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:114)

        at org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:101)

        at org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:88)

        at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:266)

        at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:239)

        at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:226)

        at com.barcelo.infinispanpoc.LocalBarceloCacheContainer.<clinit>(LocalBarceloCacheContainer.java:21)

        ... 1 more

       

      The xml persistence configuration is the following:

       

                  <persistence>

                          <remote-store xmlns="urn:infinispan:config:store:remote:7.0"

                                        cache="performance"

                                        fetch-state="false"

                                        preload="false"

                                        purge="false"

                                        shared="true"

                                        singleton="false"

                                        read-only="false"

                                        hotrod-wrapping="false"

                                        raw-values="false"

                                        socket-timeout="60000"

                                        tcp-no-delay="true"

                                        ping-on-start="true"

                                        balancing-strategy="org.infinispan.client.hotrod.impl.transport.tcp.RoundRobinBalancingStrategy"

                                        transport-factory="org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory"

                                        key-size-estimate="62"

                                        value-size-estimate="512"

                                        force-return-values="false">

                              <remote-server host="localhost" port="12111"/>

                              <connection-pool max-active="99" max-idle="2" max-total="99" exhausted-action="EXCEPTION"/>

                              <async-executor factory="org.infinispan.client.hotrod.impl.async.DefaultAsyncExecutorFactory">

                                  <property name="pool_size">1</property>

                                  <property name="queue_size">10000</property>

                              </async-executor>

                          </remote-store>

                  </persistence>


      Infinispan documentation example (Infinispan User Guide) points to the namespace urn:infinispan:config:remote:7.0 instead of the one above. I believe this is a typo in the documentation: it fails with the same error and the source code points to urn:infinispan:config:store:remote:7.0. (RemoteStoreConfigurationParser70.java)

      Trying other stores, like leveldb, with the same xml configuration, it works properly. For instance:

       

                  <persistence>

                      <leveldb-store xmlns="urn:infinispan:config:store:leveldb:7.0"

                                     purge="true"

                                     path="/tmp/leveldb/data">

                          <expiration path="/tmp/leveldb/expiration" />

                          <implementation type="JNI" />

                      </leveldb-store>

                  </persistence>

       

      The references are the following:

       

              <dependency>

                  <groupId>org.infinispan</groupId>

                  <artifactId>infinispan-embedded</artifactId>

                  <version>7.0.2.Final</version>

              </dependency>

              <dependency>

                  <groupId>org.infinispan</groupId>

                  <artifactId>infinispan-cachestore-remote</artifactId>

                  <version>7.0.2.Final</version>

              </dependency>

       

      Any idea why I am getting this error? Am I missing something?

       

      Thanks,

      Jordi.