Tools and Technologies used in this article :

  1. Apache Hadoop 2.2.0 Source codes

  2. Windows 7 OS

  3. Microsoft Windows SDK v7.1

  4. Maven 3.1.1

  5. Protocol Buffers 2.5.0

  6. Cygwin

  7. JDK 1.6

 

Problem

Windows SDK 7.1 Command Prompt
[ERROR] C:\hdfs\hadoop-common-project\hadoop-auth\src\test\java\org\apache\hadoop\security\authentication\client\AuthenticatorTestCase.java:[88,11] error: cannot access AbstractLifeCycle
[ERROR] class file for org.mortbay.component.AbstractLifeCycle not found
[ERROR] C:\hdfs\hadoop-common-project\hadoop-auth\src\test\java\org\apache\hadoop\security\authentication\client\AuthenticatorTestCase.java:[96,29] error: cannot access LifeCycle
[ERROR] class file for org.mortbay.component.LifeCycle not found
[ERROR] C:\hdfs\hadoop-common-project\hadoop-auth\src\test\java\org\apache\hadoop\security\authentication\client\AuthenticatorTestCase.java:[98,10] error: cannot find symbol
[ERROR] symbol: method start()
[ERROR] location: class org.mortbay.jetty.Server
Note : This issue exists in Mac, Windows and Linux OS. If "jetty-util" jar is already there in local Maven repository / cache then you may not encounter this issue.

 

Why?

Maven dependency jetty-util is missing in "<hadoop-src>hadoop-common-project/hadoop-auth/pom.xml" of Apache Hadoop 2.2.0 source distribution, used for Maven build. This issue is already reported in JIRA - HADOOP-10110.

 

Solution

Apply HADOOP-10110.patch or open "<hadoop-src>hadoop-common-project/hadoop-auth/pom.xml" and manually add the following maven dependency.

<dependency>
	<groupId>org.mortbay.jetty</groupId>
	<artifactId>jetty-util</artifactId>
	<scope>test</scope>
</dependency>

 

Download SrcCodes

hadoop-common-project/hadoop-auth/pom.xml: HADOOP-10110.patch

 

References