Has anyone ever run the HBase client in an OSGi container? You might want to ask on the HBase dev list.
If you hit a dead end with this approach, you may want to try our thin driver with the query server[1] instead as this removes all the HBase and Hadoop dependencies. Thanks, James [1] http://phoenix.apache.org/server.html On Thu, Jul 7, 2016 at 9:03 AM, Abhishek Abhi <abhishek.a...@tcs.com> wrote: > Hi everyone, > > I am trying to integrate phoenix with an application that runs on OSGI > framework. I have provide bundles details in feature.xml > <bundle>wrap:mvn:org.apache.hbase/hbase-client/0.98.17-hadoop2</bundle> > > <bundle>wrap:mvn:org.apache.phoenix/phoenix-core/4.6.0-HBase-0.98</bundle> > > <bundle>wrap:mvn:org.apache.htrace/htrace-core/3.1.0-incubating</bundle> I > have also added dependencies for the above mentioned dependencies in > module's pom. While executing following code I am getting this exception > Code : try { > DriverManager.registerDriver(new PhoenixDriver()); con > = DriverManager.getConnection("jdbc:phoenix:localhost"); > } catch (SQLException e) { // TODO > Auto-generated catch block e.printStackTrace(); > } Exception: Uncaught error from thread > [opendaylight-cluster-data-notification-dispatcher-74] shutting down JVM > since 'akka.jvm-exit-on-fatal-error' is enabled for > ActorSystem[opendaylight-cluster-data] java.lang.NoClassDefFoundError: > org/apache/hadoop/hbase/ipc/RpcControllerFactory at > java.lang.ClassLoader.defineClass1(Native Method) at > java.lang.ClassLoader.defineClass(ClassLoader.java:763) at > org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188) > at > org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClassHoldingLock(ClasspathManager.java:632) > at > org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:607) > at > org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:568) > at > org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:492) > at > org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:465) > Caused by: java.lang.ClassNotFoundException: > org.apache.hadoop.hbase.ipc.RpcControllerFactory at > org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501) > at > org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421) > at > org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412) > at > org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) Any > suggestions regarding the problem? > > Regards > Abhishek > =====-----=====-----===== > Notice: The information contained in this e-mail > message and/or attachments to it may contain > confidential or privileged information. If you are > not the intended recipient, any dissemination, use, > review, distribution, printing or copying of the > information contained in this e-mail message > and/or attachments to it are strictly prohibited. If > you have received this communication in error, > please notify us by reply e-mail or telephone and > immediately and permanently delete the message > and any attachments. Thank you > > >