1 Reply Latest reply on Apr 20, 2013 8:58 AM by Kylin Soong

    Use jboss-modules-1.1.2.GA.jar start infinispan throw XMLStreamException

    Kylin Soong Novice

      I write a simple infinispan demo, if we start via tradiitonal mode like below:

       

      java -cp target/dependency/*:target/grid-helloworld.jar <bootstrap class>
      

       

      It startup fine, but when I use Modular Classloading Framework start my demo like below:

       

      java -jar jboss-modules-1.1.2.GA.jar -mp <bootstrap module>
      

       

      then it throw the following Exception:

       

      Exception in thread "main" org.infinispan.config.ConfigurationException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[2,208]
      Message: Unexpected element '{urn:infinispan:config:5.2}infinispan'
          at org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:87)
          at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:353)
          at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:326)
          at com.kylin.infinispan.datagrid.helloworld.MyCacheManagerProvider.getCacheManager(MyCacheManagerProvider.java:65)
          at com.kylin.infinispan.datagrid.helloworld.CacheDelegateImpl.<init>(CacheDelegateImpl.java:16)
          at com.kylin.infinispan.datagrid.helloworld.Main.main(Main.java:63)
          at bootstrap.infinispan.Main.main(Main.java:17)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.jboss.modules.Module.run(Module.java:270)
          at org.jboss.modules.Main.main(Main.java:294)
      Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[2,208]
      Message: Unexpected element '{urn:infinispan:config:5.2}infinispan'
          at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:108)
          at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69)
          at org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:77)
          ... 12 more
      

       

      I am sure I use Modular Classloading Framework to start other test app which has XML parser it all works fine, but when start infispan test code it throws Exception, can any one who give me some advice.

       

      This may be Modular Classloading Framework issue, but anyway I paste to this place, I hope I can get some useful advice.

       

      Many Thanks in advanced