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 Truffe Hugo <hu...@gmail.com> on 2009/09/17 23:06:43 UTC
Problems in Pylucene and JCC
I could change some things, but I stay here.
G:\Solr\pylucene-2.4.1-1>make install
c:\Python25\python.exe -m jcc --shared --jar
lucene-java-2.4.1/build/lucene-core
-2.4.1.jar --jar
lucene-java-2.4.1/build/contrib/snowball/lucene-snowball-2.4.1.
jar --jar
lucene-java-2.4.1/build/contrib/highlighter/lucene-highlighter-2.4.1.j
ar --jar
lucene-java-2.4.1/build/contrib/analyzers/lucene-analyzers-2.4.1.jar --
jar lucene-java-2.4.1/build/contrib/regex/lucene-regex-2.4.1.jar --jar
lucene-ja
va-2.4.1/build/contrib/queries/lucene-queries-2.4.1.jar --jar
lucene-java-2.4.1/
build/contrib/instantiated/lucene-instantiated-2.4.1.jar --jar
build/jar/extensi
ons.jar --package java.lang java.lang.System java.lang.Runtime --package
java.ut
il java.util.Arrays java.text.SimpleDateFormat --package java.io
java.io.StringR
eader java.io.InputStreamReader java.io.FileInputStream --exclude
org.apache.luc
ene.queryParser.Token --exclude
org.apache.lucene.queryParser.TokenMgrError --ex
clude org.apache.lucene.queryParser.QueryParserTokenManager --exclude
org.apache
.lucene.queryParser.ParseException --python lucene --mapping
org.apache.lucene.d
ocument.Document 'get:(Ljava/lang/String;)Ljava/lang/String;' --mapping
java.uti
l.Properties 'getProperty:(Ljava/lang/String;)Ljava/lang/String;'
--sequence org
.apache.lucene.search.Hits 'length:()I'
'doc:(I)Lorg/apache/lucene/document/Docu
ment;' --version 2.4.1 --module python/collections.py --files 2 --install
Traceback (most recent call last):
File "c:\Python25\lib\runpy.py", line 95, in run_module
filename, loader, alter_sys)
File "c:\Python25\lib\runpy.py", line 52, in _run_module_code
mod_name, mod_fname, mod_loader)
File "c:\Python25\lib\runpy.py", line 32, in _run_code
exec code in run_globals
File
"c:\Python25\lib\site-packages\jcc-2.3-py2.5-win32.egg\jcc\__init__.py",
line 19, in <module>
from jcc.config import SHARED
File
"c:\python25\lib\site-packages\JCC-2.3-py2.5-win32.egg\jcc\__init__.py",
line 30, in <module>
from _jcc import initVM
ImportError: DLL load failed: Can not find the specified module
make: *** [install] Error -1
Re: Problems in Pylucene and JCC
Posted by Andi Vajda <va...@apache.org>.
On Thu, 17 Sep 2009, Truffe Hugo wrote:
> I could change some things, but I stay here.
>
> G:\Solr\pylucene-2.4.1-1>make install
> c:\Python25\python.exe -m jcc --shared --jar
> lucene-java-2.4.1/build/lucene-core
> -2.4.1.jar --jar
> lucene-java-2.4.1/build/contrib/snowball/lucene-snowball-2.4.1.
> jar --jar
> lucene-java-2.4.1/build/contrib/highlighter/lucene-highlighter-2.4.1.j
> ar --jar lucene-java-2.4.1/build/contrib/analyzers/lucene-analyzers-2.4.1.jar
> --
> jar lucene-java-2.4.1/build/contrib/regex/lucene-regex-2.4.1.jar --jar
> lucene-ja
> va-2.4.1/build/contrib/queries/lucene-queries-2.4.1.jar --jar
> lucene-java-2.4.1/
> build/contrib/instantiated/lucene-instantiated-2.4.1.jar --jar
> build/jar/extensi
> ons.jar --package java.lang java.lang.System java.lang.Runtime --package
> java.ut
> il java.util.Arrays java.text.SimpleDateFormat --package java.io
> java.io.StringR
> eader java.io.InputStreamReader java.io.FileInputStream --exclude
> org.apache.luc
> ene.queryParser.Token --exclude org.apache.lucene.queryParser.TokenMgrError
> --ex
> clude org.apache.lucene.queryParser.QueryParserTokenManager --exclude
> org.apache
> .lucene.queryParser.ParseException --python lucene --mapping
> org.apache.lucene.d
> ocument.Document 'get:(Ljava/lang/String;)Ljava/lang/String;' --mapping
> java.uti
> l.Properties 'getProperty:(Ljava/lang/String;)Ljava/lang/String;' --sequence
> org
> .apache.lucene.search.Hits 'length:()I'
> 'doc:(I)Lorg/apache/lucene/document/Docu
> ment;' --version 2.4.1 --module python/collections.py --files 2 --install
> Traceback (most recent call last):
> File "c:\Python25\lib\runpy.py", line 95, in run_module
> filename, loader, alter_sys)
> File "c:\Python25\lib\runpy.py", line 52, in _run_module_code
> mod_name, mod_fname, mod_loader)
> File "c:\Python25\lib\runpy.py", line 32, in _run_code
> exec code in run_globals
> File "c:\Python25\lib\site-packages\jcc-2.3-py2.5-win32.egg\jcc\__init__.py",
> line 19, in <module>
> from jcc.config import SHARED
> File "c:\python25\lib\site-packages\JCC-2.3-py2.5-win32.egg\jcc\__init__.py",
> line 30, in <module>
> from _jcc import initVM
> ImportError: DLL load failed: Can not find the specified module
> make: *** [install] Error -1
Do you have the directory containing the Java DLLs on your PATH ?
Do you have the directory containing libjcc.dll on your PATH ?
Do you have the directory containing the Python DLLs on your PATH ?
Andi..
Re: Problems in Pylucene and JCC
Posted by Truffe Hugo <hu...@gmail.com>.
That could make it run. Add this to __init__.py
"C:\Python25\Lib\site-packages\JCC-2.3-py2.5-win32.egg\jcc"
import os, sys
if sys.platform == 'win32':
from jcc.config import SHARED
if SHARED:
os.environ['PATH'] = r'C:\Archivos de
programa\Java\jdk1.6.0_07\jre\bin\client;' + os.environ['PATH']
path = os.environ['Path'].split(os.pathsep)
eggpath =
os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
if eggpath not in path:
path.insert(0, eggpath)
os.environ['Path'] = os.pathsep.join(path)
if __name__ == '__main__':
import jcc.__main__
else:
from _jcc import initVM
CLASSPATH=os.path.join(os.path.abspath(os.path.dirname(__file__)),
"classes")
Specifically, this was added:
os.environ['PATH'] = r'C:\Archivos de
programa\Java\jdk1.6.0_07\jre\bin\client;' + os.environ['PATH']
Here's the url if they want to look:
http://lists.osafoundation.org/pipermail/pylucene-dev/2008-February/002297.html
Thanks => Gracias (Un poco de Castellano jeje)
Christian Heimes escribió:
> Truffe Hugo wrote:
>
>> File
>> "c:\python25\lib\site-packages\JCC-2.3-py2.5-win32.egg\jcc\__init__.py",
>> line 30, in <module>
>> from _jcc import initVM
>> ImportError: DLL load failed: Can not find the specified module
>> make: *** [install] Error -1
>>
>
> Do you have the jvm.dll in your PATH?
>
> Christian
>
>
Re: Problems in Pylucene and JCC
Posted by Christian Heimes <li...@cheimes.de>.
Truffe Hugo wrote:
> File
> "c:\python25\lib\site-packages\JCC-2.3-py2.5-win32.egg\jcc\__init__.py",
> line 30, in <module>
> from _jcc import initVM
> ImportError: DLL load failed: Can not find the specified module
> make: *** [install] Error -1
Do you have the jvm.dll in your PATH?
Christian