Tuesday, September 09, 2014

HiveAccessControlException Permission Denied. (Error from hive: error code:'40000')



While importing data from Hortonworks Hive DSN in office 2013 and you faced error for HiveAccessControlException Permission Denied.



Login to console for hortonworks using root (hadoop). Goto hive shell and grant permission to the table you are trying to import.

hive> grant SELECT on table m_user to user hue;

And then re-import the table in office 2013.


Thursday, September 04, 2014

Creating jar with dependencies in Maven Project

Simple but quite useful :

Simple add this in your pom.xml and run mvn package or install


<!--  create jar with dependencies -->
 <build>
  <plugins>
  <plugin>
    <artifactId>maven-assembly-plugin</artifactId>
   <configuration>
   <archive>
    <manifest>
     <mainClass>fully.qualified.MainClass</mainClass>
    </manifest>
   </archive>
   <descriptorRefs>
    <descriptorRef>jar-with-dependencies</descriptorRef>
   </descriptorRefs>
  </configuration>
   <executions>
   <execution>
     <id>make-assembly</id><!-- this is for inheritance merges -->
     <phase>package</phase> <!-- bind to the packaging phase -->
    <goals>
     <goal>single</goal>
    </goals>
   </execution>
  </executions>
   </plugin>
  </plugins>
 </build>

Wednesday, September 03, 2014

How to resolve Missing artifact jdk.tools:jdk.tools:jar:1.X

I have faced this issue with couple of maven artifacts like hbase-client (v 0.98.0-hadoop2)or solr-core (v 4.8.0).

Error :
Description Resource Path Location Type
The container 'Maven Dependencies' references non existing library 'C:\Users\spras3\.m2\repository\jdk\tools\jdk.tools\1.7\jdk.tools-1.7.jar' storm-analytics Build path Build Path Problem

I found the easiest way to resolve this issue by adding exclusion to the dependency for e.g.