2 Replies Latest reply on Mar 11, 2013 11:27 AM by fabrizio.benedetti

    Jboss 7.2.0 Final and infinispan

    fabrizio.benedetti

      Hi all,

      I'm trying to deploy an application from 7.1.3 to 7.2.0 Final. This app makes use of infinispan. When the app tries to start a CacheManager from an external xml, receives a parser error.

       

      Here is server.log:

      ...
      org.infinispan.config.ConfigurationException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[2,1]
      Message: Unexpected element '{urn:infinispan:config:5.2}infinispan'
          at org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:87) [infinispan-core-5.2.1.Final.jar:5.2.1.Final]
          at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:353) [infinispan-core-5.2.1.Final.jar:5.2.1.Final]
          at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:326) [infinispan-core-5.2.1.Final.jar:5.2.1.Final]
          at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:313) [infinispan-core-5.2.1.Final.jar:5.2.1.Final]
      ...
      

       

      The java code is:

      DefaultCacheManager cacheManager = new DefaultCacheManager("mycluster.xml");
      cacheManager.start();
      

       

      mycluster.xml is:

      <?xml version="1.0" encoding="UTF-8"?>
      <infinispan xmlns="urn:infinispan:config:5.2">
          <global>
              <transport clusterName="${jgroups.cluster_name:MyPartition}" distributedSyncTimeout="15000">
                  <properties>
                      <property name="configurationFile" value="${jgroups.transport_file}" />
                  </properties>
              </transport>
              <shutdown hookBehavior="DONT_REGISTER"/>
          </global>
          <default>
              <jmxStatistics enabled="true"/>
              <clustering mode="distribution">
                  <l1 enabled="false" lifespan="10000"/>
                  <hash numOwners="2" />
                  <sync replTimeout="10000"/>
              </clustering>
          </default>
          <namedCache name="myCache"/>
      </infinispan>
      

       

      The XML file seems to be valid, infact I wrote a simple standalone java code (importing infinispan 5.2.1) that makes the same thing and goes fine!

       

      Why from within as 7.2.0 Final the parser does not validate the external XML?

       

      Regards

      /Fabrizio

        • 1. Re: Jboss 7.2.0 Final and infinispan
          ctomc

          Hi,

           

          this is more issue with infinispan that AS itself, so i would suggest asking at infinispan forum.

           

          In any case i would suggest you to configure cache as part of infinispan subsystem and then just inject it to where you need it (via @Resource)

           

           

           

          --

          tomaz

          • 2. Re: Jboss 7.2.0 Final and infinispan
            fabrizio.benedetti

            Thank you Tomaz.

             

            I posted on this forum because infinispan standalone has no problem. Anyway I'll ask also at infinispan forum.

             

            Yes, configuring cache as part of infinispan subsystem is a good idea, I'll try it.

             

            /Fabrizio