Code Monkey home page Code Monkey logo

cluster's People

Contributors

gaol avatar kylinsoong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cluster's Issues

JCD-003: merge dist enhance

Current build
mvn clean install -P release
can generate 2 dist

  • jbosscache/demo/target/jbosscache-replication-demo-2.0-SNAPSHOT-dist.zip
  • build/target/cluster-demo-dist.zip

Now, we need merge these 2 dist as one, which named cluster-demo-dist.zip, under 'build/target/' dir

JCD-001 jboss-modules-1.1.2.GA.jar start up datagrid demo throw exception

Issue

While start datagrid demo use traditional mood it works fine like below:
java -cp target/dependency/*:target/grid-helloworld.jar -Djava.net.preferIPv4Stack=true com.kylin.infinispan.datagrid.helloworld.Main -c infinispan-distribution.xml

But whem run with jboss-modules-1.1.2.GA.jar, like below:
java -jar jboss-modules-1.1.2.GA.jar -mp -c infinispan-distribution.xml the following exception throw:
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.(DefaultCacheManager.java:353)
at org.infinispan.manager.DefaultCacheManager.(DefaultCacheManager.java:326)
at com.kylin.infinispan.datagrid.helloworld.MyCacheManagerProvider.getCacheManager(MyCacheManagerProvider.java:65)
at com.kylin.infinispan.datagrid.helloworld.CacheDelegateImpl.(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

How to reproduce?

  • infinispan/grid/helloworld-swt have package com.kylin.infinispan.datagrid.helloworld.test.JCD001, which this package contain class can reproduce this issue
  • Build the project, more details refer to https://github.com/kylinsoong/cluster/blob/master/how-to-build.asciidoc, this will generate Demo home, set, com.kylin.infinispan.datagrid.helloworld.test.JCD001.JCD001Base DEMO_HOME equal with generated Demo Home
  • Run com.kylin.infinispan.datagrid.helloworld.test.JCD001.ModularClassLoadingBoot will throw issue section exception
  • Run com.kylin.infinispan.datagrid.helloworld.test.JCD001.TraditionalBoot data grid demo will start correctly

Diagnostic Steps

  • Debug Infinispan boot code
  • The issue occur while execute org.infinispan.configuration.parsing.ParserRegistry construction method, as below code:

ServiceLoader parsers = ServiceLoader.load(ConfigurationParser.class, cl);
for (ConfigurationParser<?> parser : parsers) {
for (Namespace ns : parser.getSupportedNamespaces()) {
xmlMapper.registerRootElement(new QName(ns.getUri(), ns.getRootElement()), parser);
}
}

while use Modular Class Loading Framework, no element be registered, but use other Class Loading, element be registered

Root Cause

Wrong module.xml dependency cause this issue, boot module depend on grid demo module, grid demo module denpend on infinispan module, the following code:
ServiceLoader parsers = ServiceLoader.load(ConfigurationParser.class, cl);
in infinispan module, but use boot module ModularClassloader, so no ConfigurationParser's implementation be loaded by ServiceLoader load() method

Resolution

Modify boot module module.xml, add infnispan module dependency:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.