You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by royr <ro...@blixem.nl> on 2011/03/17 11:30:26 UTC

SOLR building problems

Hello,

The apache wiki gives me this information:

Skip this section if you have a binary distribution of Solr. These
instructions will building Solr from source, if you have a nightly tarball
or have checked out the trunk from subversion at
http://svn.apache.org/repos/asf/lucene/dev/trunk. Assumes that you have JDK
1.6 already installed.

In the source directory, run ant dist to build the .war file under dist.
Build the example for the Solr tutorial by running ant example. Change to
the 'example' directory, run java -jar start.jar and visit
localhost:8983/solr/admin to test that the example works with the Jetty
container. 

I have run this code: svn checkout
http://svn.apache.org/repos/asf/lucene/dev/trunk
After that i try the ant example commando. This doesn't work, i got the
following error message:

common.compile-core:
    [javac] Compiling 508 source files to
somedir/trunk/lucene/build/classes/java
    [javac] ----------
    [javac] 1. ERROR in
dir/trunk/lucene/src/java/org/apache/lucene/document/DateTools.java (at line
1)
    [javac]     package org.apache.lucene.document;
    [javac]     ^^
    [javac] The type Enum is not generic; it cannot be parameterized with
arguments 
    [javac] ----------
    [javac] 1 problem (1 error)

BUILD FAILED
somedir/trunk/solr/common-build.xml:249: The following error occurred while
executing this line:
somedir/trunk/lucene/contrib/contrib-build.xml:58: The following error
occurred while executing this line:
somedir/trunk/lucene/common-build.xml:296: The following error occurred
while executing this line:
somedir/trunk/lucene/common-build.xml:717: Compile failed; see the compiler
error output for details.

Ant is installed correctly i think: 
ant -version = Apache Ant(TM) version 1.8.2 compiled on December 20 2010

What goes wrong?




--
View this message in context: http://lucene.472066.n3.nabble.com/SOLR-building-problems-tp2692916p2692916.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: SOLR building problems

Posted by royr <ro...@blixem.nl>.
It works!! 

Ant was using an old java version from another directory. THANK you:)

--
View this message in context: http://lucene.472066.n3.nabble.com/SOLR-building-problems-tp2692916p2697973.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: SOLR building problems

Posted by Erick Erickson <er...@gmail.com>.
On Thu, Mar 17, 2011 at 10:05 AM, royr <ro...@blixem.nl> wrote:
> java version "1.6.0_21"
> Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
> Java HotSpot(TM) Server VM (build 17.0-b16, mixed mode)
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/SOLR-building-problems-tp2692916p2693574.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
Hmmm, then I'm puzzled. I was hoping it was something simple like you
weren't using the right Java version.

All I can say at this point is that lots of people (including me) are
compiling without any problem, your steps look correct and the error
*seems* to be related to somehow using an older Java compiler.

Is there any chance that you're using a different Java compiler than
you think, or you're somehow specifying that the compilation should be
compatible with an earlier version of Java?

Best
Erick

Re: SOLR building problems

Posted by royr <ro...@blixem.nl>.
java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
Java HotSpot(TM) Server VM (build 17.0-b16, mixed mode)


--
View this message in context: http://lucene.472066.n3.nabble.com/SOLR-building-problems-tp2692916p2693574.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: SOLR building problems

Posted by Erick Erickson <er...@gmail.com>.
What Java version do you have installed? (java -version)

Best
Erick

On Thu, Mar 17, 2011 at 6:30 AM, royr <ro...@blixem.nl> wrote:
> Hello,
>
> The apache wiki gives me this information:
>
> Skip this section if you have a binary distribution of Solr. These
> instructions will building Solr from source, if you have a nightly tarball
> or have checked out the trunk from subversion at
> http://svn.apache.org/repos/asf/lucene/dev/trunk. Assumes that you have JDK
> 1.6 already installed.
>
> In the source directory, run ant dist to build the .war file under dist.
> Build the example for the Solr tutorial by running ant example. Change to
> the 'example' directory, run java -jar start.jar and visit
> localhost:8983/solr/admin to test that the example works with the Jetty
> container.
>
> I have run this code: svn checkout
> http://svn.apache.org/repos/asf/lucene/dev/trunk
> After that i try the ant example commando. This doesn't work, i got the
> following error message:
>
> common.compile-core:
>    [javac] Compiling 508 source files to
> somedir/trunk/lucene/build/classes/java
>    [javac] ----------
>    [javac] 1. ERROR in
> dir/trunk/lucene/src/java/org/apache/lucene/document/DateTools.java (at line
> 1)
>    [javac]     package org.apache.lucene.document;
>    [javac]     ^^
>    [javac] The type Enum is not generic; it cannot be parameterized with
> arguments
>    [javac] ----------
>    [javac] 1 problem (1 error)
>
> BUILD FAILED
> somedir/trunk/solr/common-build.xml:249: The following error occurred while
> executing this line:
> somedir/trunk/lucene/contrib/contrib-build.xml:58: The following error
> occurred while executing this line:
> somedir/trunk/lucene/common-build.xml:296: The following error occurred
> while executing this line:
> somedir/trunk/lucene/common-build.xml:717: Compile failed; see the compiler
> error output for details.
>
> Ant is installed correctly i think:
> ant -version = Apache Ant(TM) version 1.8.2 compiled on December 20 2010
>
> What goes wrong?
>
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/SOLR-building-problems-tp2692916p2692916.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>