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 Márk Csaba <ma...@gwyll.eu> on 2014/10/09 19:09:54 UTC

build pyLucene 4.10.1-1

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


RE: build pyLucene 4.10.1-1

Posted by Márk Csaba <ma...@gwyll.eu>.
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:vajda@apache.org] 
Sent: Friday, October 10, 2014 10:50 PM
To: pylucene-dev@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..


RE: build pyLucene 4.10.1-1

Posted by Andi Vajda <va...@apache.org>.
On Fri, 10 Oct 2014, Márk Csaba wrote:

> 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)

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..

>
> ----------------------------------------------------------------------
> Ran 1 test in 0.003s
>
> FAILED (errors=1)
>
> All other tests passed.
>
> -----Original Message-----
> From: Andi Vajda [mailto:vajda@apache.org]
> Sent: Friday, October 10, 2014 6:54 PM
> To: pylucene-dev@lucene.apache.org
> Subject: Re: build pyLucene 4.10.1-1
>
>
>> On Oct 10, 2014, at 09:46, Márk Csaba <ma...@gwyll.eu> wrote:
>>
>> 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..
>
>>
>> Csaba
>>
>> -----Original Message-----
>> From: Andi Vajda [mailto:vajda@apache.org]
>> Sent: Friday, October 10, 2014 6:30 PM
>> To: pylucene-dev@lucene.apache.org
>> Subject: Re: build pyLucene 4.10.1-1
>>
>>
>>> On Oct 10, 2014, at 03:14, Márk Csaba <ma...@gwyll.eu> wrote:
>>>
>>> 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..
>>
>>>
>>> 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:vajda@apache.org]
>>> Sent: Friday, October 10, 2014 12:56 AM
>>> To: pylucene-dev@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..
>>>
>

RE: build pyLucene 4.10.1-1

Posted by Andi Vajda <va...@apache.org>.
On Fri, 10 Oct 2014, Márk Csaba wrote:

> 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)

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..

>
> ----------------------------------------------------------------------
> Ran 1 test in 0.003s
>
> FAILED (errors=1)
>
> All other tests passed.
>
> -----Original Message-----
> From: Andi Vajda [mailto:vajda@apache.org]
> Sent: Friday, October 10, 2014 6:54 PM
> To: pylucene-dev@lucene.apache.org
> Subject: Re: build pyLucene 4.10.1-1
>
>
>> On Oct 10, 2014, at 09:46, Márk Csaba <ma...@gwyll.eu> wrote:
>>
>> 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..
>
>>
>> Csaba
>>
>> -----Original Message-----
>> From: Andi Vajda [mailto:vajda@apache.org]
>> Sent: Friday, October 10, 2014 6:30 PM
>> To: pylucene-dev@lucene.apache.org
>> Subject: Re: build pyLucene 4.10.1-1
>>
>>
>>> On Oct 10, 2014, at 03:14, Márk Csaba <ma...@gwyll.eu> wrote:
>>>
>>> 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..
>>
>>>
>>> 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:vajda@apache.org]
>>> Sent: Friday, October 10, 2014 12:56 AM
>>> To: pylucene-dev@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..
>>>
>

RE: build pyLucene 4.10.1-1

Posted by Márk Csaba <ma...@gwyll.eu>.
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:vajda@apache.org] 
Sent: Friday, October 10, 2014 6:54 PM
To: pylucene-dev@lucene.apache.org
Subject: Re: build pyLucene 4.10.1-1


> On Oct 10, 2014, at 09:46, Márk Csaba <ma...@gwyll.eu> wrote:
> 
> 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..

> 
> Csaba
> 
> -----Original Message-----
> From: Andi Vajda [mailto:vajda@apache.org]
> Sent: Friday, October 10, 2014 6:30 PM
> To: pylucene-dev@lucene.apache.org
> Subject: Re: build pyLucene 4.10.1-1
> 
> 
>> On Oct 10, 2014, at 03:14, Márk Csaba <ma...@gwyll.eu> wrote:
>> 
>> 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..
> 
>> 
>> 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:vajda@apache.org]
>> Sent: Friday, October 10, 2014 12:56 AM
>> To: pylucene-dev@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..
>> 

Re: build pyLucene 4.10.1-1

Posted by Andi Vajda <va...@apache.org>.
> On Oct 10, 2014, at 09:46, Márk Csaba <ma...@gwyll.eu> wrote:
> 
> 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..

> 
> Csaba
> 
> -----Original Message-----
> From: Andi Vajda [mailto:vajda@apache.org] 
> Sent: Friday, October 10, 2014 6:30 PM
> To: pylucene-dev@lucene.apache.org
> Subject: Re: build pyLucene 4.10.1-1
> 
> 
>> On Oct 10, 2014, at 03:14, Márk Csaba <ma...@gwyll.eu> wrote:
>> 
>> 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..
> 
>> 
>> 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:vajda@apache.org] 
>> Sent: Friday, October 10, 2014 12:56 AM
>> To: pylucene-dev@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..
>> 

RE: build pyLucene 4.10.1-1

Posted by Márk Csaba <ma...@gwyll.eu>.
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:vajda@apache.org] 
Sent: Friday, October 10, 2014 6:30 PM
To: pylucene-dev@lucene.apache.org
Subject: Re: build pyLucene 4.10.1-1


> On Oct 10, 2014, at 03:14, Márk Csaba <ma...@gwyll.eu> wrote:
> 
> 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..

> 
> 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:vajda@apache.org] 
> Sent: Friday, October 10, 2014 12:56 AM
> To: pylucene-dev@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..
> 

Re: build pyLucene 4.10.1-1

Posted by Andi Vajda <va...@apache.org>.
> On Oct 10, 2014, at 03:14, Márk Csaba <ma...@gwyll.eu> wrote:
> 
> 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..

> 
> 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:vajda@apache.org] 
> Sent: Friday, October 10, 2014 12:56 AM
> To: pylucene-dev@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..
> 

RE: build pyLucene 4.10.1-1

Posted by Márk Csaba <ma...@gwyll.eu>.
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:vajda@apache.org] 
Sent: Friday, October 10, 2014 12:56 AM
To: pylucene-dev@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..


RE: build pyLucene 4.10.1-1

Posted by Andi Vajda <va...@apache.org>.
On Fri, 10 Oct 2014, Márk Csaba wrote:

> 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.
>>>> import lucene
>>>> lucene.VERSION
> '4.10.1'
>>>> lucene.JCC_VERSION
> '2.21'
>
> I got an error running isShared with JDK6:

You can't use JDK 6 anymore with PyLucene since version 4.8, Lucene requires 
at least JDK 7.

>>>> lucene.initVM().isShared()
> Exception in thread "main" java.lang.NoSuchMethodError: compare
> Traceback (most recent call last):
>  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..

>
> 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:vajda@apache.org]
> Sent: Friday, October 10, 2014 12:31 AM
> To: pylucene-dev@lucene.apache.org
> Subject: RE: build pyLucene 4.10.1-1
>
>
> On Fri, 10 Oct 2014, Márk Csaba wrote:
>
>> 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
>   >>> import lucene
>   >>> lucene.VERSION
>   '4.10.1'
>   >>> lucene.JCC_VERSION
>   '2.21'
>
> Also, what does 'lucene.initVM().isShared()' return at the python prompt ?
>
> Andi..
>
>>
>> Csaba
>>
>> -----Original Message-----
>> From: Andi Vajda [mailto:vajda@apache.org]
>> Sent: Thursday, October 09, 2014 9:41 PM
>> To: pylucene-dev@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 dev@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..
>>
>>
>

RE: build pyLucene 4.10.1-1

Posted by Márk Csaba <ma...@gwyll.eu>.
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.
>>> import lucene
>>> lucene.VERSION
'4.10.1'
>>> lucene.JCC_VERSION
'2.21'

I got an error running isShared with JDK6:
>>> 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:vajda@apache.org] 
Sent: Friday, October 10, 2014 12:31 AM
To: pylucene-dev@lucene.apache.org
Subject: RE: build pyLucene 4.10.1-1


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

> 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
   >>> import lucene
   >>> lucene.VERSION
   '4.10.1'
   >>> lucene.JCC_VERSION
   '2.21'

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

Andi..

>
> Csaba
>
> -----Original Message-----
> From: Andi Vajda [mailto:vajda@apache.org]
> Sent: Thursday, October 09, 2014 9:41 PM
> To: pylucene-dev@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 dev@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..
>
>

RE: build pyLucene 4.10.1-1

Posted by Andi Vajda <va...@apache.org>.
On Fri, 10 Oct 2014, Márk Csaba wrote:

> 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
   >>> import lucene
   >>> lucene.VERSION
   '4.10.1'
   >>> lucene.JCC_VERSION
   '2.21'

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

Andi..

>
> Csaba
>
> -----Original Message-----
> From: Andi Vajda [mailto:vajda@apache.org]
> Sent: Thursday, October 09, 2014 9:41 PM
> To: pylucene-dev@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 dev@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..
>
>

RE: build pyLucene 4.10.1-1

Posted by Márk Csaba <ma...@gwyll.eu>.
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:vajda@apache.org] 
Sent: Thursday, October 09, 2014 9:41 PM
To: pylucene-dev@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 dev@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..


Re: build pyLucene 4.10.1-1

Posted by Andi Vajda <va...@apache.org>.
On Thu, 9 Oct 2014, Márk Csaba wrote:

> 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

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

... snip ...

> 
?? 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

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..

>
> ======================================================================
>
> 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
>
>