You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by "Gerlach, Hannah L (IS)" <Ha...@ngc.com> on 2010/11/16 18:40:10 UTC

unable to create table

Hello,

 

I am completely new to hive and I need some help.  Hive starts fine, but
when I try to create a table, I get an error.  See below.

 

hive> CREATE TABLE pokes (foo INT, bar STRING);

 

Exception in thread "main" java.lang.NoClassDefFoundError:
org/antlr/runtime/tree/TreeAdaptor

                at
org.apache.hadoop.hive.ql.Driver.compile(Driver.java:314)

                at org.apache.hadoop.hive.ql.Driver.run(Driver.java:635)

                at
org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:140)

                at
org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:199)

                at
org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:353)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)

                at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)

                at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.apache.hadoop.util.RunJar.main(RunJar.java:156)

Caused by: java.lang.ClassNotFoundException:
org.antlr.runtime.tree.TreeAdaptor

                at
java.net.URLClassLoader$1.run(URLClassLoader.java:200)

                at java.security.AccessController.doPrivileged(Native
Method)

                at
java.net.URLClassLoader.findClass(URLClassLoader.java:188)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:303)

                at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

                at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)

                ... 10 more

 

Ideas?

 

Best,

Hannah


Re: EXTERNAL:Re: unable to create table

Posted by Ted Yu <yu...@gmail.com>.
The class is in antlr-runtime-3.0.1.jar
Try finding it under <install-dir>

On Tue, Nov 16, 2010 at 11:43 AM, Gerlach, Hannah L (IS) <
Hannah.Gerlach@ngc.com> wrote:

> Dear Ted,
>
>
>
> Maybe  I am missing something, but ‘Exception in hive startup’ appears to
> be a different problem.
>
>
>
> When I run <install-dir>/bin/hive, it starts fine.  The problem arises when
> I try to create a table once hive is running.
>
>
>
> Best,
>
> Hannah
>
>
>
> *From:* Ted Yu [mailto:yuzhihong@gmail.com]
> *Sent:* Tuesday, November 16, 2010 2:16 PM
> *To:* user@hive.apache.org
> *Subject:* EXTERNAL:Re: unable to create table
>
>
>
> See 'Exception in hive startup' discussion - especially Edward's response
> on Oct 13th.
>
> On Tue, Nov 16, 2010 at 9:40 AM, Gerlach, Hannah L (IS) <
> Hannah.Gerlach@ngc.com> wrote:
>
> Hello,
>
>
>
> I am completely new to hive and I need some help.  Hive starts fine, but
> when I try to create a table, I get an error.  See below.
>
>
>
> hive> CREATE TABLE pokes (foo INT, bar STRING);
>
>
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/antlr/runtime/tree/TreeAdaptor
>
>                 at
> org.apache.hadoop.hive.ql.Driver.compile(Driver.java:314)
>
>                 at org.apache.hadoop.hive.ql.Driver.run(Driver.java:635)
>
>                 at
> org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:140)
>
>                 at
> org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:199)
>
>                 at
> org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:353)
>
>                 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.apache.hadoop.util.RunJar.main(RunJar.java:156)
>
> Caused by: java.lang.ClassNotFoundException:
> org.antlr.runtime.tree.TreeAdaptor
>
>                 at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>
>                 at java.security.AccessController.doPrivileged(Native
> Method)
>
>                 at
> java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>
>                 at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
>
>                 at
> sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>
>                 at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>
>                 at
> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
>
>                 ... 10 more
>
>
>
> Ideas?
>
>
>
> Best,
>
> Hannah
>
>
>

RE: EXTERNAL:Re: unable to create table

Posted by "Gerlach, Hannah L (IS)" <Ha...@ngc.com>.
Dear Ted,

 

Maybe  I am missing something, but 'Exception in hive startup' appears
to be a different problem.

 

When I run <install-dir>/bin/hive, it starts fine.  The problem arises
when I try to create a table once hive is running.

 

Best,

Hannah

 

From: Ted Yu [mailto:yuzhihong@gmail.com] 
Sent: Tuesday, November 16, 2010 2:16 PM
To: user@hive.apache.org
Subject: EXTERNAL:Re: unable to create table

 

See 'Exception in hive startup' discussion - especially Edward's
response on Oct 13th.

On Tue, Nov 16, 2010 at 9:40 AM, Gerlach, Hannah L (IS)
<Ha...@ngc.com> wrote:

Hello,

 

I am completely new to hive and I need some help.  Hive starts fine, but
when I try to create a table, I get an error.  See below.

 

hive> CREATE TABLE pokes (foo INT, bar STRING);

 

Exception in thread "main" java.lang.NoClassDefFoundError:
org/antlr/runtime/tree/TreeAdaptor

                at
org.apache.hadoop.hive.ql.Driver.compile(Driver.java:314)

                at org.apache.hadoop.hive.ql.Driver.run(Driver.java:635)

                at
org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:140)

                at
org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:199)

                at
org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:353)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)

                at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)

                at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.apache.hadoop.util.RunJar.main(RunJar.java:156)

Caused by: java.lang.ClassNotFoundException:
org.antlr.runtime.tree.TreeAdaptor

                at
java.net.URLClassLoader$1.run(URLClassLoader.java:200)

                at java.security.AccessController.doPrivileged(Native
Method)

                at
java.net.URLClassLoader.findClass(URLClassLoader.java:188)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:303)

                at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

                at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)

                ... 10 more

 

Ideas?

 

Best,

Hannah

 


Re: unable to create table

Posted by Ted Yu <yu...@gmail.com>.
See 'Exception in hive startup' discussion - especially Edward's response on
Oct 13th.

On Tue, Nov 16, 2010 at 9:40 AM, Gerlach, Hannah L (IS) <
Hannah.Gerlach@ngc.com> wrote:

> Hello,
>
>
>
> I am completely new to hive and I need some help.  Hive starts fine, but
> when I try to create a table, I get an error.  See below.
>
>
>
> hive> CREATE TABLE pokes (foo INT, bar STRING);
>
>
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/antlr/runtime/tree/TreeAdaptor
>
>                 at
> org.apache.hadoop.hive.ql.Driver.compile(Driver.java:314)
>
>                 at org.apache.hadoop.hive.ql.Driver.run(Driver.java:635)
>
>                 at
> org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:140)
>
>                 at
> org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:199)
>
>                 at
> org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:353)
>
>                 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.apache.hadoop.util.RunJar.main(RunJar.java:156)
>
> Caused by: java.lang.ClassNotFoundException:
> org.antlr.runtime.tree.TreeAdaptor
>
>                 at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>
>                 at java.security.AccessController.doPrivileged(Native
> Method)
>
>                 at
> java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>
>                 at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
>
>                 at
> sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>
>                 at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>
>                 at
> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
>
>                 ... 10 more
>
>
>
> Ideas?
>
>
>
> Best,
>
> Hannah
>