[ 
https://issues.apache.org/jira/browse/PYLUCENE-62?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17522949#comment-17522949
 ] 

Petrus Hyvönen commented on PYLUCENE-62:
----------------------------------------

Hi Andy,

I have done some testing and I do not get it to work as expected with 
--find-jvm-dll server yet.

Or simplest case is "python setup.py install" and then from python prompt 
"import jcc" that ends with a "ValueError: jvm.dll could not be found". Here 
there is no obvious possiblity to sett server/client and same applies for the 
library when wrapped as I understand. I probably haven't reflected much on the 
server/client duality, and just added path's in the environment that covered as 
much as possible..  As I don't know for sure the details of the jdk users use I 
would prefer if it searches both... with this I get it to work with my test 
scripts without problems.

There seems to be a missing section under the non-shared mode code generated, 
here I think also the add_jvm_dll_directory_to_path is needed.

I submit a patch with the stuff I have identified so far but it still has 
issues and will continue to work on it to see if I can get it to work without 
adding both server and client.

The thing now sems to be that when the jcc.windows is imported it goes through 
the __init__.py of jcc which does not have the argument of --find-jvm-dll and 
thus defaults to client and fails. I thought the windows.py could also be 
included in the wrapped code, avoiding the dependency on jcc there?

 

All the best,

/Petrus

 

 

> Not finding jvm.dll on windows
> ------------------------------
>
>                 Key: PYLUCENE-62
>                 URL: https://issues.apache.org/jira/browse/PYLUCENE-62
>             Project: PyLucene
>          Issue Type: Bug
>            Reporter: Petrus Hyvönen
>            Priority: Major
>         Attachments: add_dll_win-1.patch, add_dll_win.patch, jvm_dll.diff
>
>
> On recent versions of Python, the dll's seems to require to be added via the 
> os.add_dll_directory() function.
>  
> Apparently something changed in Python 3.8 regarding this, "Python 3.8 
> changed the DLL resolution order 
> [https://docs.python.org/3/whatsnew/3.8.html#bpo-36085-whatsnew]";
> Thanks to:
> [https://github.com/conda-forge/python-feedstock/issues/552]
>  
> Proposed fix in a patch below. It can likely be rewritten in some more neat 
> way. :)



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to