Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Hadoop, mail # user - Re: NullPointerException in Spring Data Hadoop with CDH4


Copy link to this message
-
Re: NullPointerException in Spring Data Hadoop with CDH4
Christian Schneider 2013-02-12, 16:00
With the help of Costin I got a running Maven configuration.

Thank you :).

This is a pom.xml for Spring Data Hadoop and CDH4:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.example</groupId>
<artifactId>com.example.main</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<properties>
<java-version>1.7</java-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.version>3.2.0.RELEASE</spring.version>
<spring.hadoop.version>1.0.0.BUILD-SNAPSHOT</spring.hadoop.version>
<hadoop.version.generic>2.0.0-cdh4.1.3</hadoop.version.generic>
<hadoop.version.mr1>2.0.0-mr1-cdh4.1.3</hadoop.version.mr1>
</properties>

<dependencies>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-hadoop</artifactId>
<version>${spring.hadoop.version}</version>

<exclusions>
<!-- Excluded the Hadoop dependencies to be sure that they are not mixed with them provided by cloudera. -->
<exclusion>
<artifactId>hadoop-streaming</artifactId>
<groupId>org.apache.hadoop</groupId>
</exclusion>
<exclusion>
<artifactId>hadoop-tools</artifactId>
<groupId>org.apache.hadoop</groupId>
</exclusion>
</exclusions>

</dependency>

<!-- Hadoop Cloudera Dependencies -->
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>${hadoop.version.generic}</version>
</dependency>

<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-hdfs</artifactId>
<version>${hadoop.version.generic}</version>
</dependency>

<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-tools</artifactId>
<version>2.0.0-mr1-cdh4.1.3</version>
</dependency>

<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-streaming</artifactId>
<version>2.0.0-mr1-cdh4.1.3</version>
</dependency>

</dependencies>

<build>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java-version}</source>
<target>${java-version}</target>
</configuration>
</plugin>

</plugins>
</build>

<repositories>
<repository>
<id>spring-milestones</id>
<url>http://repo.springsource.org/libs-milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>

<repository>
<id>cloudera</id>
<url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>

<repository>
<id>spring-snapshot</id>
<name>Spring Maven SNAPSHOT Repository</name>
<url>http://repo.springframework.org/snapshot</url>
</repository>
</repositories>
</project>
Best Regards,
Christian.

-------- Original-Nachricht --------
> Datum: Tue, 12 Feb 2013 16:56:50 +0100
> Von: Christian Schneider <[EMAIL PROTECTED]>
> An: [EMAIL PROTECTED]
> Betreff: Fwd: NullPointerException in Spring Data Hadoop with CDH4

> ---------- Forwarded message ----------
> From: Costin Leau <[EMAIL PROTECTED]>
> Date: 2013/2/12
> Subject: Re: NullPointerException in Spring Data Hadoop with CDH4
> To: [EMAIL PROTECTED]
>
>
> Hi,
>
> For Spring Data Hadoop problems, it's best to use the designated forum