Discussion:
build pyLucene 4.10.1-1
Márk Csaba
2014-10-09 17:09:54 UTC
Permalink
Hello List,

 
Im trying to build the 4.10.1-1 pyLucene and I got some errors.

 
The details:

$ java -version

java version "1.7.0_67"

Java(TM) SE Runtime Environment (build 1.7.0_67-b01)

Java HotSpot(TM) Server VM (build 24.65-b04, mixed mode)

$ ant -version

Apache Ant(TM) version 1.9.4 compiled on April 29 2014

$ /usr/local/bin/python -V

Python 2.6.8

 
The system is a RHEL5.5 32-bit.

 
The Makefile:

PREFIX_PYTHON=/usr/local

ANT=ant

PYTHON=$(PREFIX_PYTHON)/bin/python

JCC=$(PYTHON) -m jcc.__main__

NUM_FILES=8

 
Through the make I got many warnings like this:

[javac] case 56: break;

[javac] ^

[javac] /usr/src/pylucene-4.10.1-1/lucene-java-4.10.1/lucene/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.java:30446: warning: [fallthrough] possible fall-through into case

 
A lot of warnings like this:

[javac] /usr/src/pylucene-4.10.1-1/lucene-java-4.10.1/lucene/analysis/common/src/java/org/apache/lucene/analysis/nl/DutchStemmer.java:408: warning: [rawtypes] found raw type: Map

[javac] void setStemDictionary(Map dict) {

[javac] ^

[javac] missing type arguments for generic class Map<K,V>

[javac] where K,V are type-variables:

[javac] K extends Object declared in interface Map

[javac] V extends Object declared in interface Map

 
But it compiles.

 
My problem is with make test. I got exceptions like this:

/usr/local/bin/python test/test_PythonDirectory.py

ETesting Indexing Incremental Looping

indexing 0

EEEEEEEEE

======================================================================

ERROR: test_FieldEnumeration (__main__.PythonDirectoryTests)

----------------------------------------------------------------------

Traceback (most recent call last):

File "/usr/src/pylucene-4.10.1-1/test/test_PyLucene.py", line 235, in test_FieldEnumeration

self.test_indexDocument()

File "/usr/src/pylucene-4.10.1-1/test/test_PyLucene.py", line 84, in test_indexDocument

self.closeStore(store, writer)

File "test/test_PythonDirectory.py", line 281, in closeStore

arg.close()

JavaError: java.lang.RuntimeException: InvalidArgsError

Java stacktrace:

java.lang.RuntimeException: InvalidArgsError

at org.apache.pylucene.store.PythonDirectory.deleteFile(Native Method)

at org.apache.lucene.index.IndexFileDeleter.deleteFile(IndexFileDeleter.java:723)

at org.apache.lucene.index.IndexFileDeleter.deleteNewFiles(IndexFileDeleter.java:710)

at org.apache.lucene.index.IndexWriter.deleteNewFiles(IndexWriter.java:4753)

at org.apache.lucene.index.DocumentsWriter$DeleteNewFilesEvent.process(DocumentsWriter.java:737)

at org.apache.lucene.index.IndexWriter.processEvents(IndexWriter.java:4807)

at org.apache.lucene.index.IndexWriter.processEvents(IndexWriter.java:4799)

at org.apache.lucene.index.IndexWriter.doFlush(IndexWriter.java:3226)

at org.apache.lucene.index.IndexWriter.flush(IndexWriter.java:3198)

at org.apache.lucene.index.IndexWriter.shutdown(IndexWriter.java:907)

at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:984)

at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:954)

 
I have 10 failed tests with InvalidArgsError and I have 1 failed test with error:

/usr/local/bin/python test/test_PythonException.py

E

======================================================================

ERROR: testThroughLayerException (__main__.PythonExceptionTestCase)

----------------------------------------------------------------------

Traceback (most recent call last):

File "test/test_PythonException.py", line 35, in testThroughLayerException

if lucene.getVMEnv().isShared():

AttributeError: 'jcc.JCCEnv' object has no attribute 'isShared'

 
----------------------------------------------------------------------

Ran 1 test in 0.003s

 
FAILED (errors=1)

 
JCC compiles without errors and with only one type of warning:

cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++

 
Can someone tell me what did I wrong?

Any suggestions would be appreciated.

 
Thanks,

Csaba
Andi Vajda
2014-10-09 19:41:02 UTC
Permalink
Post by Márk Csaba
Hello List,
?? Im trying to build the 4.10.1-1 pyLucene and I got some errors.
Post by Márk Csaba
$ java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) Server VM (build 24.65-b04, mixed mode)
$ ant -version
Apache Ant(TM) version 1.9.4 compiled on April 29 2014
$ /usr/local/bin/python -V
Python 2.6.8
?? The system is a RHEL5.5 32-bit.
Post by Márk Csaba
PREFIX_PYTHON=/usr/local
ANT=ant
PYTHON=$(PREFIX_PYTHON)/bin/python
JCC=$(PYTHON) -m jcc.__main__
NUM_FILES=8
[javac] case 56: break;
[javac] ^
[javac] /usr/src/pylucene-4.10.1-1/lucene-java-4.10.1/lucene/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.java:30446: warning: [fallthrough] possible fall-through into case
These are ignorable javac errors. If you prefer not to, you should contact
the lucene developer list at ***@lucene.apache.org.

... snip ...
?? But it compiles.
Post by Márk Csaba
/usr/local/bin/python test/test_PythonDirectory.py
ETesting Indexing Incremental Looping
indexing 0
EEEEEEEEE
I suspect that you have another older installation of PyLucene or JCC that is
being picked up, maybe ?

Did you run make install before running tests (you shouldn't have to) ?

Andi..
Post by Márk Csaba
======================================================================
ERROR: test_FieldEnumeration (__main__.PythonDirectoryTests)
----------------------------------------------------------------------
File "/usr/src/pylucene-4.10.1-1/test/test_PyLucene.py", line 235, in test_FieldEnumeration
self.test_indexDocument()
File "/usr/src/pylucene-4.10.1-1/test/test_PyLucene.py", line 84, in test_indexDocument
self.closeStore(store, writer)
File "test/test_PythonDirectory.py", line 281, in closeStore
arg.close()
JavaError: java.lang.RuntimeException: InvalidArgsError
java.lang.RuntimeException: InvalidArgsError
at org.apache.pylucene.store.PythonDirectory.deleteFile(Native Method)
at org.apache.lucene.index.IndexFileDeleter.deleteFile(IndexFileDeleter.java:723)
at org.apache.lucene.index.IndexFileDeleter.deleteNewFiles(IndexFileDeleter.java:710)
at org.apache.lucene.index.IndexWriter.deleteNewFiles(IndexWriter.java:4753)
at org.apache.lucene.index.DocumentsWriter$DeleteNewFilesEvent.process(DocumentsWriter.java:737)
at org.apache.lucene.index.IndexWriter.processEvents(IndexWriter.java:4807)
at org.apache.lucene.index.IndexWriter.processEvents(IndexWriter.java:4799)
at org.apache.lucene.index.IndexWriter.doFlush(IndexWriter.java:3226)
at org.apache.lucene.index.IndexWriter.flush(IndexWriter.java:3198)
at org.apache.lucene.index.IndexWriter.shutdown(IndexWriter.java:907)
at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:984)
at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:954)
/usr/local/bin/python test/test_PythonException.py
E
======================================================================
ERROR: testThroughLayerException (__main__.PythonExceptionTestCase)
----------------------------------------------------------------------
File "test/test_PythonException.py", line 35, in testThroughLayerException
AttributeError: 'jcc.JCCEnv' object has no attribute 'isShared'
?? ----------------------------------------------------------------------
Post by Márk Csaba
Ran 1 test in 0.003s
?? FAILED (errors=1)
Post by Márk Csaba
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
?? Can someone tell me what did I wrong?
Post by Márk Csaba
Any suggestions would be appreciated.
?? Thanks,
Post by Márk Csaba
Csaba
Márk Csaba
2014-10-09 22:04:48 UTC
Permalink
Hello Andi,

thank you for the suggestions.
There were previous versions of JCC and lucene. I've removed that folders from site-packages and I did a make clean; make; make install; make test.
Unfortunately it didn't solve the problem.

Csaba

-----Original Message-----
From: Andi Vajda [mailto:***@apache.org]
Sent: Thursday, October 09, 2014 9:41 PM
To: pylucene-***@lucene.apache.org
Subject: Re: build pyLucene 4.10.1-1



These are ignorable javac errors. If you prefer not to, you should contact the lucene developer list at ***@lucene.apache.org.


I suspect that you have another older installation of PyLucene or JCC that is being picked up, maybe ?

Did you run make install before running tests (you shouldn't have to) ?

Andi..
Andi Vajda
2014-10-09 22:30:58 UTC
Permalink
Post by Márk Csaba
Hello Andi,
thank you for the suggestions.
There were previous versions of JCC and lucene. I've removed that folders from site-packages and I did a make clean; make; make install; make test.
Unfortunately it didn't solve the problem.
Then try the commands below and make sure you get this output:
$ python
Post by Márk Csaba
import lucene
lucene.VERSION
'4.10.1'
Post by Márk Csaba
lucene.JCC_VERSION
'2.21'

Also, what does 'lucene.initVM().isShared()' return at the python prompt ?

Andi..
Post by Márk Csaba
Csaba
-----Original Message-----
Sent: Thursday, October 09, 2014 9:41 PM
Subject: Re: build pyLucene 4.10.1-1
I suspect that you have another older installation of PyLucene or JCC that is being picked up, maybe ?
Did you run make install before running tests (you shouldn't have to) ?
Andi..
Márk Csaba
2014-10-09 22:47:38 UTC
Permalink
The output is the same:

$ /usr/local/bin/python
Python 2.6.8 (unknown, Apr 14 2013, 19:37:24)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Post by Márk Csaba
import lucene
lucene.VERSION
'4.10.1'
Post by Márk Csaba
lucene.JCC_VERSION
'2.21'
Post by Márk Csaba
lucene.initVM().isShared()
Exception in thread "main" java.lang.NoSuchMethodError: compare
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
lucene.JavaError

I've tried to compile it with JDK 1.6 but it said: "Minimum supported Java version is 1.7".

Csaba

-----Original Message-----
From: Andi Vajda [mailto:***@apache.org]
Sent: Friday, October 10, 2014 12:31 AM
To: pylucene-***@lucene.apache.org
Subject: RE: build pyLucene 4.10.1-1
Post by Márk Csaba
Hello Andi,
thank you for the suggestions.
There were previous versions of JCC and lucene. I've removed that folders from site-packages and I did a make clean; make; make install; make test.
Unfortunately it didn't solve the problem.
Then try the commands below and make sure you get this output:
$ python
Post by Márk Csaba
import lucene
lucene.VERSION
'4.10.1'
Post by Márk Csaba
lucene.JCC_VERSION
'2.21'

Also, what does 'lucene.initVM().isShared()' return at the python prompt ?

Andi..
Post by Márk Csaba
Csaba
-----Original Message-----
Sent: Thursday, October 09, 2014 9:41 PM
Subject: Re: build pyLucene 4.10.1-1
I suspect that you have another older installation of PyLucene or JCC that is being picked up, maybe ?
Did you run make install before running tests (you shouldn't have to) ?
Andi..
Andi Vajda
2014-10-09 22:55:47 UTC
Permalink
Post by Márk Csaba
$ /usr/local/bin/python
Python 2.6.8 (unknown, Apr 14 2013, 19:37:24)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Post by Márk Csaba
import lucene
lucene.VERSION
'4.10.1'
Post by Márk Csaba
lucene.JCC_VERSION
'2.21'
You can't use JDK 6 anymore with PyLucene since version 4.8, Lucene requires
at least JDK 7.
Post by Márk Csaba
Post by Márk Csaba
lucene.initVM().isShared()
Exception in thread "main" java.lang.NoSuchMethodError: compare
File "<stdin>", line 1, in <module>
lucene.JavaError
That is very suspicious. You're still likely running something older than
what you built.

From what I've seen before, you're not building lucene with --shared (not
running JCC in shared mode), thus lucene.initVM().isShared() should return
False.
Or, if I'm mistaken about this, it should return True, but not error out.

Try this instead:
$ python
$ import lucene
$ lucene.initVM()
<jcc.JCCEnv object at 0x10dd020f0>
$ _.isShared()
True (for me, may be different for you depending on your use of --shared)

Andi..
Post by Márk Csaba
I've tried to compile it with JDK 1.6 but it said: "Minimum supported Java version is 1.7".
Csaba
-----Original Message-----
Sent: Friday, October 10, 2014 12:31 AM
Subject: RE: build pyLucene 4.10.1-1
Post by Márk Csaba
Hello Andi,
thank you for the suggestions.
There were previous versions of JCC and lucene. I've removed that folders from site-packages and I did a make clean; make; make install; make test.
Unfortunately it didn't solve the problem.
$ python
Post by Márk Csaba
import lucene
lucene.VERSION
'4.10.1'
Post by Márk Csaba
lucene.JCC_VERSION
'2.21'
Also, what does 'lucene.initVM().isShared()' return at the python prompt ?
Andi..
Post by Márk Csaba
Csaba
-----Original Message-----
Sent: Thursday, October 09, 2014 9:41 PM
Subject: Re: build pyLucene 4.10.1-1
I suspect that you have another older installation of PyLucene or JCC that is being picked up, maybe ?
Did you run make install before running tests (you shouldn't have to) ?
Andi..
Márk Csaba
2014-10-10 10:14:36 UTC
Permalink
I've cleaned out the site-local folder and did a recompile with --shared.

Now lucene.initVM() + _.isShared() and lucene.initVM().isShared() return True.

The make test still failing on PythonDirectoryTests with Java InvalidArgsError, but I'll try our app.

Thank you for your help!

Regards,
Csaba



-----Original Message-----
From: Andi Vajda [mailto:***@apache.org]
Sent: Friday, October 10, 2014 12:56 AM
To: pylucene-***@lucene.apache.org
Subject: RE: build pyLucene 4.10.1-1



That is very suspicious. You're still likely running something older than what you built.

From what I've seen before, you're not building lucene with --shared (not running JCC in shared mode), thus lucene.initVM().isShared() should return False.
Or, if I'm mistaken about this, it should return True, but not error out.

Try this instead:
$ python
$ import lucene
$ lucene.initVM()
<jcc.JCCEnv object at 0x10dd020f0>
$ _.isShared()
True (for me, may be different for you depending on your use of --shared)

Andi..
Andi Vajda
2014-10-10 16:29:53 UTC
Permalink
Post by Márk Csaba
I've cleaned out the site-local folder and did a recompile with --shared.
Either way, it should work, with or without --shared. What version of Java are you using and which distribution ? OpenJDK, Oracle, other ?

Andi..
Post by Márk Csaba
Now lucene.initVM() + _.isShared() and lucene.initVM().isShared() return True.
The make test still failing on PythonDirectoryTests with Java InvalidArgsError, but I'll try our app.
Thank you for your help!
Regards,
Csaba
-----Original Message-----
Sent: Friday, October 10, 2014 12:56 AM
Subject: RE: build pyLucene 4.10.1-1
That is very suspicious. You're still likely running something older than what you built.
From what I've seen before, you're not building lucene with --shared (not running JCC in shared mode), thus lucene.initVM().isShared() should return False.
Or, if I'm mistaken about this, it should return True, but not error out.
$ python
$ import lucene
$ lucene.initVM()
<jcc.JCCEnv object at 0x10dd020f0>
$ _.isShared()
True (for me, may be different for you depending on your use of --shared)
Andi..
Márk Csaba
2014-10-10 16:46:21 UTC
Permalink
Oracle JDK 7.

$ java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) Server VM (build 24.65-b04, mixed mode)

Csaba

-----Original Message-----
From: Andi Vajda [mailto:***@apache.org]
Sent: Friday, October 10, 2014 6:30 PM
To: pylucene-***@lucene.apache.org
Subject: Re: build pyLucene 4.10.1-1
Post by Márk Csaba
I've cleaned out the site-local folder and did a recompile with --shared.
Either way, it should work, with or without --shared. What version of Java are you using and which distribution ? OpenJDK, Oracle, other ?

Andi..
Post by Márk Csaba
Now lucene.initVM() + _.isShared() and lucene.initVM().isShared() return True.
The make test still failing on PythonDirectoryTests with Java InvalidArgsError, but I'll try our app.
Thank you for your help!
Regards,
Csaba
-----Original Message-----
Sent: Friday, October 10, 2014 12:56 AM
Subject: RE: build pyLucene 4.10.1-1
That is very suspicious. You're still likely running something older than what you built.
From what I've seen before, you're not building lucene with --shared (not running JCC in shared mode), thus lucene.initVM().isShared() should return False.
Or, if I'm mistaken about this, it should return True, but not error out.
$ python
$ import lucene
$ lucene.initVM()
<jcc.JCCEnv object at 0x10dd020f0>
$ _.isShared()
True (for me, may be different for you depending on your use of --shared)
Andi..
Andi Vajda
2014-10-10 16:53:33 UTC
Permalink
Post by Márk Csaba
Oracle JDK 7.
$ java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) Server VM (build 24.65-b04, mixed mode)
What happens when you run a test file manually ?
$ python test/test_..,,py

Andi..
Post by Márk Csaba
Csaba
-----Original Message-----
Sent: Friday, October 10, 2014 6:30 PM
Subject: Re: build pyLucene 4.10.1-1
Post by Márk Csaba
I've cleaned out the site-local folder and did a recompile with --shared.
Either way, it should work, with or without --shared. What version of Java are you using and which distribution ? OpenJDK, Oracle, other ?
Andi..
Post by Márk Csaba
Now lucene.initVM() + _.isShared() and lucene.initVM().isShared() return True.
The make test still failing on PythonDirectoryTests with Java InvalidArgsError, but I'll try our app.
Thank you for your help!
Regards,
Csaba
-----Original Message-----
Sent: Friday, October 10, 2014 12:56 AM
Subject: RE: build pyLucene 4.10.1-1
That is very suspicious. You're still likely running something older than what you built.
From what I've seen before, you're not building lucene with --shared (not running JCC in shared mode), thus lucene.initVM().isShared() should return False.
Or, if I'm mistaken about this, it should return True, but not error out.
$ python
$ import lucene
$ lucene.initVM()
<jcc.JCCEnv object at 0x10dd020f0>
$ _.isShared()
True (for me, may be different for you depending on your use of --shared)
Andi..
Márk Csaba
2014-10-10 20:24:00 UTC
Permalink
I've compiled a new python from source ... maybe
But the same tests are failing.

test/test_PythonDirectory.py
ETesting Indexing Incremental Looping
indexing 0
EEEEEEEEE
======================================================================
ERROR: test_FieldEnumeration (__main__.PythonDirectoryTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/src/pylucene-4.10.1-1/test/test_PyLucene.py", line 235, in test_FieldEnumeration
self.test_indexDocument()
File "/usr/src/pylucene-4.10.1-1/test/test_PyLucene.py", line 84, in test_indexDocument
self.closeStore(store, writer)
File "test/test_PythonDirectory.py", line 281, in closeStore
arg.close()
JavaError: java.lang.RuntimeException: InvalidArgsError
Java stacktrace:
java.lang.RuntimeException: InvalidArgsError
at org.apache.pylucene.store.PythonDirectory.deleteFile(Native Method)
at org.apache.lucene.index.IndexFileDeleter.deleteFile(IndexFileDeleter.java:723)
at org.apache.lucene.index.IndexFileDeleter.deleteNewFiles(IndexFileDeleter.java:710)
at org.apache.lucene.index.IndexWriter.deleteNewFiles(IndexWriter.java:4753)
at org.apache.lucene.index.DocumentsWriter$DeleteNewFilesEvent.process(DocumentsWriter.java:737)
at org.apache.lucene.index.IndexWriter.processEvents(IndexWriter.java:4807)
at org.apache.lucene.index.IndexWriter.processEvents(IndexWriter.java:4799)
at org.apache.lucene.index.IndexWriter.doFlush(IndexWriter.java:3226)
at org.apache.lucene.index.IndexWriter.flush(IndexWriter.java:3198)
at org.apache.lucene.index.IndexWriter.shutdown(IndexWriter.java:907)
at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:984)
at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:954)

<snip>
Ran 10 tests in 0.314s

FAILED (errors=10)

test/test_PythonException.py
E
======================================================================
ERROR: testThroughLayerException (__main__.PythonExceptionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_PythonException.py", line 39, in testThroughLayerException
with self.assertRaises(lucene.JavaError):
TypeError: failUnlessRaises() takes at least 3 arguments (2 given)

----------------------------------------------------------------------
Ran 1 test in 0.003s

FAILED (errors=1)

All other tests passed.

-----Original Message-----
From: Andi Vajda [mailto:***@apache.org]
Sent: Friday, October 10, 2014 6:54 PM
To: pylucene-***@lucene.apache.org
Subject: Re: build pyLucene 4.10.1-1
Post by Márk Csaba
Oracle JDK 7.
$ java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM)
Server VM (build 24.65-b04, mixed mode)
What happens when you run a test file manually ?
$ python test/test_..,,py

Andi..
Post by Márk Csaba
Csaba
-----Original Message-----
Sent: Friday, October 10, 2014 6:30 PM
Subject: Re: build pyLucene 4.10.1-1
Post by Márk Csaba
I've cleaned out the site-local folder and did a recompile with --shared.
Either way, it should work, with or without --shared. What version of Java are you using and which distribution ? OpenJDK, Oracle, other ?
Andi..
Post by Márk Csaba
Now lucene.initVM() + _.isShared() and lucene.initVM().isShared() return True.
The make test still failing on PythonDirectoryTests with Java InvalidArgsError, but I'll try our app.
Thank you for your help!
Regards,
Csaba
-----Original Message-----
Sent: Friday, October 10, 2014 12:56 AM
Subject: RE: build pyLucene 4.10.1-1
That is very suspicious. You're still likely running something older than what you built.
From what I've seen before, you're not building lucene with --shared (not running JCC in shared mode), thus lucene.initVM().isShared() should return False.
Or, if I'm mistaken about this, it should return True, but not error out.
$ python
$ import lucene
$ lucene.initVM()
<jcc.JCCEnv object at 0x10dd020f0>
$ _.isShared()
True (for me, may be different for you depending on your use of
--shared)
Andi..
Andi Vajda
2014-10-10 20:49:49 UTC
Permalink
Post by Márk Csaba
I've compiled a new python from source ... maybe
But the same tests are failing.
test/test_PythonDirectory.py
ETesting Indexing Incremental Looping
indexing 0
EEEEEEEEE
======================================================================
ERROR: test_FieldEnumeration (__main__.PythonDirectoryTests)
----------------------------------------------------------------------
File "/usr/src/pylucene-4.10.1-1/test/test_PyLucene.py", line 235, in test_FieldEnumeration
self.test_indexDocument()
File "/usr/src/pylucene-4.10.1-1/test/test_PyLucene.py", line 84, in test_indexDocument
self.closeStore(store, writer)
File "test/test_PythonDirectory.py", line 281, in closeStore
arg.close()
JavaError: java.lang.RuntimeException: InvalidArgsError
java.lang.RuntimeException: InvalidArgsError
at org.apache.pylucene.store.PythonDirectory.deleteFile(Native Method)
at org.apache.lucene.index.IndexFileDeleter.deleteFile(IndexFileDeleter.java:723)
at org.apache.lucene.index.IndexFileDeleter.deleteNewFiles(IndexFileDeleter.java:710)
at org.apache.lucene.index.IndexWriter.deleteNewFiles(IndexWriter.java:4753)
at org.apache.lucene.index.DocumentsWriter$DeleteNewFilesEvent.process(DocumentsWriter.java:737)
at org.apache.lucene.index.IndexWriter.processEvents(IndexWriter.java:4807)
at org.apache.lucene.index.IndexWriter.processEvents(IndexWriter.java:4799)
at org.apache.lucene.index.IndexWriter.doFlush(IndexWriter.java:3226)
at org.apache.lucene.index.IndexWriter.flush(IndexWriter.java:3198)
at org.apache.lucene.index.IndexWriter.shutdown(IndexWriter.java:907)
at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:984)
at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:954)
<snip>
Ran 10 tests in 0.314s
FAILED (errors=10)
test/test_PythonException.py
E
======================================================================
ERROR: testThroughLayerException (__main__.PythonExceptionTestCase)
----------------------------------------------------------------------
File "test/test_PythonException.py", line 39, in testThroughLayerException
TypeError: failUnlessRaises() takes at least 3 arguments (2 given)
You're running Python 2.6.8 if I remember correctly.
The 'with' syntax used in this test may not work with that version of
Python.
Could you try replacing it with a try: except: clause instead ?
Or upgrading to Python 2.7 ?
Is there any reason to run such an old version of Python ?

Andi..
Post by Márk Csaba
----------------------------------------------------------------------
Ran 1 test in 0.003s
FAILED (errors=1)
All other tests passed.
-----Original Message-----
Sent: Friday, October 10, 2014 6:54 PM
Subject: Re: build pyLucene 4.10.1-1
Post by Márk Csaba
Oracle JDK 7.
$ java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM)
Server VM (build 24.65-b04, mixed mode)
What happens when you run a test file manually ?
$ python test/test_..,,py
Andi..
Post by Márk Csaba
Csaba
-----Original Message-----
Sent: Friday, October 10, 2014 6:30 PM
Subject: Re: build pyLucene 4.10.1-1
Post by Márk Csaba
I've cleaned out the site-local folder and did a recompile with --shared.
Either way, it should work, with or without --shared. What version of Java are you using and which distribution ? OpenJDK, Oracle, other ?
Andi..
Post by Márk Csaba
Now lucene.initVM() + _.isShared() and lucene.initVM().isShared() return True.
The make test still failing on PythonDirectoryTests with Java InvalidArgsError, but I'll try our app.
Thank you for your help!
Regards,
Csaba
-----Original Message-----
Sent: Friday, October 10, 2014 12:56 AM
Subject: RE: build pyLucene 4.10.1-1
That is very suspicious. You're still likely running something older than what you built.
From what I've seen before, you're not building lucene with --shared (not running JCC in shared mode), thus lucene.initVM().isShared() should return False.
Or, if I'm mistaken about this, it should return True, but not error out.
$ python
$ import lucene
$ lucene.initVM()
<jcc.JCCEnv object at 0x10dd020f0>
$ _.isShared()
True (for me, may be different for you depending on your use of
--shared)
Andi..
Andi Vajda
2014-10-10 20:53:53 UTC
Permalink
Post by Márk Csaba
I've compiled a new python from source ... maybe
But the same tests are failing.
test/test_PythonDirectory.py
ETesting Indexing Incremental Looping
indexing 0
EEEEEEEEE
======================================================================
ERROR: test_FieldEnumeration (__main__.PythonDirectoryTests)
----------------------------------------------------------------------
File "/usr/src/pylucene-4.10.1-1/test/test_PyLucene.py", line 235, in test_FieldEnumeration
self.test_indexDocument()
File "/usr/src/pylucene-4.10.1-1/test/test_PyLucene.py", line 84, in test_indexDocument
self.closeStore(store, writer)
File "test/test_PythonDirectory.py", line 281, in closeStore
arg.close()
JavaError: java.lang.RuntimeException: InvalidArgsError
java.lang.RuntimeException: InvalidArgsError
at org.apache.pylucene.store.PythonDirectory.deleteFile(Native Method)
at org.apache.lucene.index.IndexFileDeleter.deleteFile(IndexFileDeleter.java:723)
at org.apache.lucene.index.IndexFileDeleter.deleteNewFiles(IndexFileDeleter.java:710)
at org.apache.lucene.index.IndexWriter.deleteNewFiles(IndexWriter.java:4753)
at org.apache.lucene.index.DocumentsWriter$DeleteNewFilesEvent.process(DocumentsWriter.java:737)
at org.apache.lucene.index.IndexWriter.processEvents(IndexWriter.java:4807)
at org.apache.lucene.index.IndexWriter.processEvents(IndexWriter.java:4799)
at org.apache.lucene.index.IndexWriter.doFlush(IndexWriter.java:3226)
at org.apache.lucene.index.IndexWriter.flush(IndexWriter.java:3198)
at org.apache.lucene.index.IndexWriter.shutdown(IndexWriter.java:907)
at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:984)
at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:954)
<snip>
Ran 10 tests in 0.314s
FAILED (errors=10)
test/test_PythonException.py
E
======================================================================
ERROR: testThroughLayerException (__main__.PythonExceptionTestCase)
----------------------------------------------------------------------
File "test/test_PythonException.py", line 39, in testThroughLayerException
TypeError: failUnlessRaises() takes at least 3 arguments (2 given)
If running Python 2.6.8 is really the source of all these problems, then the
tests need to be modified to pass or you can choose to ignore these
failures. There is no reason JCC/PyLucene (99.5% C++/Java code) depend on
Python 2.7 (Python 3 is not supported by JCC but that's another issue).

If you _must_ use Python 2.6.8 and your application works fine with it,
ignoring the failures, or fixing the tests' 'with' syntax uses, maybe the
next best solution.

Andi..
Post by Márk Csaba
----------------------------------------------------------------------
Ran 1 test in 0.003s
FAILED (errors=1)
All other tests passed.
-----Original Message-----
Sent: Friday, October 10, 2014 6:54 PM
Subject: Re: build pyLucene 4.10.1-1
Post by Márk Csaba
Oracle JDK 7.
$ java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM)
Server VM (build 24.65-b04, mixed mode)
What happens when you run a test file manually ?
$ python test/test_..,,py
Andi..
Post by Márk Csaba
Csaba
-----Original Message-----
Sent: Friday, October 10, 2014 6:30 PM
Subject: Re: build pyLucene 4.10.1-1
Post by Márk Csaba
I've cleaned out the site-local folder and did a recompile with --shared.
Either way, it should work, with or without --shared. What version of Java are you using and which distribution ? OpenJDK, Oracle, other ?
Andi..
Post by Márk Csaba
Now lucene.initVM() + _.isShared() and lucene.initVM().isShared() return True.
The make test still failing on PythonDirectoryTests with Java InvalidArgsError, but I'll try our app.
Thank you for your help!
Regards,
Csaba
-----Original Message-----
Sent: Friday, October 10, 2014 12:56 AM
Subject: RE: build pyLucene 4.10.1-1
That is very suspicious. You're still likely running something older than what you built.
From what I've seen before, you're not building lucene with --shared (not running JCC in shared mode), thus lucene.initVM().isShared() should return False.
Or, if I'm mistaken about this, it should return True, but not error out.
$ python
$ import lucene
$ lucene.initVM()
<jcc.JCCEnv object at 0x10dd020f0>
$ _.isShared()
True (for me, may be different for you depending on your use of
--shared)
Andi..
Márk Csaba
2014-10-10 20:55:59 UTC
Permalink
Yep, 2.6.8.
We have to use that version. We have an old application using very old modules which could not run any higher than 2.6.8.

I'll test it with our app.

Thank you for your help!

Regards,
Csaba


-----Original Message-----
From: Andi Vajda [mailto:***@apache.org]
Sent: Friday, October 10, 2014 10:50 PM
To: pylucene-***@lucene.apache.org
Subject: RE: build pyLucene 4.10.1-1


On Fri, 10 Oct 2014, Márk Csaba wrote:


You're running Python 2.6.8 if I remember correctly.
The 'with' syntax used in this test may not work with that version of Python.
Could you try replacing it with a try: except: clause instead ?
Or upgrading to Python 2.7 ?
Is there any reason to run such an old version of Python ?

Andi..

Loading...