You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by Filipe Antunes <fa...@tecnica.cc> on 2009/04/20 12:00:15 UTC

Can't build Nutch

I Can't build Nutch with Ant.
My ant version is 1.7.1 and i'm on a Mac OS X 10.4 PowerPC
My java version is 1.5.0.

I can't figure out why i'm having the error "class file has wrong 
version 50.0, should be 49.0" ????

This is the result from ANT:

Buildfile: build.xml

init:
    [mkdir] Created dir: /usr/local/nutch-1.0/build
    [mkdir] Created dir: /usr/local/nutch-1.0/build/classes
    [mkdir] Created dir: /usr/local/nutch-1.0/build/test
    [mkdir] Created dir: /usr/local/nutch-1.0/build/test/classes
    [mkdir] Created dir: /usr/local/nutch-1.0/build/hadoop
    [unjar] Expanding: /usr/local/nutch-1.0/lib/hadoop-0.19.1-core.jar 
into /usr/local/nutch-1.0/build/hadoop
    [untar] Expanding: /usr/local/nutch-1.0/build/hadoop/bin.tgz into 
/usr/local/nutch-1.0/bin
    [mkdir] Created dir: /usr/local/nutch-1.0/build/webapps
    [unjar] Expanding: /usr/local/nutch-1.0/lib/hadoop-0.19.1-core.jar 
into /usr/local/nutch-1.0/build

compile-core:
    [javac] Compiling 232 source files to /usr/local/nutch-1.0/build/classes
    [javac] 
/usr/local/nutch-1.0/src/java/org/apache/nutch/analysis/AnalyzerFactory.java:29: 
cannot access org.apache.hadoop.conf.Configuration
    [javac] bad class file: 
/usr/local/nutch-1.0/lib/hadoop-0.19.1-core.jar(org/apache/hadoop/conf/Configuration.class)
    [javac] class file has wrong version 50.0, should be 49.0
    [javac] Please remove or make sure it appears in the correct 
subdirectory of the classpath.
    [javac] import org.apache.hadoop.conf.Configuration;
    [javac]                               ^
    [javac] 1 error

BUILD FAILED
/usr/local/nutch-1.0/build.xml:107: Compile failed; see the compiler 
error output for details.


Re: Can't build Nutch

Posted by Ken Krugler <kk...@transpac.com>.
>just use JDK 1.6 instead. That will be fine.

I ran into a similar issue recently. Since I'm still using 1.5 for 
some projects, it's my "base" version. But I have a number of 
projects (like Nutch) that now require 1.6, often due to dependencies 
on recent Hadoop builds.

So I have a trivial "j16" script that I can use to set JAVA_HOME 
correctly before running ant or other command line tools that will 
need Java 1.6:

==================================================================
#!/usr/bin/env bash
#
# Execute the passed command using Java 1.6

JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/

$*
==================================================================

Put this in your $PATH somewhere, make sure the execute bits are set 
on it, and then you can do:

j16 ant

-- Ken


>2009/4/20 Filipe Antunes <fa...@tecnica.cc>
>
>>  I Can't build Nutch with Ant.
>>  My ant version is 1.7.1 and i'm on a Mac OS X 10.4 PowerPC
>>  My java version is 1.5.0.
>>
>>  I can't figure out why i'm having the error "class file has wrong version
>>  50.0, should be 49.0" ????
>>
>>  This is the result from ANT:
>>
>>  Buildfile: build.xml
>>
>>  init:
>>    [mkdir] Created dir: /usr/local/nutch-1.0/build
>>    [mkdir] Created dir: /usr/local/nutch-1.0/build/classes
>>    [mkdir] Created dir: /usr/local/nutch-1.0/build/test
>>    [mkdir] Created dir: /usr/local/nutch-1.0/build/test/classes
>>    [mkdir] Created dir: /usr/local/nutch-1.0/build/hadoop
>>    [unjar] Expanding: /usr/local/nutch-1.0/lib/hadoop-0.19.1-core.jar into
>>  /usr/local/nutch-1.0/build/hadoop
>>    [untar] Expanding: /usr/local/nutch-1.0/build/hadoop/bin.tgz into
>>  /usr/local/nutch-1.0/bin
>>    [mkdir] Created dir: /usr/local/nutch-1.0/build/webapps
>>    [unjar] Expanding: /usr/local/nutch-1.0/lib/hadoop-0.19.1-core.jar into
>>  /usr/local/nutch-1.0/build
>>
>>  compile-core:
>>    [javac] Compiling 232 source files to /usr/local/nutch-1.0/build/classes
>>    [javac]
>> 
>>/usr/local/nutch-1.0/src/java/org/apache/nutch/analysis/AnalyzerFactory.java:29:
>>  cannot access org.apache.hadoop.conf.Configuration
>>    [javac] bad class file:
>> 
>>/usr/local/nutch-1.0/lib/hadoop-0.19.1-core.jar(org/apache/hadoop/conf/Configuration.class)
>>    [javac] class file has wrong version 50.0, should be 49.0
>>    [javac] Please remove or make sure it appears in the correct subdirectory
>>  of the classpath.
>>    [javac] import org.apache.hadoop.conf.Configuration;
>>    [javac]                               ^
>>    [javac] 1 error
>>
>>  BUILD FAILED
>>  /usr/local/nutch-1.0/build.xml:107: Compile failed; see the compiler error
>>  output for details.
>>
>>


-- 
Ken Krugler
+1 530-210-6378

Re: Can't build Nutch

Posted by yanky young <ya...@gmail.com>.
Hi:
just use JDK 1.6 instead. That will be fine.


2009/4/20 Filipe Antunes <fa...@tecnica.cc>

> I Can't build Nutch with Ant.
> My ant version is 1.7.1 and i'm on a Mac OS X 10.4 PowerPC
> My java version is 1.5.0.
>
> I can't figure out why i'm having the error "class file has wrong version
> 50.0, should be 49.0" ????
>
> This is the result from ANT:
>
> Buildfile: build.xml
>
> init:
>   [mkdir] Created dir: /usr/local/nutch-1.0/build
>   [mkdir] Created dir: /usr/local/nutch-1.0/build/classes
>   [mkdir] Created dir: /usr/local/nutch-1.0/build/test
>   [mkdir] Created dir: /usr/local/nutch-1.0/build/test/classes
>   [mkdir] Created dir: /usr/local/nutch-1.0/build/hadoop
>   [unjar] Expanding: /usr/local/nutch-1.0/lib/hadoop-0.19.1-core.jar into
> /usr/local/nutch-1.0/build/hadoop
>   [untar] Expanding: /usr/local/nutch-1.0/build/hadoop/bin.tgz into
> /usr/local/nutch-1.0/bin
>   [mkdir] Created dir: /usr/local/nutch-1.0/build/webapps
>   [unjar] Expanding: /usr/local/nutch-1.0/lib/hadoop-0.19.1-core.jar into
> /usr/local/nutch-1.0/build
>
> compile-core:
>   [javac] Compiling 232 source files to /usr/local/nutch-1.0/build/classes
>   [javac]
> /usr/local/nutch-1.0/src/java/org/apache/nutch/analysis/AnalyzerFactory.java:29:
> cannot access org.apache.hadoop.conf.Configuration
>   [javac] bad class file:
> /usr/local/nutch-1.0/lib/hadoop-0.19.1-core.jar(org/apache/hadoop/conf/Configuration.class)
>   [javac] class file has wrong version 50.0, should be 49.0
>   [javac] Please remove or make sure it appears in the correct subdirectory
> of the classpath.
>   [javac] import org.apache.hadoop.conf.Configuration;
>   [javac]                               ^
>   [javac] 1 error
>
> BUILD FAILED
> /usr/local/nutch-1.0/build.xml:107: Compile failed; see the compiler error
> output for details.
>
>

Re: Can't build Nutch

Posted by "David M. Cole" <dm...@colegroup.com>.
At 11:00 AM +0100 4/20/09, Filipe Antunes wrote:
>My ant version is 1.7.1 and i'm on a Mac OS X 10.4 PowerPC
>My java version is 1.5.0.

You do need 1.6 for Nutch, but it's difficult to find Java 1.6 for 
10.4 PPC ... Apple doesn't officially support it ... but if you 
Google around, you can find an installer.

\dmc

-- 
*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
    David M. Cole                                            dmc@colegroup.com
    Editor & Publisher, NewsInc. <http://newsinc.net>        V: (650) 557-2993
    Consultant: The Cole Group <http://colegroup.com/>       F: (650) 475-8479
*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+