hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Baldassari <jbaldass...@gmail.com>
Subject Re: Zookeeper watcher error: java.lang.NoClassDefFoundError: org/apache/zookeeper/Watcher
Date Mon, 19 Apr 2010 13:41:30 GMT
The hbase-*.xml files should probably go in WEB-INF/classes for Tomcat to
find them on the classpath.  Better yet, put them wherever you want and just
programmatically build up an HBaseConfiguration instance based on the known
locations of these files.  You can put the file locations in init-params in
your web.xml or in some external configuration file used by your app.

-James


On Sun, Apr 18, 2010 at 12:23 AM, <victor.hong@nokia.com> wrote:

> Well, now it's finding zk, but seems not seeing the hbase-default.xml and
> hbase-site.xml files in CLASSPATH. I have them in WebContent/WEB-INF/lib
> folder. Is that good enough? To configure Hbase client, what's the best
> place to put them?
>
> Thanks,
> Victor
>
>
>
>
> On 4/17/10 11:40 PM, "ext Stack" <stack@duboce.net> wrote:
>
> So, its not finding zk in your CLASSPATH?  For sure its there?  Try
> adding it to one of Tomcat's general lib dirs ($TOMCAT_HOME/lib or
> $TOMCAT_HOME/common/lib?  Its been a while....) to see if that makes a
> difference.
>
> St.Ack
>
> On Sat, Apr 17, 2010 at 7:44 PM,  <victor.hong@nokia.com> wrote:
> > Hi
> >
> > I am trying to use Hbase client in Tomcat, and I have in my
> WebContent/WEB-INF/lib folder these files:
> > Zookeeper-3.2.2.jar
> > hadoop-0.20.2-core.jar
> > hbase-0.20.3.jar
> > hbase-default.xml
> > hbase-site.xml
> >
> > But I am still getting this zookeeper Watcher class not found error, when
> calling
> > HTable table = new HTable(config, className);
> >
> > No exception if only call        config = new HBaseConfiguration(); and
> not call new Htable...
> >
> > Can anyone see what I need to do to fix this?
> >
> >
> > Thanks,
> > Victor
> >
> >
> > org.jboss.resteasy.spi.UnhandledException:
> java.lang.NoClassDefFoundError: org/apache/zookeeper/Watcher
> >
>  org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:263)
> >
>  org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:169)
> >
>  org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:146)
> >
>  org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:456)
> >
>  org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:418)
> >
>  org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:111)
> >
>  org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:217)
> >
>  org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:159)
> >    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> > root cause
> >
> > java.lang.NoClassDefFoundError: org/apache/zookeeper/Watcher
> >    java.lang.ClassLoader.defineClass1(Native Method)
> >    java.lang.ClassLoader.defineClass(ClassLoader.java:698)
> >
>  java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
> >
>  org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1847)
> >
>  org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:890)
> >
>  org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1354)
> >
>  org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
> >    java.lang.ClassLoader.loadClassInternal(ClassLoader.java:398)
> >
>  org.apache.hadoop.hbase.client.HConnectionManager.getClientZooKeeperWatcher(HConnectionManager.java:170)
> >
>  org.apache.hadoop.hbase.client.HConnectionManager$TableServers.getZooKeeperWrapper(HConnectionManager.java:932)
> >
>  org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRootRegion(HConnectionManager.java:948)
> >
>  org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:625)
> >
>  org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:601)
> >
>  org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegionInMeta(HConnectionManager.java:675)
> >
>  org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:634)
> >
>  org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:601)
> >
>  org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegionInMeta(HConnectionManager.java:675)
> >
>  org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:638)
> >
>  org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:601)
> >    org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:128)
> >    org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:106)
> >    com.nokia.dataos.api.StoreImpl.get(StoreImpl.java:57)
> >    com.nokia.dataos.api.NodeResource.node(NodeResource.java:25)
> >    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >
>  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >
>  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >    java.lang.reflect.Method.invoke(Method.java:597)
> >
>  org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:124)
> >
>  org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:247)
> >    org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:212)
> >    org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:202)
> >
>  org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:441)
> >
>  org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:418)
> >
>  org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:111)
> >
>  org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:217)
> >
>  org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:159)
> >    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> > root cause
> >
> > java.lang.ClassNotFoundException: org.apache.zookeeper.Watcher
> >
>  org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
> >
>  org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
> >    java.lang.ClassLoader.loadClassInternal(ClassLoader.java:398)
> >    java.lang.ClassLoader.defineClass1(Native Method)
> >    java.lang.ClassLoader.defineClass(ClassLoader.java:698)
> >
>  java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
> >
>  org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1847)
> >
>  org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:890)
> >
>  org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1354)
> >
>  org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
> >    java.lang.ClassLoader.loadClassInternal(ClassLoader.java:398)
> >
>  org.apache.hadoop.hbase.client.HConnectionManager.getClientZooKeeperWatcher(HConnectionManager.java:170)
> >
>  org.apache.hadoop.hbase.client.HConnectionManager$TableServers.getZooKeeperWrapper(HConnectionManager.java:932)
> >
>  org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRootRegion(HConnectionManager.java:948)
> >
>  org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:625)
> >
>  org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:601)
> >
>  org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegionInMeta(HConnectionManager.java:675)
> >
>  org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:634)
> >
>  org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:601)
> >
>  org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegionInMeta(HConnectionManager.java:675)
> >
>  org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:638)
> >
>  org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:601)
> >    org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:128)
> >    org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:106)
> >    com.nokia.dataos.api.StoreImpl.get(StoreImpl.java:57)
> >    com.nokia.dataos.api.NodeResource.node(NodeResource.java:25)
> >    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >
>  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >
>  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >    java.lang.reflect.Method.invoke(Method.java:597)
> >
>  org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:124)
> >
>  org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:247)
> >    org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:212)
> >    org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:202)
> >
>  org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:441)
> >
>  org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:418)
> >
>  org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:111)
> >
>  org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:217)
> >
>  org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:159)
> >    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> > note The full stack trace of the root cause is available in the Apache
> Tomcat/6.0.18 logs.
> >
> >
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message