2 Replies Latest reply on Aug 15, 2012 9:06 PM by jb62

    Infinispan Cluster Test: Failed to start JBoss

    jb62

      Hi,

       

      I'm attempting to implement the fairly simple infinispan cluster example described here: http://n-chandra.blogspot.ie/2012/07/getting-started-infinispan-as-remote.html

       

      I've got a Ubuntu 12 destop VM (in vmware) with java 1.6 and infinispan 5.1.5

       

      I'm getting an error that seems to relate to the XML file, and yet the file itself validates...  I've tried everything I can think of (including changing from Java 7 back to 6) but I don't understand what's causing the issue.  Any hints would be greatly appreciated.

       

      The infinispan-distributed file I'm using looks like this:

       

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

      xmlns="urn:infinispan:config:5.1" xsi:schemalocation="urn:infinispan:config:5.1

      http://www.infinispan.org/schemas/infinispan-config-5.1.xsd">

      <global>

        <globaljmxstatistics enabled="true">

        <transport>

         <properties>

          <property name="configurationFile" value="jgroups.xml">

         </property></properties>

        </transport>

      </globaljmxstatistics></global>

      <default>

        <jmxstatistics enabled="true">

       

        <clustering mode="distribution">

         <async>

         <hash numowners="2">

        </hash></async></clustering>

      </jmxstatistics></default>

       

      <namedcache name="myCache">

        <clustering mode="distribution">

         <sync>

         <hash numowners="2">

        </hash></sync></clustering>

      </namedcache>

      </infinispan>

       

       

      I get the following stack trace when trying to initiate the infinispan process:

       

      jb@ubuntu1:~/infinispan-5.1.5.FINAL/bin$ ./startServer.sh -r hotrod -c infinispan-distributed.xml -p 11223

      Failed to boot JBoss:

      java.lang.reflect.InvocationTargetException

          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

          at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

          at org.infinispan.server.core.Main$.createCacheManager(Main.scala:176)

          at org.infinispan.server.core.Main$.instantiateCacheManager(Main.scala:154)

          at org.infinispan.server.core.Main$.boot(Main.scala:134)

          at org.infinispan.server.core.Main$$anon$1.call(Main.scala:94)

          at org.infinispan.server.core.Main$$anon$1.call(Main.scala:91)

          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

          at java.util.concurrent.FutureTask.run(FutureTask.java:138)

          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)

          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)

          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: org.infinispan.config.ConfigurationException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[7,3]

      Message: Unexpected element '{urn:infinispan:config:5.1}globaljmxstatistics' encountered

          at org.infinispan.configuration.parsing.Parser.parse(Parser.java:168)

          at org.infinispan.configuration.parsing.Parser.parse(Parser.java:130)

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

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

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

          ... 16 more

      Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[7,3]

      Message: Unexpected element '{urn:infinispan:config:5.1}globaljmxstatistics' encountered

          at org.infinispan.configuration.parsing.ParseUtils.unexpectedElement(ParseUtils.java:60)

          at org.infinispan.configuration.parsing.Parser.parseGlobal(Parser.java:1282)

          at org.infinispan.configuration.parsing.Parser.doParse(Parser.java:192)

          at org.infinispan.configuration.parsing.Parser.parse(Parser.java:154)

          ... 20 more

      Exception in thread "main" java.util.concurrent.ExecutionException: java.lang.reflect.InvocationTargetException

          at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)

          at java.util.concurrent.FutureTask.get(FutureTask.java:83)

          at org.infinispan.server.core.Main$.main(Main.scala:112)

          at org.infinispan.server.core.Main.main(Main.scala)

      Caused by: java.lang.reflect.InvocationTargetException

          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

          at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

          at org.infinispan.server.core.Main$.createCacheManager(Main.scala:176)

          at org.infinispan.server.core.Main$.instantiateCacheManager(Main.scala:154)

          at org.infinispan.server.core.Main$.boot(Main.scala:134)

          at org.infinispan.server.core.Main$$anon$1.call(Main.scala:94)

          at org.infinispan.server.core.Main$$anon$1.call(Main.scala:91)

          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

          at java.util.concurrent.FutureTask.run(FutureTask.java:138)

          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)

          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)

          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: org.infinispan.config.ConfigurationException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[7,3]

      Message: Unexpected element '{urn:infinispan:config:5.1}globaljmxstatistics' encountered

          at org.infinispan.configuration.parsing.Parser.parse(Parser.java:168)

          at org.infinispan.configuration.parsing.Parser.parse(Parser.java:130)

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

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

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

          ... 16 more

      Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[7,3]

      Message: Unexpected element '{urn:infinispan:config:5.1}globaljmxstatistics' encountered

          at org.infinispan.configuration.parsing.ParseUtils.unexpectedElement(ParseUtils.java:60)

          at org.infinispan.configuration.parsing.Parser.parseGlobal(Parser.java:1282)

          at org.infinispan.configuration.parsing.Parser.doParse(Parser.java:192)

          at org.infinispan.configuration.parsing.Parser.parse(Parser.java:154)

          ... 20 more

        • 1. Re: Infinispan Cluster Test: Failed to start JBoss
          mircea.markus

          "globaljmxstatistics" element in your configuration should be "globalJmxStatistics"  (case sensitive)

          1 of 1 people found this helpful
          • 2. Re: Infinispan Cluster Test: Failed to start JBoss
            jb62

            Thanks very much - your hint pointed me in the right direction.  The xml in that example is munged in about every way it could have been.  Here's what I got working using the minimal.xml from the package as a start.  Hopefully this will help anyone else who discovers that particular tutorial.

             

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

            <!--

              ~ Copyright 2011 Red Hat, Inc. and/or its affiliates.

              ~

              ~ This is free software; you can redistribute it and/or modify it

              ~ under the terms of the GNU Lesser General Public License as

              ~ published by the Free Software Foundation; either version 2.1 of

              ~ the License, or (at your option) any later version.

              ~

              ~ This software is distributed in the hope that it will be useful,

              ~ but WITHOUT ANY WARRANTY; without even the implied warranty of

              ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU

              ~ Lesser General Public License for more details.

              ~

              ~ You should have received a copy of the GNU Lesser General Public

              ~ License along with this library; if not, write to the Free Software

              ~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA

              ~ 02110-1301 USA

              -->

             

            <infinispan

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

                  xsi:schemaLocation="urn:infinispan:config:5.1 http://www.infinispan.org/schemas/infinispan-config-5.1.xsd"

                  xmlns="urn:infinispan:config:5.1">

             

               <global>

                    <globalJmxStatistics

                        enabled="true"/>

                  <transport>

                     <properties>

                        <property name="configurationFile" value="jgroups.xml" />

                     </properties>

                  </transport>

               </global>

             

            <namedCache name="myCache">

              <clustering mode="distribution">

               <sync/>

               <hash numOwners="2"> </hash>

            </clustering>

            </namedCache>

             

            <!--  <default>

                  <clustering mode="distribution">

                     <l1 enabled="false" />

                     <hash numOwners="2"/>

                     <sync/>

                  </clustering>

               </default>  -->

             

            </infinispan>