You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pylucene-dev@lucene.apache.org by Ben DeMott <be...@gmail.com> on 2013/11/25 21:14:57 UTC
Lucene 4.5.1 Spatial
Greetings,
I am unable to build py-lucene 4.5.1-1 with the optional "spatial" jar...
When I uncomment the line:
JARS+=$(SPATIAL_JAR) # spatial lucene
The build fails.
The dependency that is missing is downloaded by ant during the make process
to:
pylucene-4.5.1-1/lucene-java-4.5.1/lucene/spatial/lib/spatial4j-0.3.jar
I noticed the problem was mentioned before on the list here:
dmail-archives.apache.org/mod_mbox/lucene-pylucene-dev/201308.mbox/<
0A6B8501-78AF-449D-B0DE-F8C5C246A8C9@gmail.com>
This is the exception I recieve:
While loading org/apache/lucene/spatial/prefix/tree/QuadPrefixTree
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File
"/usr/local/lib/python2.7/dist-packages/JCC-2.18-py2.7-linux-x86_64.egg/jcc/__main__.py",
line 107, in <module>
cpp.jcc(sys.argv)
File
"/usr/local/lib/python2.7/dist-packages/JCC-2.18-py2.7-linux-x86_64.egg/jcc/cpp.py",
line 583, in jcc
cls = findClass(className.replace('.', '/'))
File
"/usr/local/lib/python2.7/dist-packages/JCC-2.18-py2.7-linux-x86_64.egg/jcc/cpp.py",
line 73, in findClass
cls = _findClass(className)
jcc.cpp.JavaError: java.lang.NoClassDefFoundError:
com/spatial4j/core/shape/Shape
Java stacktrace:
java.lang.NoClassDefFoundError: com/spatial4j/core/shape/Shape
Caused by: java.lang.ClassNotFoundException: com.spatial4j.core.shape.Shape
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
Re: Lucene 4.5.1 Spatial
Posted by Andi Vajda <va...@apache.org>.
Hi Ben,
> On Nov 25, 2013, at 17:14, Ben DeMott <be...@gmail.com> wrote:
>
> Greetings,
>
> I am unable to build py-lucene 4.5.1-1 with the optional "spatial" jar...
> When I uncomment the line:
> JARS+=$(SPATIAL_JAR) # spatial lucene
> The build fails.
>
> The dependency that is missing is downloaded by ant during the make process
> to:
> pylucene-4.5.1-1/lucene-java-4.5.1/lucene/spatial/lib/spatial4j-0.3.jar
>
> I noticed the problem was mentioned before on the list here:
> dmail-archives.apache.org/mod_mbox/lucene-pylucene-dev/201308.mbox/<
> 0A6B8501-78AF-449D-B0DE-F8C5C246A8C9@gmail.com>
>
> This is the exception I recieve:
>
> While loading org/apache/lucene/spatial/prefix/tree/QuadPrefixTree
> Traceback (most recent call last):
> File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
> "__main__", fname, loader, pkg_name)
> File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
> exec code in run_globals
> File
> "/usr/local/lib/python2.7/dist-packages/JCC-2.18-py2.7-linux-x86_64.egg/jcc/__main__.py",
> line 107, in <module>
> cpp.jcc(sys.argv)
> File
> "/usr/local/lib/python2.7/dist-packages/JCC-2.18-py2.7-linux-x86_64.egg/jcc/cpp.py",
> line 583, in jcc
> cls = findClass(className.replace('.', '/'))
> File
> "/usr/local/lib/python2.7/dist-packages/JCC-2.18-py2.7-linux-x86_64.egg/jcc/cpp.py",
> line 73, in findClass
> cls = _findClass(className)
> jcc.cpp.JavaError: java.lang.NoClassDefFoundError:
> com/spatial4j/core/shape/Shape
You might need to pass the spatial4j jar file to jcc via --classpath so that it can find that class.
Andi..
> Java stacktrace:
> java.lang.NoClassDefFoundError: com/spatial4j/core/shape/Shape
> Caused by: java.lang.ClassNotFoundException: com.spatial4j.core.shape.Shape
> at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)