jpype-project / jpype

JPype is cross language bridge to allow Python programs full access to Java class libraries.
http://www.jpype.org
Apache License 2.0
1.12k stars 181 forks source link

different results with jpype1 from conda-forge and locally installed #847

Open petrushy opened 4 years ago

petrushy commented 4 years ago

Hi,

I will try to see if I can find some more details, haven't digged deep, but I'm getting problems with the conda-forge version of jpype (both 1.0.1 and 1.0.2).

in the conda-forge version:

Traceback (most recent call last):
  File "org.jpype.html.Html.java", line 77, in org.jpype.html.Html.<clinit>
  File "InputStreamReader.java", line 72, in java.io.InputStreamReader.<init>
  File "Reader.java", line 78, in java.io.Reader.<init>
java.lang.NullPointerException: java.lang.NullPointerException

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "org.jpype.JPypeContext.java", line 607, in org.jpype.JPypeContext.newWrapper
  File "org.jpype.manager.TypeFactoryNative.java", line -2, in org.jpype.manager.TypeFactoryNative.newWrapper
  File "org.jpype.javadoc.JavadocExtractor.java", line 57, in org.jpype.javadoc.JavadocExtractor.getDocumentation
Exception: Java Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "EventHandlerTest.py", line 27, in <module>
    orekit_jpype.initVM()
  File "/home/petrushy/Development/orekit_jpype/orekit_jpype/orekit_jpype.py", line 21, in initVM
    import orekit_jpype.orekit_converters
  File "/home/petrushy/Development/orekit_jpype/orekit_jpype/orekit_converters.py", line 18, in <module>
    from org.orekit.time import TimeScalesFactory, AbsoluteDate
  File "<frozen importlib._bootstrap>", line 1039, in _handle_fromlist
java.lang.ExceptionInInitializerError: java.lang.ExceptionInInitializerError

If I install jpype from git release or master I get no error.

On linux, pop os 20.04 (ubuntu clone).

pelson commented 4 years ago

@petrushy - some more details here would be useful. Is is easy to reproduce with a simple JPype call? Even better if you can reproduce it in a simple JPype call in a simple Docker container.