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 Rishabh Patel <ri...@gmail.com> on 2016/06/29 06:11:38 UTC

Pylucence source code

Hello,

I was trying to search for the Pylucene source code, but could not find any
links on the site. Could anybody please provide me with the git/svn url.

Thanks.

-- 
*Rishabh*

In Pylucene using Apache Tika, with jnius.

Posted by Antony <an...@gmail.com>.
Hi all,

When i run this Apache tika with jnius sample code, it works.

import os
os.environ['CLASSPATH'] = "tika-app-1.7.jar"
from jnius import autoclass
## Import the Java classes we are going to need
Tika = autoclass('org.apache.tika.Tika')
Metadata = autoclass('org.apache.tika.metadata.Metadata')
FileInputStream = autoclass('java.io.FileInputStream')
tika = Tika()
meta = Metadata()
text = tika.parseToString(FileInputStream("test.pdf"), meta)

But when I trying to use Apache Tika with jnius in my lucene code. I am 
getting "JVM failed to start" error.

Any help?


C:\Users\build>python
Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit 
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
 >>> import lucene
 >>> lucene.initVM(lucene.CLASSPATH)
<jcc.JCCEnv object at 0x02FF10A0>
 >>> import jnius
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "build\bdist.win32\egg\jnius\__init__.py", line 13, in <module>
   File "build\bdist.win32\egg\jnius\reflect.py", line 14, in <module>
   File "F:\Python27\lib\site-packages\six.py", line 808, in __new__
     return meta(name, bases, d)
   File "jnius\jnius_export_class.pxi", line 43, in 
jnius.MetaJavaClass.__new__ (jnius\jnius.c:16955)
   File "jnius\jnius_export_class.pxi", line 65, in 
jnius.MetaJavaClass.resolve_class (jnius\jnius.c:17342)
   File "jnius\jnius_env.pxi", line 11, in jnius.get_jnienv 
(jnius\jnius.c:3162)
   File "jnius\jnius_jvm_desktop.pxi", line 55, in 
jnius.get_platform_jnienv (jnius\jnius.c:3093)
   File "jnius\jnius_jvm_desktop.pxi", line 49, in jnius.create_jnienv 
(jnius\jnius.c:3019)
SystemError: JVM failed to start
 >>>

Regards

Antony


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Pylucence source code

Posted by Alexander Yaworsky <al...@gmail.com>.
http://lucene.apache.org/pylucene/version_control.html

http://svn.apache.org/repos/asf/lucene/pylucene/


2016-06-29 13:11 GMT+07:00 Rishabh Patel <ri...@gmail.com>:
> Hello,
>
> I was trying to search for the Pylucene source code, but could not find any
> links on the site. Could anybody please provide me with the git/svn url.
>
> Thanks.
>
> --
> *Rishabh*