4 messages in com.googlegroups.android-developers[android-developers] Re: Cannot use L...
FromSent OnAttachments
flix29 May 2008 09:38 
Mark Murphy29 May 2008 09:47 
flix29 May 2008 09:52 
Ahmet A. Akin29 May 2008 09:52 
Subject:[android-developers] Re: Cannot use Lucene with Android
From:flix (feli@web.de)
Date:05/29/2008 09:52:22 AM
List:com.googlegroups.android-developers

Thank you, it works now! I just had to do two little modifications to the Lucene souce code: 1. Delete "extends java.rmi.Remote" from the Class "org.apache.lucene.search.Searchable" 2. Delete class "org.apache.lucene.search.RemoteSearchable"

On 29 Mai, 18:48, "Mark Murphy" <mmur@commonsware.com> wrote:

I would like to use Apace Lucene, but this does not seem to work. I have created an Android project using Eclipse and added "lucene- core-2.3.2.jar" (from the recent Lucene package) to my project. This approach works for non-Android projects, but with Android I get an "InvocationTargetException" (cause: NoClassDefFoundError).

<snip>

DEBUG/dalvikvm(1361): NOTE: loadClass 'java.rmi.Remote' 0x400acd40 threw an exception WARN/dalvikvm(1361): Failed resolving Lorg/apache/lucene/search/ Searchable; interface 379 'Ljava/rmi/Remote;' WARN/dalvikvm(1361): Link of class 'Lorg/apache/lucene/search/ Searchable;' failed

I don't think Android has the java.rmi package.

If you examine the Lucene source code you can hopefully find the class (classes?) where they have the dependency on RMI. With luck, they won't be critical, and you can create your own hacked copy of the JAR with those classes removed.