I try desperately to import a java class in python using JPype.
It works fine most of the time, but for some reasons not for this import :
from org.apache.lucene.analysis.tokenattributes import OffsetAttribute
The debugger returns:
AttributeError: type object 'org.apache.lucene.analysis.tokenattributes.OffsetA' has no attribute 'loader'
It seems the import path is truncated as if it were too long.
I found the solution.
It seems this bug is already known: https://github.com/jpype-project/jpype/issues/838
Here is the workaround I used to import my class: