Hi Costin,

thanks for your response. I tried all the cleanup but still no luck :-( 
Here are the steps I tried

1. Removed the es-hadoop 2.1.x completed from the server

2. Updated the hive-site.xml as below, but didn't work

<property>
  <name>hive.aux.jars.path</name>
  
<value>/apps/sas/elasticsearch-hadoop-2.0.2/dist/elasticsearch-hadoop-2.0.2.jar</value>
  <description>A comma separated list (with no spaces) of the jar 
files</description>
</property>

3. Added the jar file in the hiveconf as below, still the same issue

hive --hiveconf 
hive.aux.jars.path=/apps/sas/elasticsearch-hadoop-2.0.2/dist/elasticsearch-hadoop-2.0.2.jar

4. Tried adding the jar file in the hive session, still didn't work

add jar 
/apps/sas/elasticsearch-hadoop-2.0.2/dist/elasticsearch-hadoop-2.0.2.jar;

I agree that both the classes are in the same package so ideally this issue 
shouldn't be coming. One thing I didn't understand from your suggestion is, 
why do I need to add the es-hadoop.jar in the Hadoop classpath ? I added it 
to only Hive classpath as per below URL

http://www.elasticsearch.org/guide/en/elasticsearch/hadoop/current/hive.html#_installation_3

Thanks
- Atul



On Thursday, November 27, 2014 3:29:04 PM UTC-8, Costin Leau wrote:
>
> Hi, 
>
> The issue is most likely caused by two different versions of es-hadoop 
> within your classpath, probably es-hadoop 2.0.x 
> (2.0.2) 
> and 2.1.x (2.1.0.Beta3). If they are picked up by Hive or Hadoop it means 
> the JVM will have two jars with classes under 
> the same package name. 
> This leads to weird conflicts as classes from jar can interact with 
> classes from the other jar, especially as between 
> 2.0.x/2.1.x the code internally 
> went through major changes. 
>
> Make sure you have only one version of es-hadoop in your classpath - both 
> on the client and in the cluster. That 
> includes the Hive classpath, Hadoop classpath 
> as well as the submitting jar (since the library might be embedded). 
>
> P.S. IllegalAccesException indicates an illegal call - such as calling a 
> non-public class in a different class. However 
> in this case both classes are in the same 
> package and HiveUtils class is not private... 
>
> Cheers, 
>
> On 11/27/14 9:19 AM, Atul Paldhikar wrote: 
> > Hi All, 
> > 
> > I am using Hive 0.13.1 and trying to create an external table so data 
> can me loaded from Hive to Elasticsearch. However 
> > I keep getting the following error. I have tried with following jars but 
> same error. I will really appreciate for any 
> > pointers. 
> > 
> > Thanks 
> > - Atul 
> > 
> > <property> 
> >    <name>hive.aux.jars.path</name> 
> > <!-- 
> >   
>  
> <value>/apps/sas/elasticsearch-hadoop-2.0.2/dist/elasticsearch-hadoop-2.0.2.jar</value>
>  
>
> > --> 
> >   
>  
> <value>/apps/sas/elasticsearch-hadoop-2.1.0.Beta3/dist/elasticsearch-hadoop-2.1.0.Beta3.jar</value>
>  
>
> >    <description>A comma separated list (with no spaces) of the jar 
> files</description> 
> > </property> 
> > 
> > ERROR : 
> > 
> > 2014-11-26 23:09:22,069 ERROR [main]: exec.DDLTask 
> (DDLTask.java:execute(478)) - java.lang.IllegalAccessError: tried to 
> > access class org.elasticsearch.hadoop.hive.HiveUtils from class 
> org.elasticsearch.hadoop.hive.EsSerDe 
> >          at 
> org.elasticsearch.hadoop.hive.EsSerDe.initialize(EsSerDe.java:81) 
> >          at 
> org.apache.hadoop.hive.metastore.MetaStoreUtils.getDeserializer(MetaStoreUtils.java:339)
>  
>
> >          at 
> org.apache.hadoop.hive.ql.metadata.Table.getDeserializerFromMetaStore(Table.java:288)
>  
>
> >          at 
> org.apache.hadoop.hive.ql.metadata.Table.getDeserializer(Table.java:281) 
> >          at 
> org.apache.hadoop.hive.ql.metadata.Table.getCols(Table.java:631) 
> >          at 
> org.apache.hadoop.hive.ql.metadata.Hive.createTable(Hive.java:593) 
> >          at 
> org.apache.hadoop.hive.ql.exec.DDLTask.createTable(DDLTask.java:4189) 
> >          at 
> org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:281) 
> >          at 
> org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:153) 
> >          at 
> org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:85) 
> >          at 
> org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1503) 
> >          at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1270) 
> >          at 
> org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1088) 
> >          at org.apache.hadoop.hive.ql.Driver.run(Driver.java:911) 
> >          at org.apache.hadoop.hive.ql.Driver.run(Driver.java:901) 
> >          at 
> org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:268) 
> >          at 
> org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:220) 
> >          at 
> org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:423) 
> >          at 
> org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:792) 
> >          at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:686) 
> >          at 
> org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625) 
> >          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
> >          at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
>
> >          at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  
>
> >          at java.lang.reflect.Method.invoke(Method.java:606) 
> >          at org.apache.hadoop.util.RunJar.main(RunJar.java:212) 
> > 
> > 2014-11-26 23:09:22,069 ERROR [main]: ql.Driver 
> (SessionState.java:printError(545)) - FAILED: Execution Error, return 
> > code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. tried to access 
> class org.elasticsearch.hadoop.hive.HiveUtils from 
> > class org.elasticsearch.hadoop.hive.EsSerDe 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "elasticsearch" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to 
> > elasticsearc...@googlegroups.com <javascript:> <mailto:
> elasticsearch+unsubscr...@googlegroups.com <javascript:>>. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/elasticsearch/78b85fb6-6eea-46e8-964a-d96e324e780d%40googlegroups.com
>  
> > <
> https://groups.google.com/d/msgid/elasticsearch/78b85fb6-6eea-46e8-964a-d96e324e780d%40googlegroups.com?utm_medium=email&utm_source=footer>.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
> -- 
> Costin 
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/bfe7d6b1-25b4-40dc-a529-b6d68ca24f91%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to