couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Jelsma <markus.jel...@buyways.nl>
Subject RE: Re: CouchDB-Lucene, getting it running
Date Wed, 20 Jan 2010 01:05:14 GMT
Patrick,

 

 

It works! I assumed i already used Sun's JRE so i didn't pay much attention to the note in
the readme, how silly. It seems that gij was installed, and it took over /etc/alternatives
and even kept working after a `thorough` apt-get purge!

 

After linking /etc/alternatives/java to /usr/lib/jvm/sun-java-6/jre/bin/java Maven finally
didn't complain. Perhaps mentioning this conflict in the readme would be a good idea, it surely
cost me quite some time.

 

 

Cheers,


 
-----Original message-----
From: Patrick Barnes <mrtrick@gmail.com>
Sent: Wed 20-01-2010 00:24
To: user@couchdb.apache.org; markus@buyways.nl; 
Subject: Re: CouchDB-Lucene, getting it running


I have run into similar problems.before... in your logs I can see a bunch of references to
'gcj'.

I suggest you install the Sun Java JDK and make sure maven is using it...That should hopefully
fix your issue.

The incompatibility doesn't appear to be in couchdb-lucene, but in the maven testing framework. 

-Patrick

 
On 20/01/2010 9:34 AM, "Markus Jelsma" <markus@buyways.nl> wrote:

Hello,





I have some failed attempts in getting it all up and running. I have tried
the following:



1. Using the couchdb-lucene-0.4-jar-with-dependencies.jar.gz file

Getting it running didn't do the job, the readme's on github mention a
bin/run which i don't seem to find, the same goes for the external python
program. Nevertheless, i did get it running by using the following CouchDB
configuration:



[external]
fti=/usr/bin/java -Dcouchdb.lucene.dir=/var/lib/couchdb-lucene -jar
/usr/local/lib/couchdb/lucene/couchdb-lucene-0.4-jar-with-dependencies.jar
-search

[update_notification]
indexer=/usr/bin/java -Dcouchdb.lucene.dir=/var/lib/couchdb-lucene -jar
/usr/local/lib/couchdb/lucene/couchdb-lucene-0.4-jar-with-dependencies.jar
 -index

[httpd_db_handlers]
_fti = {couch_httpd_external, handle_external_req, <<"fti">>}

Of course the data directory was writable. It did, however, fail in the
end but Java was taking CPU time for sure but it never wrote a single byte
anywhere. Issuing a query returned a CoucDB-Lucene not available error,
which comes from
http://github.com/rnewson/couchdb-lucene/blob/b258c33c956126a130d2b90effc106668f54879e/src/main/java/com/github/rnewson/couchdb/lucene/Search.java







The second attempt was with Maven following the readme on the github
(after i cleaned the previous mess), but different approaches and sources
(either cloning with git or the 0.4 tgz) failed as well with Maven
spitting out the following messages:







[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 17 source files to
/usr/local/lib/couchdb-lucene/rnewson-couchdb-lucene-e0d8130/target/classes
[INFO] [resources:testResources {execution: default-testResources}]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] Copying 14 resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Compiling 5 source files to
/usr/local/lib/couchdb-lucene/rnewson-couchdb-lucene-e0d8130/target/test-classes
[INFO] [surefire:test {execution: default-test}]
[INFO] Surefire report directory:
/usr/local/lib/couchdb-lucene/rnewson-couchdb-lucene-e0d8130/target/surefire-reports
org.apache.maven.surefire.booter.SurefireExecutionException: Unable to
create test class 'org.apache.nutch.analysis.lang.LanguageIdentifierTest';
nested exception is java.lang.ClassNotFoundException:
org.apache.nutch.analysis.lang.LanguageIdentifierTest not found in
gnu.gcj.runtime.SystemClassLoader{urls=[file:/tmp/surefirebooterc2s5jv.jar],
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}; nested
exception is org.apache.maven.surefire.testset.TestSetFailedException:
Unable to create test class
'org.apache.nutch.analysis.lang.LanguageIdentifierTest'; nested exception
is java.lang.ClassNotFoundException:
org.apache.nutch.analysis.lang.LanguageIdentifierTest not found in
gnu.gcj.runtime.SystemClassLoader{urls=[file:/tmp/surefirebooterc2s5jv.jar],
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
org.apache.maven.surefire.testset.TestSetFailedException: Unable to create
test class 'org.apache.nutch.analysis.lang.LanguageIdentifierTest'; nested
exception is java.lang.ClassNotFoundException:
org.apache.nutch.analysis.lang.LanguageIdentifierTest not found in
gnu.gcj.runtime.SystemClassLoader{urls=[file:/tmp/surefirebooterc2s5jv.jar],
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
java.lang.ClassNotFoundException:
org.apache.nutch.analysis.lang.LanguageIdentifierTest not found in
gnu.gcj.runtime.SystemClassLoader{urls=[file:/tmp/surefirebooterc2s5jv.jar],
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
  at java.net.URLClassLoader.findClass(libgcj.so.10)
  at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.10)
  at java.lang.ClassLoader.loadClass(libgcj.so.10)
  at java.lang.ClassLoader.loadClass(libgcj.so.10)
  at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(AbstractDirectoryTestSuite.java:87)
  at
org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:209)
  at org.apache.maven.surefire.Surefire.run(Surefire.java:156)
  at java.lang.reflect.Method.invoke(libgcj.so.10)
  at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
  at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)








Or:







[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO]

You must specify at least one goal or lifecycle phase to perform build steps.
The following list illustrates some commonly used build commands:

 mvn clean
   Deletes any build output (e.g. class files or JARs).
 mvn test
   Runs the unit tests for the project.
 mvn install
   Copies the project artifacts into your local repository.
 mvn deploy
   Copies the project artifacts into the remote repository.
 mvn site
   Creates project documentation (e.g. reports or Javadoc).

Please see
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
for a complete description of available lifecycle phases.







Or:







[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[INFO] Building CouchDB Lucene
[INFO]    task-segment: [assembly:assembly] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] Preparing assembly:assembly
[INFO]
------------------------------------------------------------------------
[INFO] Building CouchDB Lucene
[INFO]
------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
/usr/local/lib/couchdb-lucene/src/main/resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 29 source files to
/usr/local/lib/couchdb-lucene/target/classes
[INFO] [resources:testResources {execution: default-testResources}]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] Copying 4 resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Compiling 5 source files to
/usr/local/lib/couchdb-lucene/target/test-classes
[INFO] [surefire:test {execution: default-test}]
[INFO] Surefire report directory:
/usr/local/lib/couchdb-lucene/target/surefire-reports
org.apache.maven.surefire.booter.SurefireExecutionException: Unable to
create test class
'com.github.rnewson.couchdb.lucene.CustomQueryParserTest'; nested
exception is java.lang.ClassNotFoundException:
com.github.rnewson.couchdb.lucene.CustomQueryParserTest not found in
gnu.gcj.runtime.SystemClassLoader{urls=[file:/tmp/surefirebooter5e47ab.jar],
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}; nested
exception is org.apache.maven.surefire.testset.TestSetFailedException:
Unable to create test class
'com.github.rnewson.couchdb.lucene.CustomQueryParserTest'; nested
exception is java.lang.ClassNotFoundException:
com.github.rnewson.couchdb.lucene.CustomQueryParserTest not found in
gnu.gcj.runtime.SystemClassLoader{urls=[file:/tmp/surefirebooter5e47ab.jar],
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
org.apache.maven.surefire.testset.TestSetFailedException: Unable to create
test class 'com.github.rnewson.couchdb.lucene.CustomQueryParserTest';
nested exception is java.lang.ClassNotFoundException:
com.github.rnewson.couchdb.lucene.CustomQueryParserTest not found in
gnu.gcj.runtime.SystemClassLoader{urls=[file:/tmp/surefirebooter5e47ab.jar],
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
java.lang.ClassNotFoundException:
com.github.rnewson.couchdb.lucene.CustomQueryParserTest not found in
gnu.gcj.runtime.SystemClassLoader{urls=[file:/tmp/surefirebooter5e47ab.jar],
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
  at java.net.URLClassLoader.findClass(libgcj.so.10)
  at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.10)
  at java.lang.ClassLoader.loadClass(libgcj.so.10)
  at java.lang.ClassLoader.loadClass(libgcj.so.10)
  at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(AbstractDirectoryTestSuite.java:87)
  at
org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:209)
  at org.apache.maven.surefire.Surefire.run(Surefire.java:156)
  at java.lang.reflect.Method.invoke(libgcj.so.10)
  at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
  at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)







Maven told me to look for
/usr/local/lib/couchdb-lucene/rnewson-couchdb-lucene-e0d8130/target/surefire-reports
for the individual test results, but, how typical, that file doesn't
exist! The classes and test-classes directories, however, where present.



This machine is running the latest Ubuntu and already has working CouchDB
and Solr instances happily running. I therefore assumed installing Maven2
using apt-get install maven2 would do the job on a fresh cloned checkout:

  1. Install Maven 2.
  2. checkout repository
  3. type 'mvn'
  4. configure couchdb (see below)

Can someone please shed some light on this mystery so i and anyone else
stumbling on this thread will know how to continue the installation?




Cheers,



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message