You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cassandra.apache.org by Curt Micol <as...@gmail.com> on 2009/08/08 23:55:02 UTC

Build Failed

I decided to update to latest trunk, and run tests (had only a couple
of minutes to tinker on the laptop), I got this:

[dragn:~/src/svn/cassandra]$ ant test
Buildfile: build.xml

build-subprojects:

init:
    [mkdir] Created dir: /Users/cbm/src/svn/cassandra/build/classes
    [mkdir] Created dir:
/Users/cbm/src/svn/cassandra/build/test/classes
    [mkdir] Created dir: /Users/cbm/src/svn/cassandra/src/gen-java

check-gen-cli-grammar:

gen-cli-grammar:
     [echo] Building Grammar
/Users/cbm/src/svn/cassandra/src/java/org/apache/cassandra/cli/Cli.g
....

check-gen-cql-grammar:

gen-cql-grammar:
     [echo] Building Grammar
/Users/cbm/src/svn/cassandra/src/java/org/apache/cassandra/cql/compiler/parse/Cql.g
 ....

build-project:
     [echo] apache-cassandra-incubating:
/Users/cbm/src/svn/cassandra/build.xml
    [javac] Compiling 289 source files to
/Users/cbm/src/svn/cassandra/build/classes
    [javac] /Users/cbm/src/svn/cassandra/src/java/org/apache/cassandra/cli/CliClient.java:45:
cannot access org.apache.thrift.TException
    [javac] bad class file:
/Users/cbm/src/svn/cassandra/lib/libthrift.jar(org/apache/thrift/TException.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]     public void executeCLIStmt(String stmt) throws
TException, NotFoundException, InvalidRequestException,
UnavailableException
    [javac]                                                    ^
    [javac] 1 error

BUILD FAILED
/Users/cbm/src/svn/cassandra/build.xml:139: Compile failed; see the
compiler error output for details.

Total time: 4 seconds

This is on a clean checkout.

Just wanted to report, I don't know java at all, so if I am missing
something obvious I apologize.

-- 
# Curt Micol

Re: Build Failed

Posted by Mark McBride <ma...@gmail.com>.
Sorry, should have given a bit more background.  The an command is
just a shell script that sets up a Java environment and runs it.  vi
`which ant` will pull it up for you.

On Sun, Aug 9, 2009 at 4:48 AM, Curt Micol<as...@gmail.com> wrote:
> On Sat, Aug 8, 2009 at 7:48 PM, Mark McBride<ma...@gmail.com> wrote:
>> Ant does weird things with this sometimes.  Which OS is this running
>> on?  Look at your ant script... it may be calling scripts that
>> override your default environment, e.g. this snippet in the ant script
>>
>>  Darwin*) darwin=true
>>           if [ -z "$JAVA_HOME" ] ; then
>>             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
>>           fi
>>           ;;
>
> Sorry, I am not sure which "ant script" you are referring, but this
> lead me to a solution. On Mac OS X there's this:
> /System/Library/Frameworks/JavaVM.framework/Home which points to:
> /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
>
> CurrentJDK is a symlink to the version, in the default case 1.5. I
> just slipped this to 1.6 and now everything builds like normal.
>
> Hopefully this will assist others in the future.
>
> Thanks for your help,
>
> --
> # Curt Micol
>

Re: Build Failed

Posted by Curt Micol <as...@gmail.com>.
On Sat, Aug 8, 2009 at 7:48 PM, Mark McBride<ma...@gmail.com> wrote:
> Ant does weird things with this sometimes.  Which OS is this running
> on?  Look at your ant script... it may be calling scripts that
> override your default environment, e.g. this snippet in the ant script
>
>  Darwin*) darwin=true
>           if [ -z "$JAVA_HOME" ] ; then
>             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
>           fi
>           ;;

Sorry, I am not sure which "ant script" you are referring, but this
lead me to a solution. On Mac OS X there's this:
/System/Library/Frameworks/JavaVM.framework/Home which points to:
/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home

CurrentJDK is a symlink to the version, in the default case 1.5. I
just slipped this to 1.6 and now everything builds like normal.

Hopefully this will assist others in the future.

Thanks for your help,

-- 
# Curt Micol

Re: Build Failed

Posted by Mark McBride <ma...@gmail.com>.
Ant does weird things with this sometimes.  Which OS is this running
on?  Look at your ant script... it may be calling scripts that
override your default environment, e.g. this snippet in the ant script

  Darwin*) darwin=true
           if [ -z "$JAVA_HOME" ] ; then
             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
           fi
           ;;

   ---Mark

On Sat, Aug 8, 2009 at 4:39 PM, Curt Micol<as...@gmail.com> wrote:
> On Sat, Aug 8, 2009 at 7:13 PM, Michael Greene<mi...@gmail.com> wrote:
>> This is what happens when you compile using Java 1.5. Cassandra requires
>> Java 1.6+. You can either setup JAVA_HOME or setup your system preferences
>> to point to a supported version of Java.
>
> Interesting, I've never had issue with this before:
>
> [dragn:~/src/svn/cassandra]$ echo $PATH
> /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin:/opt/local/bin:/Users/cbm/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
> [dragn:~/src/svn/cassandra]$ echo $JAVA_HOME
> /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
>
> But sure enough, ant is using Java 1.5:
>
> [dragn:~/src/svn/cassandra]$ ant -v
> Apache Ant version 1.7.0 compiled on May 21 2009
> Buildfile: build.xml
> Detected Java version: 1.5 in:
> /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
> Detected OS: Mac OS X
>
> Any ideas how to get this to hit 1.6? Like I mentioned, when I setup
> the PATH and JAVA_HOME I had no issue, and none since (I've probably
> ran 'ant test' once a week for 3-4 weeks now).  I am curious how ant
> suddenly wouldn't use my env.
>
> Thanks for your help,
>
> --
> # Curt Micol
>

Re: Build Failed

Posted by Curt Micol <as...@gmail.com>.
On Sat, Aug 8, 2009 at 7:13 PM, Michael Greene<mi...@gmail.com> wrote:
> This is what happens when you compile using Java 1.5. Cassandra requires
> Java 1.6+. You can either setup JAVA_HOME or setup your system preferences
> to point to a supported version of Java.

Interesting, I've never had issue with this before:

[dragn:~/src/svn/cassandra]$ echo $PATH
/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin:/opt/local/bin:/Users/cbm/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
[dragn:~/src/svn/cassandra]$ echo $JAVA_HOME
/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home

But sure enough, ant is using Java 1.5:

[dragn:~/src/svn/cassandra]$ ant -v
Apache Ant version 1.7.0 compiled on May 21 2009
Buildfile: build.xml
Detected Java version: 1.5 in:
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
Detected OS: Mac OS X

Any ideas how to get this to hit 1.6? Like I mentioned, when I setup
the PATH and JAVA_HOME I had no issue, and none since (I've probably
ran 'ant test' once a week for 3-4 weeks now).  I am curious how ant
suddenly wouldn't use my env.

Thanks for your help,

-- 
# Curt Micol

Re: Build Failed

Posted by Michael Greene <mi...@gmail.com>.
This is what happens when you compile using Java 1.5. Cassandra  
requires Java 1.6+. You can either setup JAVA_HOME or setup your  
system preferences to point to a supported version of Java.

Michael



On Aug 8, 2009, at 5:55 PM, Curt Micol <as...@gmail.com> wrote:

> I decided to update to latest trunk, and run tests (had only a couple
> of minutes to tinker on the laptop), I got this:
>
> [dragn:~/src/svn/cassandra]$ ant test
> Buildfile: build.xml
>
> build-subprojects:
>
> init:
>    [mkdir] Created dir: /Users/cbm/src/svn/cassandra/build/classes
>    [mkdir] Created dir:
> /Users/cbm/src/svn/cassandra/build/test/classes
>    [mkdir] Created dir: /Users/cbm/src/svn/cassandra/src/gen-java
>
> check-gen-cli-grammar:
>
> gen-cli-grammar:
>     [echo] Building Grammar
> /Users/cbm/src/svn/cassandra/src/java/org/apache/cassandra/cli/Cli.g
> ....
>
> check-gen-cql-grammar:
>
> gen-cql-grammar:
>     [echo] Building Grammar
> /Users/cbm/src/svn/cassandra/src/java/org/apache/cassandra/cql/ 
> compiler/parse/Cql.g
> ....
>
> build-project:
>     [echo] apache-cassandra-incubating:
> /Users/cbm/src/svn/cassandra/build.xml
>    [javac] Compiling 289 source files to
> /Users/cbm/src/svn/cassandra/build/classes
>    [javac] /Users/cbm/src/svn/cassandra/src/java/org/apache/ 
> cassandra/cli/CliClient.java:45:
> cannot access org.apache.thrift.TException
>    [javac] bad class file:
> /Users/cbm/src/svn/cassandra/lib/libthrift.jar(org/apache/thrift/ 
> TException.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]     public void executeCLIStmt(String stmt) throws
> TException, NotFoundException, InvalidRequestException,
> UnavailableException
>    [javac]                                                    ^
>    [javac] 1 error
>
> BUILD FAILED
> /Users/cbm/src/svn/cassandra/build.xml:139: Compile failed; see the
> compiler error output for details.
>
> Total time: 4 seconds
>
> This is on a clean checkout.
>
> Just wanted to report, I don't know java at all, so if I am missing
> something obvious I apologize.
>
> -- 
> # Curt Micol