0 Replies Latest reply on Dec 25, 2013 4:44 AM by wuxiaowei

    [ClassLoader of OSGi] HBase Client API in JBossOSGi

    wuxiaowei

      Hello,every one!

       

      My team now get a Apache HBase problem when we integrating it with OSGi.

      The deatil is that we first setup a server side out of OSGi,then build a bundle,in which we use HBase client API

      to connect the server side.When we execute the last line of follow:

       

             Configuration HBASE_CONFIG = new Configuration();

             HBASE_CONFIG.set("hbase.zookeeper.quorum", "10.185.161.66");

             conf = HBaseConfiguration.create(HBASE_CONFIG);

       

      we got an exception like this:

       

      17:38:45,381 ERROR [org.jboss.osgi.framework.internal.FrameworkEventsPlugin] (MSC service thread 1-7) Framework ERROR: org.osgi.framework.BundleException: Cannot resolve bundle resModule: [org.apache.servicemix.bundles.hadoop-core:1.2.1.1]

        at org.jboss.osgi.framework.internal.ResolverPlugin.resolve(ResolverPlugin.java:157) [jbosgi-framework-core-1.1.8.Final.jar:1.1.8.Final]

        at org.jboss.osgi.framework.internal.AbstractBundleState.ensureResolved(AbstractBundleState.java:551) [jbosgi-framework-core-1.1.8.Final.jar:1.1.8.Final]

        at org.jboss.osgi.framework.internal.HostBundleState.startInternal(HostBundleState.java:211) [jbosgi-framework-core-1.1.8.Final.jar:1.1.8.Final]

        at org.jboss.osgi.framework.internal.AbstractBundleState.start(AbstractBundleState.java:494) [jbosgi-framework-core-1.1.8.Final.jar:1.1.8.Final]

        at org.jboss.as.osgi.deployment.BundleStartTracker$1.processService(BundleStartTracker.java:144) [jboss-as-osgi-service-7.1.1.Final.jar:7.1.1.Final]

        at org.jboss.as.osgi.deployment.BundleStartTracker$1.transition(BundleStartTracker.java:119) [jboss-as-osgi-service-7.1.1.Final.jar:7.1.1.Final]

        at org.jboss.msc.service.ServiceControllerImpl.invokeListener(ServiceControllerImpl.java:1416) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

        at org.jboss.msc.service.ServiceControllerImpl.access$2700(ServiceControllerImpl.java:49) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

        at org.jboss.msc.service.ServiceControllerImpl$ListenerTask.run(ServiceControllerImpl.java:1954) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_24]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_24]

        at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_24]

      Caused by: org.jboss.osgi.resolver.XResolverException: Unable to resolve Module[org.apache.servicemix.bundles.hadoop-core:1.2.1.1]: missing requirement [Module[org.apache.servicemix.bundles.hadoop-core:1.2.1.1]] package; (&(package=javax.servlet.jsp)(version>=2.1.0)(!(version>=3.0.0)))

        at org.jboss.osgi.resolver.felix.FelixResolver.resolveInternal(FelixResolver.java:117) [jbosgi-resolver-felix-1.0.13.Final.jar:1.0.13.Final]

        at org.jboss.osgi.resolver.spi.AbstractResolver.resolve(AbstractResolver.java:149) [jbosgi-resolver-spi-1.0.13.Final.jar:1.0.13.Final]

        at org.jboss.osgi.framework.internal.ResolverPlugin.resolve(ResolverPlugin.java:155) [jbosgi-framework-core-1.1.8.Final.jar:1.1.8.Final]

        ... 11 more

       

      We have set the current thread classLoader as the HBaseConfiguration.class.getClassLoader(),and still not work.

       

      And we have found a issue about this,but didn't describe a step by step detail.


      http://planet.jboss.org/post/apache_karaf_meets_apache_hbase;jsessionid=03E41308F89BAAE1FCBEC5059441749D


      Any answers or documents about it will be precious,great thanks.


      Or U can send me an email directly:wxw2013@gamil.com


      Tx again.