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.1k stars 180 forks source link

Unable to use JPype on IBM I series #719

Open Devender2806 opened 4 years ago

Devender2806 commented 4 years ago

Dear Team,

We are attempting to install python 3.6 64 bit on IBM I server (PACE,AIX) so that we can connect to Oracle database. I started to work with JDBC thin driver concept first hence downloaded and installed jaydebeapi and JPype1 using the pip3 install command. The libraries installed fine, but when i initiate a connection i get core dump. I tried reading the core file with java tools and all it tells me is no JRE.

I can see java and javac executable files in the one of the directories and when i type java or javac it displays list of options. I also tried giving the path of libjvm.so file but doesn't help. I setup the JAVA_HOME and LIBPATH and PATH variables accordingly but i cannot get past the core dump. We have almost 7 JVMs running on the I series box currently.

Thrameos commented 4 years ago

I haven't done much with that platform but lets first go through the basics.

1) Write a simple hello world just starts JPype by itself without anything else.

import jpype
print (jpype.getDefaultJVMPath())
jpype.startJVM()
print(jpype.java.lang.System.getProperty('java.class.path'))

2) Lets assume it crashes here. Okay the problem is with the shared library. So we need to verify that the shared library and the Python have the same architecture (both 64 bit). Assuming that is correct...

3) Next we need to look for a dependency problem. Java has to find all of its required shared libraries when it loads. If something is missing then the JVM will fail to load. On some systems like Window 16 server that means adding the bin directory to the path. Use a library tool to verify that all libraries required are able to be found.

4) If JPype does load by itself, the problem then the issue would have to be loading up a resource for JVM loading a native library. If this is the case then we would have to look at what resource that are loaded with that native library.

This is still pretty far from specific. 1) What JVM vendor and version? 2) Does JPype pass its self test? 3) Can you produce a backtrace from the core file. (Please note that the JVM will scramble the core file on some systems. On those systems it is necessary to run the debugger rather than analyzing the core). 4) What do you mean by "initiate a connection"? Is that after the JVM is started or when the JDBC driver is loaded? 5) Is there a mismatch in shared library architecture between the JVM, Python and the JDBC library? 6) If JPype does load the JVM what happens if you call forName on the JDBC driver? 7) What version of JPype is being run?

Devender2806 commented 4 years ago

Thanks for the follow up Karl, here are the observations:-

I ran your code snippet and below is the error message i get: /QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit/jre/lib/ppc64/j9vm/libjvm.so /QOpenSys/pkgs/lib/python3.6/site-packages/jpype/_core.py:209: UserWarning:

Deprecated: convertStrings was not specified when starting the JVM. The default behavior in JPype will be False starting in JPype 0.8. The recommended setting for new code is convertStrings=False. The legacy value of True was assumed for this session. If you are a user of an application that reported this warning, please file a ticket with the developer.

""") terminate called after throwing an instance of 'JPypeException' IOT/Abort trap (core dumped).

If i go to this directory /QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit/jre/lib/ppc64/j9vm, all i can see are 3 files libjvm.so libjvm.a -> /QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit/jre/lib/ppc64/j9vm/libjvm.so libi5vmdepend.so

I use the jdmpview to view the core file. I have been trying to find a JDK for IBM I but i couldn't find one which has all the libraries and Iam not sure if the current JDK is complete ?, but when i type the below command i see this list:- qtmhhttp 70 67 0 Apr 11 - 3:46 /usr/local/zendphp7/bin/jqd -f /usr/local/zendphp7/etc/jqd.ini -e qypsjsvr 302 1 0 Apr 11 - 0:41 /QOpenSys/QIBM/ProdData/JavaVM/jdk80/32bit/jre/lib/ppc/jvmStartPase 1839 qlwisvr 312 1 0 Apr 11 - 0:43 /QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit/jre/lib/ppc64/jvmStartPase 2327 qlwisvr 313 1 0 Apr 11 - 20:29 /QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit/jre/lib/ppc64/jvmStartPase 2746 qlwisvr 314 1 0 Apr 11 - 0:43 /QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit/jre/lib/ppc64/jvmStartPase 2338 qwebadmi 315 1 0 Apr 11 - 0:59 /QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit/jre/lib/ppc64/jvmStartPase 2337 qlwisvr 316 1 0 Apr 11 - 2:18 /QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit/jre/lib/ppc64/jvmStartPase 2331 qlwisvr 378 377 0 Apr 11 - 1:49 /QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit/jre/lib/ppc64/jvmStartPase 1686 goanywhe 1053 1 0 Apr 11 - 8:28 /QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit/jre/lib/ppc64/jvmStartPase 2530 goanywhe 105707 1 0 Apr 24 - 11:56 /QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit/jre/lib/ppc64/jvmStartPase 2530 kjones 138763 138761 0 15:44:33 pts/0 0:00 -bsh aldonadm 141172 141170 0 21:24:43 - 0:16 /QOpenSys/QIBM/ProdData/JavaVM/jdk80/32bit/jre/lib/ppc/jvmStartPase 2461 aldonaff 141189 141186 0 21:27:13 - 0:05 /QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit/jre/lib/ppc64/jvmStartPase 1688 aldonaff 141191 141190 0 21:27:13 - 0:07 /QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit/jre/lib/ppc64/jvmStartPase 1688

As you can see its a mixed bag of 32 and 64 bits.

On Tue, Apr 28, 2020 at 9:27 PM Karl Nelson notifications@github.com wrote:

I haven't done much with that platform but lets first go through the basics.

  1. Write a simple hello world just starts JPype by itself without anything else.

import jpype print (jpype.getDefaultJVMPath()) jpype.startJVM() print(jpype.java.lang.System.getProperty('java.class.path'))

1.

Lets assume it crashes here. Okay the problem is with the shared library. So we need to verify that the shared library and the Python have the same architecture (both 64 bit). Assuming that is correct... 2.

Next we need to look for a dependency problem. Java has to find all of its required shared libraries when it loads. If something is missing then the JVM will fail to load. On some systems like Window 16 server that means adding the bin directory to the path. Use a library tool to verify that all libraries required are able to be found. 3.

If JPype does load by itself, the problem then the issue would have to be loading up a resource for JVM loading a native library. If this is the case then we would have to look at what resource that are loaded with that native library.

This is still pretty far from specific.

  1. What JVM vendor and version?
  2. Does JPype pass its self test?
  3. Can you produce a backtrace from the core file. (Please note that the JVM will scramble the core file on some systems. On those systems it is necessary to run the debugger rather than analyzing the core).
  4. What do you mean by "initiate a connection"? Is that after the JVM is started or when the JDBC driver is loaded?
  5. Is there a mismatch in shared library architecture between the JVM, Python and the JDBC library?
  6. If JPype does load the JVM what happens if you call forName on the JDBC driver?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpype-project/jpype/issues/719#issuecomment-620957819, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMFM6X2YIALABB6JQ3PA6TRO6GANANCNFSM4MTKBRIA .

Thrameos commented 4 years ago

The error message reads like a bug in 0.7.2, but it may be a different problem. Are you currently up to date with the latest (0.7.4)?

I have a fairly good idea what is going on here. But we would need to get a bit more diagnostics before I can be sure. I have never tried to run on an IBM JVM. Most likely one of the commands in the file jp_context startJVM is producing an unexpected result. That is yielding an exception in a place where we do not yet have the ability to handle it cleanly.

So what we need to do is compile with --enable-tracing. On my systems I used the following

Find the point in the trace with the fail. If there is no instrumentation in the area, add JP_TRACE() commands to isolate the failed call. This will hopefully get us to the source.

Devender2806 commented 4 years ago

I get the following error when i run the setup.py with trace. I can see the files are there in the path and i have setup the directories in my PATH variable. Error in sitecustomize; set PYTHONVERBOSE for traceback: ImportError: Could not load module /QOpenSys/pkgs/lib/python3.6/lib-dynload/_ssl.so. Dependent module /QOpenSys/QIBM/ProdData/SC1/OpenSSL/lib/libssl.so.1.1(shr_64.o) could not be loaded. Member shr_64.o is not found in archive Could not load module /QOpenSys/pkgs/lib/python3.6/lib-dynload/_ssl.so. Dependent module /QOpenSys/pkgs/lib/python3.6/lib-dynload/_ssl.so could not be loaded.

On Wed, Apr 29, 2020 at 8:43 AM Karl Nelson notifications@github.com wrote:

The error message reads like a bug in 0.7.2, but it may be a different problem. Are you currently up to date with the latest (0.7.4)?

I have a fairly good idea what is going on here. But we would need to get a bit more diagnostics before I can be sure. I have never tried to run on an IBM JVM. Most likely one of the commands in the file jp_context startJVM is producing an unexpected result. That is yielding an exception in a place where we do not yet have the ability to handle it cleanly.

So what we need to do is compile with --enable-tracing. On my systems I used the following

  • Download a clean copy from git
  • Run python setup.py --enable-tracing build_makefile. This should give you a makefile version which will allow you to quickly compile.
  • Run make to create a version of the code in place.
  • Run python setup.py test_java which creates the test bench for later steps.
  • Run to snippet.

Find the point in the trace with the fail. If there is no instrumentation in the area, add JP_TRACE() commands to isolate the failed call. This will hopefully get us to the source.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpype-project/jpype/issues/719#issuecomment-621216539, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMFM6SDBFTGCGXXPMDZBETRPAVHXANCNFSM4MTKBRIA .

Thrameos commented 4 years ago

Not much help I can be with that error. It appears to be site problem. Assuming that you can get python working I will try to be of further assistance.

Devender2806 commented 4 years ago

Ok i was able to fix python issue and create Makefile, but when i run the make command, i get the following error:

makefile", line 95: make: Dependency line needs colon or double colon operator. make: Fatal errors encountered -- cannot continue.

On Wed, Apr 29, 2020 at 11:47 AM Karl Nelson notifications@github.com wrote:

Not much help I can be with that error. It appears to be site problem. Assuming that you can get python working I will try to be of further assistance.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpype-project/jpype/issues/719#issuecomment-621332030, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMFM6UXCKXX6VXW7UO5HGDRPBK2TANCNFSM4MTKBRIA .

Thrameos commented 4 years ago

Would you mind sharing the line that failed? I am not a mind reader. So I have to see the problem line to advise.

95 for me is

-include $(DEPFILES)

So I recommend removing that line. It is just for tracking deps.

Devender2806 commented 4 years ago

My apologies for that. I removed the line (you were correct!) and ran make and i have the _jpype.so in my home directory, should I copy this to the site-packages directory ?

On Wed, Apr 29, 2020 at 8:37 PM Karl Nelson notifications@github.com wrote:

Would you mind sharing the line that failed? I am not a mind reader. So I have to see the problem line to advise.

95 for me is

-include $(DEPFILES)

So I recommend removing that line. It is just for tracking deps.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpype-project/jpype/issues/719#issuecomment-621560714, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMFM6UIVPJAE5FKB5AG72DRPDI7LANCNFSM4MTKBRIA .

Thrameos commented 4 years ago

Run the command “python -m pytest test/jpypetest” and if that fails run the simple hello world test we had earlier in that directory. You have a live development version in that directory. We can edit the files in native directory, run make, and see the results. This will let us find the source of the problem.

Thrameos commented 4 years ago

Lets start with something simple...

When I run the script to test tracing

import _jpype
_jpype.trace(0)
import jpype
_jpype.trace(255)
jpype.startJVM()
_jpype.trace(0)

The tracing program should be run at the top level of the jpype repo that you have build using python setup.py --enable-tracing build_makefile; make.

I get an output like. Run this same command on your system and we can see what we get.

id="< PyInit__jpype
> PyJPModule_startup
  > JPPyUnicode::asStringUTF8
    PY: JPPyUnicode::asStringUTF8: pyref new(claim) 0x7fb36afedab0 1 bytes
    PY: JPPyUnicode::asStringUTF8: pyref dtor(dec) 0x7fb36afedab0 1 bytes
  < JPPyUnicode::asStringUTF8
  PyJPModule_startup: vmpath /usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so
  PY: PyJPModule_startup: pyref new(inc) 0x7fb36e840040 10555 tuple
  PY: PyJPModule_startup: pyref new(claim) 0x7fb36c2cd360 21 module
  PY: PyJPModule_startup: pyref new(claim) 0x7fb36c2a5140 4 list
  PY: PyJPModule_startup: pyref new(claim) 0x7fb36d41aef0 3 builtin_function_or_method
  PY: PyJPModule_startup: pyref dtor(dec) 0x7fb36d41aef0 4 builtin_function_or_method
  PY: PyJPModule_startup: pyref dtor(dec) 0x7fb36c2a5140 4 list
  PY: PyJPModule_startup: pyref dtor(dec) 0x7fb36c2cd360 21 module
  > JPContext::startJVM
    + JNI: JPContext::startJVM: JavaFrame
      > JPException_init
        JNI: JPException_init: JPJavaFrame::FindClass
        JNI: JPException_init: JPJavaFrame::GetMethodID
        JNI: JPException_init: JPJavaFrame::FindClass
        JNI: JPException_init: JPJavaFrame::GetMethodID
        JNI: JPException_init: JPJavaFrame::GetMethodID
        JNI: JPException_init: JPJavaFrame::GetMethodID
        JNI: JPException_init: JPJavaFrame::GetMethodID
Devender2806 commented 4 years ago

This is what i get when i run the commands:-. I could locate the lbjvm.so file in /QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit/jre/lib/ppc64/j9vm directory and hence set this as my JAVA_HOME. < PyInit__jpype /home/dlali/JPype1-0.7.4/jpype/_core.py:209: UserWarning:

Deprecated: convertStrings was not specified when starting the JVM. The default behavior in JPype will be False starting in JPype 0.8. The recommended setting for new code is convertStrings=False. The legacy value of True was assumed for this session. If you are a user of an application that reported this warning, please file a ticket with the developer.

""")

PyJPModule_startup JPPyUnicode::asStringUTF8 PY: JPPyUnicode::asStringUTF8: pyref new(claim) 0x7000000003a8308 1 bytes PY: JPPyUnicode::asStringUTF8: pyref dtor(dec) 0x7000000003a8308 1 bytes < JPPyUnicode::asStringUTF8 PyJPModule_startup: vmpath /QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit/jre/lib/ppc64/j9vm/libjvm.so PY: PyJPModule_startup: pyref new(inc) 0x700000000000048 4283 tuple PY: PyJPModule_startup: pyref new(claim) 0x7000000003a4598 17 module PY: PyJPModule_startup: pyref new(claim) 0x700000000398308 4 list PY: PyJPModule_startup: pyref new(claim) 0x7000000002eda68 3 builtin_function_or_method PY: PyJPModule_startup: pyref dtor(dec) 0x7000000002eda68 4 builtin_function_or_method PY: PyJPModule_startup: pyref dtor(dec) 0x700000000398308 4 list PY: PyJPModule_startup: pyref dtor(dec) 0x7000000003a4598 17 module JPContext::startJVM JPContext::startJVM: EXCEPTION THROWN 2 /QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit/jre/lib/ppc64/j9vm/libjvm.so JPContext::startJVM: EXCEPTION FROM: native/common/jp_platform.cpp 114 terminate called after throwing an instance of 'JPypeException' IOT/Abort trap (core dumped)

On Thu, Apr 30, 2020 at 1:04 AM Karl Nelson notifications@github.com wrote:

Lets start with something simple...

When I run the script to test tracing

import _jpype _jpype.trace(0) import jpype _jpype.trace(255) jpype.startJVM() _jpype.trace(0)

The tracing program should be run at the top level of the jpype repo that you have build using python setup.py --enable-tracing build_makefile; make.

I get an output like. Run this same command on your system and we can see what we get.

id="< PyInit__jpype

PyJPModule_startup JPPyUnicode::asStringUTF8 PY: JPPyUnicode::asStringUTF8: pyref new(claim) 0x7fb36afedab0 1 bytes PY: JPPyUnicode::asStringUTF8: pyref dtor(dec) 0x7fb36afedab0 1 bytes < JPPyUnicode::asStringUTF8 PyJPModule_startup: vmpath /usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so PY: PyJPModule_startup: pyref new(inc) 0x7fb36e840040 10555 tuple PY: PyJPModule_startup: pyref new(claim) 0x7fb36c2cd360 21 module PY: PyJPModule_startup: pyref new(claim) 0x7fb36c2a5140 4 list PY: PyJPModule_startup: pyref new(claim) 0x7fb36d41aef0 3 builtin_function_or_method PY: PyJPModule_startup: pyref dtor(dec) 0x7fb36d41aef0 4 builtin_function_or_method PY: PyJPModule_startup: pyref dtor(dec) 0x7fb36c2a5140 4 list PY: PyJPModule_startup: pyref dtor(dec) 0x7fb36c2cd360 21 module JPContext::startJVM

  • JNI: JPContext::startJVM: JavaFrame JPException_init JNI: JPException_init: JPJavaFrame::FindClass JNI: JPException_init: JPJavaFrame::GetMethodID JNI: JPException_init: JPJavaFrame::FindClass JNI: JPException_init: JPJavaFrame::GetMethodID JNI: JPException_init: JPJavaFrame::GetMethodID JNI: JPException_init: JPJavaFrame::GetMethodID JNI: JPException_init: JPJavaFrame::GetMethodID

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpype-project/jpype/issues/719#issuecomment-621631564, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMFM6SJNZ4E5U6NPQC7A3TRPEIG3ANCNFSM4MTKBRIA .

Thrameos commented 4 years ago

Excellent. So now we have the problem isolated to this block of code. I am not sure why it segfaulted (but given this code is very hard to trigger it doesn't surprise me).

I am going to create a PR with some modifications with some additional diagnostics, so we can pin down the exact source of the error. You will need to

git remote set-url origin git@github.com:Thrameos/jpype.git
git fetch
git checkout ibm

And please bare with me as we may take one or shots to pin down the issue.

    JP_TRACE_IN("JPContext::startJVM");

    m_ConvertStrings = convertStrings;

    // Get the entry points in the shared library
    loadEntryPoints(vmPath);

    // Pack the arguments
    JavaVMInitArgs jniArgs;
    jniArgs.options = NULL;

    // prepare this ...
    jniArgs.version = USE_JNI_VERSION;
    jniArgs.ignoreUnrecognized = ignoreUnrecognized;

    jniArgs.nOptions = (jint) args.size();
    jniArgs.options = (JavaVMOption*) malloc(sizeof (JavaVMOption) * jniArgs.nOptions);
    memset(jniArgs.options, 0, sizeof (JavaVMOption) * jniArgs.nOptions);
    for (int i = 0; i < jniArgs.nOptions; i++)
    {
        jniArgs.options[i].optionString = (char*) args[i].c_str();
    }

    // Launch the JVM
    JNIEnv* env;
    CreateJVM_Method(&m_JavaVM, (void**) &env, (void*) &jniArgs);
    free(jniArgs.options);

    if (m_JavaVM == NULL)
    {
        JP_TRACE("Unable to start");
        JP_RAISE(PyExc_RuntimeError, "Unable to start JVM");
    }
Devender2806 commented 4 years ago

SO can i go the github site and download the latest zip file ? and then create a makefile ?.. https://github.com/jpype-project/jpype

On Thu, Apr 30, 2020 at 8:53 AM Karl Nelson notifications@github.com wrote:

Excellent. So now we have the problem isolated to this block of code. I am not sure why it segfaulted (but given this code is very hard to trigger it doesn't surprise me).

I am going to create a PR with some modifications with some additional diagnostics, so we can pin down the exact source of the error. You will need to

  • Repoint the origin of the git repo to the Thrameos repo version
  • Checkout the branch ibm

git remote set-url origin git@github.com:Thrameos/jpype.git git fetch git checkout ibm

  • Run python setup.py build_ext --makefile
  • Modify the makefile to remove dependency includes again.
  • You may need to delete the build directory as we don't have working dependencies .
  • Run make
  • Rerun the trace test program.

And please bare with me as we may take one or shots to pin down the issue.

JP_TRACE_IN("JPContext::startJVM");

m_ConvertStrings = convertStrings;

// Get the entry points in the shared library loadEntryPoints(vmPath);

// Pack the arguments JavaVMInitArgs jniArgs; jniArgs.options = NULL;

// prepare this ... jniArgs.version = USE_JNI_VERSION; jniArgs.ignoreUnrecognized = ignoreUnrecognized;

jniArgs.nOptions = (jint) args.size(); jniArgs.options = (JavaVMOption) malloc(sizeof (JavaVMOption) jniArgs.nOptions); memset(jniArgs.options, 0, sizeof (JavaVMOption) jniArgs.nOptions); for (int i = 0; i < jniArgs.nOptions; i++) { jniArgs.options[i].optionString = (char) args[i].c_str(); }

// Launch the JVM JNIEnv* env; CreateJVM_Method(&m_JavaVM, (void*) &env, (void) &jniArgs); free(jniArgs.options);

if (m_JavaVM == NULL) { JP_TRACE("Unable to start"); JP_RAISE(PyExc_RuntimeError, "Unable to start JVM"); }

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpype-project/jpype/issues/719#issuecomment-621866693, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMFM6RHHE4BVD7QCP5M6B3RPF7DZANCNFSM4MTKBRIA .

Thrameos commented 4 years ago

No you use git to check out a copy of the ibm branch from the Thrameos repo.

git clone git@github.com:Thrameos/jpype.gitmailto:git@github.com:Thrameos/jpype.git cd jpype git checkout ibm python setup.py build_ext –makefile make python tracingtest.py

Then send the diagnostics.

Devender2806 commented 4 years ago

Sure will work on it.

On Thu, Apr 30, 2020 at 1:06 PM Karl Nelson notifications@github.com wrote:

No you use git to check out a copy of the ibm branch from the Thrameos repo.

git clone git@github.com:Thrameos/jpype.git<mailto:git@github.com :Thrameos/jpype.git> cd jpype git checkout ibm python setup.py build_ext –makefile make python tracingtest.py

Then send the diagnostics.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpype-project/jpype/issues/719#issuecomment-622013871, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMFM6XEGGFAYSTFKQL4ZPLRPG42RANCNFSM4MTKBRIA .

Devender2806 commented 4 years ago

Iam unable to fulfill this request due to access restrictions (iam using my work machine). Is there an alternate way ?

On Thu, Apr 30, 2020 at 1:06 PM Karl Nelson notifications@github.com wrote:

No you use git to check out a copy of the ibm branch from the Thrameos repo.

git clone git@github.com:Thrameos/jpype.git<mailto:git@github.com :Thrameos/jpype.git> cd jpype git checkout ibm python setup.py build_ext –makefile make python tracingtest.py

Then send the diagnostics.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpype-project/jpype/issues/719#issuecomment-622013871, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMFM6XEGGFAYSTFKQL4ZPLRPG42RANCNFSM4MTKBRIA .

Thrameos commented 4 years ago

Yes you can down load a branch from Thrameos/jpype.

Just select the branch and then hit download.

image

Devender2806 commented 4 years ago

got these message when i run the

python setup.py build_ext --makefile

/home/dlali/jpype-ibm/setupext/platform.py:36: UserWarning: Falling back to provided JNI headers, since your provided JAVA_HOME "/QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit/jre/lib/ppc64/j9vm" does not provide jni.h ' JAVA_HOME "%s" does not provide jni.h' % java_home) /home/dlali/jpype-ibm/setupext/platform.py:76: UserWarning: Your platform is not being handled explicitly. It may work or not! " It may work or not!", UserWarning) /QOpenSys/pkgs/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'use_scm_version' warnings.warn(msg) running build_ext running build_java Jar cache is missing, using --enable-build-jar to recreate it. javac -d build/lib -g:none -source 1.7 -target 1.7 The java.version property was detected as input. This property is used as output only and has no effect on JVM initialization. Directory /QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit/jre/lib/ppc64/j9vm in the JAVA_HOME environment variable does not contain a Java Virtual Machine. None error: Error executing ['javac', '-d', 'build/lib', '-g:none', '-source', '1.7', '-target', '1.7']

On Thu, Apr 30, 2020 at 1:06 PM Karl Nelson notifications@github.com wrote:

No you use git to check out a copy of the ibm branch from the Thrameos repo.

git clone git@github.com:Thrameos/jpype.git<mailto:git@github.com :Thrameos/jpype.git> cd jpype git checkout ibm python setup.py build_ext –makefile make python tracingtest.py

Then send the diagnostics.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpype-project/jpype/issues/719#issuecomment-622013871, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMFM6XEGGFAYSTFKQL4ZPLRPG42RANCNFSM4MTKBRIA .

Devender2806 commented 4 years ago

I did try by removing JAVA_HOME as for some reason setting JAVA_HOME suppresses java and javac commands, but still same error.

On Thu, Apr 30, 2020 at 3:52 PM Devender Kumar devsaab@gmail.com wrote:

got these message when i run the

python setup.py build_ext --makefile

/home/dlali/jpype-ibm/setupext/platform.py:36: UserWarning: Falling back to provided JNI headers, since your provided JAVA_HOME "/QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit/jre/lib/ppc64/j9vm" does not provide jni.h ' JAVA_HOME "%s" does not provide jni.h' % java_home) /home/dlali/jpype-ibm/setupext/platform.py:76: UserWarning: Your platform is not being handled explicitly. It may work or not! " It may work or not!", UserWarning) /QOpenSys/pkgs/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'use_scm_version' warnings.warn(msg) running build_ext running build_java Jar cache is missing, using --enable-build-jar to recreate it. javac -d build/lib -g:none -source 1.7 -target 1.7 The java.version property was detected as input. This property is used as output only and has no effect on JVM initialization. Directory /QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit/jre/lib/ppc64/j9vm in the JAVA_HOME environment variable does not contain a Java Virtual Machine. None error: Error executing ['javac', '-d', 'build/lib', '-g:none', '-source', '1.7', '-target', '1.7']

On Thu, Apr 30, 2020 at 1:06 PM Karl Nelson notifications@github.com wrote:

No you use git to check out a copy of the ibm branch from the Thrameos repo.

git clone git@github.com:Thrameos/jpype.git<mailto:git@github.com :Thrameos/jpype.git> cd jpype git checkout ibm python setup.py build_ext –makefile make python tracingtest.py

Then send the diagnostics.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpype-project/jpype/issues/719#issuecomment-622013871, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMFM6XEGGFAYSTFKQL4ZPLRPG42RANCNFSM4MTKBRIA .

Thrameos commented 4 years ago

You still seem to have basic platform issues.

For example the line below shows that you have the JAVA_HOME pointing to a JRE not a JDK. JRE is the runtime not the build location. I would guess that jdk80 or jdk80/64bit is your JAVA_HOME, but without viewing the system it is only a guess.

"/QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit/jre/lib/ppc64/j9vm" does not provide jni.h ' JAVA_HOME "%s" does not provide jni.h' % java_home)

Java home is expected to contain something like: (important pieces are bin, include, and lib

bin  conf  docs  include  jmods  legal  lib  man  release

The JVM binary is looking for $JAVA_HOME/lib/server which should contain the shared library with the import piece being libjvm.so

Xusage.txt  classes.jsa  libjsig.so  libjvm.so

The PATH must contain $JAVA_HOME/bin which should contain something like where javac is required

jaotc      javac    jdb        jimage  jmap        jshell  keytool  rmiregistry
jar        javadoc  jdeprscan  jinfo   jmod        jstack  pack200  serialver
jarsigner  javap    jdeps      jjs     jps         jstat   rmic     unpack200
java       jcmd     jhsdb      jlink   jrunscript  jstatd  rmid

The header for java is pulled from $JAVA_HOME/include which contains something like, where jni.h is needed

classfile_constants.h  jdwpTransport.h  jni.h  jvmti.h  jvmticmlr.h  linux

If your system is vastly different in terms of the structure then you will need to modify the scripts. Unfortunately, without being able to see the structure of your JDK install I wouldn't be able to tell you how to begin.

Devender2806 commented 4 years ago

Thats the core issue i have been asking my i series admin to address, the JDK install, unfortunately i haven't been able to get an answer. I did try searching for JDK for aix but i haven't been able to get any till now, can you please point me to the correct website to download the JDK for AIX (as i understand IBM I is built over AIX).

On Thu, Apr 30, 2020 at 4:23 PM Karl Nelson notifications@github.com wrote:

You still seem to have basic platform issues.

For example the line below shows that you have the JAVA_HOME pointing to a JRE not a JDK. JRE is the runtime not the build location. I would guess that jdk80 or jdk80/64bit is your JAVA_HOME, but without viewing the system it is only a guess.

"/QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit/jre/lib/ppc64/j9vm" does not provide jni.h ' JAVA_HOME "%s" does not provide jni.h' % java_home)

Java home is expected to contain something like: (important pieces are bin, include, and lib

bin conf docs include jmods legal lib man release

The JVM binary is looking for $JAVA_HOME/lib/server which should contain the shared library with the import piece being libjvm.so

Xusage.txt classes.jsa libjsig.so libjvm.so

The PATH must contain $JAVA_HOME/bin which should contain something like where javac is required

jaotc javac jdb jimage jmap jshell keytool rmiregistry jar javadoc jdeprscan jinfo jmod jstack pack200 serialver jarsigner javap jdeps jjs jps jstat rmic unpack200 java jcmd jhsdb jlink jrunscript jstatd rmid

The header for java is pulled from $JAVA_HOME/include which contains something like, where jni.h is needed

classfile_constants.h jdwpTransport.h jni.h jvmti.h jvmticmlr.h linux

If your system is vastly different in terms of the structure then you will need to modify the scripts. Unfortunately, without being able to see the structure of your JDK install I wouldn't be able to tell you have to begin.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpype-project/jpype/issues/719#issuecomment-622121516, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMFM6TVUA6SX2F5BTMJ2JTRPHT55ANCNFSM4MTKBRIA .

Thrameos commented 4 years ago

Isn't it at their web site. Unfortunately I don't know anything about AIX so I can't be of assistance. My first guess given your path would be /QOpenSys/QIBM/ProdData/JavaVM/jdk80/ but that is only a guess.

https://developer.ibm.com/javasdk/support/aix-download-service/

Devender2806 commented 4 years ago

Yes I found that directory and I did attempt to use it earlier with testing but i kept getting core dump, anyways i again ran the make file command now i get this after setting JAVA_HOME to /QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit/

/home/dlali/jpype-ibm/setupext/platform.py:76: UserWarning: Your platform is not being handled explicitly. It may work or not! " It may work or not!", UserWarning) Traceback (most recent call last): File "setup.py", line 3, in import setupext File "/home/dlali/jpype-ibm/setupext/init.py", line 3, in from . import platform File "/home/dlali/jpype-ibm/setupext/platform.py", line 80, in [os.path.join(java_home, 'include', jni_md_platform)] File "/QOpenSys/pkgs/lib/python3.6/posixpath.py", line 94, in join genericpath._check_arg_types('join', a, *p) File "/QOpenSys/pkgs/lib/python3.6/genericpath.py", line 149, in _check_arg_types (funcname, s.class.name)) from None TypeError: join() argument must be str or bytes, not 'NoneType'

On Thu, Apr 30, 2020 at 4:36 PM Karl Nelson notifications@github.com wrote:

Isn't it at their web site. Unfortunately I don't know anything about AIX so I can't be of assistance. My first guess given your path would be /QOpenSys/QIBM/ProdData/JavaVM/jdk80/ but that is only a guess.

https://developer.ibm.com/javasdk/support/aix-download-service/

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpype-project/jpype/issues/719#issuecomment-622127506, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMFM6UU6KG5E6XV4FF6OC3RPHVNXANCNFSM4MTKBRIA .

Thrameos commented 4 years ago

Sounds like I need to know what sys.platform is reporting. You will then need to go to setupext/platform.py and add a new section with the details for your machine type. You may be able to use linux as a sheleton.

elif sys.platform.startswith('linux'):
    platform_specific['libraries'] = ['dl']
    platform_specific['extra_compile_args'] = ['-g3', '-std=c++11']
    jni_md_platform = 'linux'
Devender2806 commented 4 years ago

ok this is platform, platform-> aix7, which i got from platform.py, i have the gcc compiler installed.

On Thu, Apr 30, 2020 at 6:09 PM Karl Nelson notifications@github.com wrote:

Sounds like I need to know what sys.platform is reporting. You will then need to go to setupext/platform.py and add a new section with the details for your machine type. You may be able to use linux as a sheleton.

elif sys.platform.startswith('linux'): platform_specific['libraries'] = ['dl'] platform_specific['extra_compile_args'] = ['-g3', '-std=c++11'] jni_md_platform = 'linux'

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpype-project/jpype/issues/719#issuecomment-622166339, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMFM6S6BZETQRJH2J6X3ILRPIALLANCNFSM4MTKBRIA .

Thrameos commented 4 years ago

So start by adding a section in setupext/platform.py

elif sys.platform.startswith('aix7'):
    platform_specific['libraries'] = ['dl']
    platform_specific['extra_compile_args'] = ['-g3', '-std=c++11']
    jni_md_platform = 'aix7'

(I am assuming it is similar to linux)

Devender2806 commented 4 years ago

Thank you, just a silly question (as iam not a java expert), what is the difference between these 2 statements:

  1. using cx_Oracle and then use cx_Oracle.connect method Versus
  2. directly using conn=('oracle.jdbc.driver.OracleDriver', 'jdbc:oracle:thin:<rest of the connection string) -> is this some kind of non-persistent connection ?

On Thu, Apr 30, 2020 at 6:51 PM Karl Nelson notifications@github.com wrote:

So start by adding a section in setupext/platform.py

elif sys.platform.startswith('aix7'): platform_specific['libraries'] = ['dl'] platform_specific['extra_compile_args'] = ['-g3', '-std=c++11'] jni_md_platform = 'aix7'

(I am assuming it is similar to linux)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpype-project/jpype/issues/719#issuecomment-622179212, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMFM6V4HFB45IFKDAV73KLRPIFGTANCNFSM4MTKBRIA .

Devender2806 commented 4 years ago

now i get this Found native jni.h at /QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit/include /QOpenSys/pkgs/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'use_scm_version' warnings.warn(msg) running build_ext running build_java Jar cache is missing, using --enable-build-jar to recreate it. javac -d build/lib -g:none -source 1.7 -target 1.7 The java.version property was detected as input. This property is used as output only and has no effect on JVM initialization. javac: no source files Usage: javac use -help for a list of possible options None error: Error executing ['javac', '-d', 'build/lib', '-g:none', '-source', '1.7', '-target', '1.7']

On Thu, Apr 30, 2020 at 6:51 PM Karl Nelson notifications@github.com wrote:

So start by adding a section in setupext/platform.py

elif sys.platform.startswith('aix7'): platform_specific['libraries'] = ['dl'] platform_specific['extra_compile_args'] = ['-g3', '-std=c++11'] jni_md_platform = 'aix7'

(I am assuming it is similar to linux)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpype-project/jpype/issues/719#issuecomment-622179212, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMFM6V4HFB45IFKDAV73KLRPIFGTANCNFSM4MTKBRIA .

Thrameos commented 4 years ago

I couldn’t even hazard a guess. I am not a database expert.

Thrameos commented 4 years ago

So the code that is being called is

def compileJava(self, coverage):
    target_version = "1.7"
    srcs = glob.glob('native/java/**/*.java', recursive=True)
    src1 = [i for i in srcs if "JPypeClassLoader" in i]
    src2 = [i for i in srcs if not "JPypeClassLoader" in i]
    cmd1 = shlex.split('javac -d build/lib -g:none -source %s -target %s' %
                       (target_version, target_version))
    cmd1.extend(src1)
    debug = "-g:none"
    if coverage:
        debug = "-g:lines,vars,source"
    cmd2 = shlex.split('javac -d build/classes %s -source %s -target %s -cp build/lib' %
                       (debug, target_version, target_version))
    cmd2.extend(src2)
    os.makedirs("build/lib", exist_ok=True)
    os.makedirs("build/classes", exist_ok=True)
    self.announce("  %s" % " ".join(cmd1), level=distutils.log.INFO)
    subprocess.check_call(cmd1)
    self.announce("  %s" % " ".join(cmd2), level=distutils.log.INFO)
    subprocess.check_call(cmd2)
    cmd3 = shlex.split(
        'jar cvf build/lib/org.jpype.jar -C build/classes/ .')
    self.announce("  %s" % " ".join(cmd3), level=distutils.log.INFO)
    subprocess.check_call(cmd3)

is there something missing in native/java/**. Unless you are running this at the wrong level, I am not sure how the glob command can't find the binaries to include.

Devender2806 commented 4 years ago

my bad, missed few files, so i was able to create Makefile with few warnings, so when i execute make, below are the messages /QOpenSys/pkgs/lib/python3.6/config-3.6m/ld_so_aix g++ -pthread -pthread -bI:/QOpenSys/pkgs/lib/python3.6/config-3.6m/python.exp -Wl,-blibpath:/QOpenSys/pkgs/lib:/QOpenSys/usr/lib -L/QOpenSys/pkgs/lib -ldl -ldl -o _jpype.so ld_so_aix: No input files; exiting. make: The error code from the last command is 2.

On Thu, Apr 30, 2020 at 7:12 PM Karl Nelson notifications@github.com wrote:

So the code that is being called is

def compileJava(self, coverage): target_version = "1.7" srcs = glob.glob('native/java/*/.java', recursive=True) src1 = [i for i in srcs if "JPypeClassLoader" in i] src2 = [i for i in srcs if not "JPypeClassLoader" in i] cmd1 = shlex.split('javac -d build/lib -g:none -source %s -target %s' % (target_version, target_version)) cmd1.extend(src1) debug = "-g:none" if coverage: debug = "-g:lines,vars,source" cmd2 = shlex.split('javac -d build/classes %s -source %s -target %s -cp build/lib' % (debug, target_version, target_version)) cmd2.extend(src2) os.makedirs("build/lib", exist_ok=True) os.makedirs("build/classes", exist_ok=True) self.announce(" %s" % " ".join(cmd1), level=distutils.log.INFO) subprocess.check_call(cmd1) self.announce(" %s" % " ".join(cmd2), level=distutils.log.INFO) subprocess.check_call(cmd2) cmd3 = shlex.split( 'jar cvf build/lib/org.jpype.jar -C build/classes/ .') self.announce(" %s" % " ".join(cmd3), level=distutils.log.INFO) subprocess.check_call(cmd3)

is there something missing in native/java/**. Unless you are running this at the wrong level, I am not sure how the glob command can't find the binaries to include.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpype-project/jpype/issues/719#issuecomment-622185163, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMFM6QBKEO4MEBK5EALZPTRPIHWPANCNFSM4MTKBRIA .

Devender2806 commented 4 years ago

checked the path and the file exists ld_so_aix

On Thu, Apr 30, 2020 at 7:45 PM Devender Kumar devsaab@gmail.com wrote:

my bad, missed few files, so i was able to create Makefile with few warnings, so when i execute make, below are the messages /QOpenSys/pkgs/lib/python3.6/config-3.6m/ld_so_aix g++ -pthread -pthread -bI:/QOpenSys/pkgs/lib/python3.6/config-3.6m/python.exp -Wl,-blibpath:/QOpenSys/pkgs/lib:/QOpenSys/usr/lib -L/QOpenSys/pkgs/lib -ldl -ldl -o _jpype.so ld_so_aix: No input files; exiting. make: The error code from the last command is 2.

On Thu, Apr 30, 2020 at 7:12 PM Karl Nelson notifications@github.com wrote:

So the code that is being called is

def compileJava(self, coverage): target_version = "1.7" srcs = glob.glob('native/java/*/.java', recursive=True) src1 = [i for i in srcs if "JPypeClassLoader" in i] src2 = [i for i in srcs if not "JPypeClassLoader" in i] cmd1 = shlex.split('javac -d build/lib -g:none -source %s -target %s' % (target_version, target_version)) cmd1.extend(src1) debug = "-g:none" if coverage: debug = "-g:lines,vars,source" cmd2 = shlex.split('javac -d build/classes %s -source %s -target %s -cp build/lib' % (debug, target_version, target_version)) cmd2.extend(src2) os.makedirs("build/lib", exist_ok=True) os.makedirs("build/classes", exist_ok=True) self.announce(" %s" % " ".join(cmd1), level=distutils.log.INFO) subprocess.check_call(cmd1) self.announce(" %s" % " ".join(cmd2), level=distutils.log.INFO) subprocess.check_call(cmd2) cmd3 = shlex.split( 'jar cvf build/lib/org.jpype.jar -C build/classes/ .') self.announce(" %s" % " ".join(cmd3), level=distutils.log.INFO) subprocess.check_call(cmd3)

is there something missing in native/java/**. Unless you are running this at the wrong level, I am not sure how the glob command can't find the binaries to include.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpype-project/jpype/issues/719#issuecomment-622185163, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMFM6QBKEO4MEBK5EALZPTRPIHWPANCNFSM4MTKBRIA .

Thrameos commented 4 years ago

You have misread the message.... No input files means that again the list of files that have been collected by the makefile is empty.

So lets use the alternative method ... python setup.py --enable-tracing build_exe --inplace

Devender2806 commented 4 years ago

its missing the jp_pythontypes.h file now, i couldn't find it in the native/common/include

On Thu, Apr 30, 2020 at 8:25 PM Karl Nelson notifications@github.com wrote:

You have misread the message.... No input files means that again the list of files that have been collected by the makefile is empty.

So lets use the alternative method ... python setup.py --enable-tracing build_exe --inplace

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpype-project/jpype/issues/719#issuecomment-622204167, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMFM6V64GTWHLRVHIJ2A6LRPIQKDANCNFSM4MTKBRIA .

Devender2806 commented 4 years ago

My Bad found in jpype-ibm/native/python/include

On Thu, Apr 30, 2020 at 9:10 PM Devender Kumar devsaab@gmail.com wrote:

its missing the jp_pythontypes.h file now, i couldn't find it in the native/common/include

On Thu, Apr 30, 2020 at 8:25 PM Karl Nelson notifications@github.com wrote:

You have misread the message.... No input files means that again the list of files that have been collected by the makefile is empty.

So lets use the alternative method ... python setup.py --enable-tracing build_exe --inplace

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpype-project/jpype/issues/719#issuecomment-622204167, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMFM6V64GTWHLRVHIJ2A6LRPIQKDANCNFSM4MTKBRIA .

Devender2806 commented 4 years ago

This is the error while creating the build_ext now:- native/common/jp_javaframe.cpp: In member function '_jweak JPJavaFrame::NewWeakGlobalRef(jobject)': native/common/jp_javaframe.cpp:129:9: error: invalid conversion from 'jobject {aka _jobject}' to 'jweak {aka _jweak*}' [-fpermissive] return obj;

On Thu, Apr 30, 2020 at 8:25 PM Karl Nelson notifications@github.com wrote:

You have misread the message.... No input files means that again the list of files that have been collected by the makefile is empty.

So lets use the alternative method ... python setup.py --enable-tracing build_exe --inplace

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpype-project/jpype/issues/719#issuecomment-622204167, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMFM6V64GTWHLRVHIJ2A6LRPIQKDANCNFSM4MTKBRIA .

Thrameos commented 4 years ago

I agree with that error. The code should read


jweak JPJavaFrame::NewWeakGlobalRef(jobject obj)
{
    JP_TRACE_JAVA("New weak", obj);
    jweak obj2 = m_Env->NewWeakGlobalRef(obj);
    JP_TRACE_JAVA("Weak", obj2);
    return obj2;
}
Devender2806 commented 4 years ago

Thank You. I executed python setup.py --enable-tracing build_ext --inplace and now i have _jpype.so file in my local directory(where i ran the commands).

On Thu, Apr 30, 2020 at 10:57 PM Karl Nelson notifications@github.com wrote:

I agree with that error. The code should read

jweak JPJavaFrame::NewWeakGlobalRef(jobject obj) { JP_TRACE_JAVA("New weak", obj); jweak obj2 = m_Env->NewWeakGlobalRef(obj); JP_TRACE_JAVA("Weak", obj2); return obj2; }

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpype-project/jpype/issues/719#issuecomment-622236100, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMFM6R36FZB4M7SAPSTQBDRPJCBJANCNFSM4MTKBRIA .

Thrameos commented 4 years ago

Did the test case run? If so proceed to python setup.py test. If that works then rebuild without the tracing.

Devender2806 commented 4 years ago

Iam sorry but can you tell me which test case to be run ? so that iam not overstepping..

On Fri, May 1, 2020 at 9:56 AM Karl Nelson notifications@github.com wrote:

Did the test case run? If so proceed to python setup.py test. If that works then rebuild without the tracing.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpype-project/jpype/issues/719#issuecomment-622421127, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMFM6XAJDSND3JRWMIMMN3RPLPK3ANCNFSM4MTKBRIA .

Devender2806 commented 4 years ago

can i run this ? python -m pytester.py test/jpypetes

On Fri, May 1, 2020 at 9:56 AM Karl Nelson notifications@github.com wrote:

Did the test case run? If so proceed to python setup.py test. If that works then rebuild without the tracing.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpype-project/jpype/issues/719#issuecomment-622421127, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMFM6XAJDSND3JRWMIMMN3RPLPK3ANCNFSM4MTKBRIA .

Thrameos commented 4 years ago

Test case 1:

Run helloworld.

import jpype
jpype.startJVM()
jpype.java.lang.System.out.println(“Hello world”)

Test case 2:

Run the test suite using

python setup.py test_java # build the test suite
python -m pip install -r test-requirements.txt   # install the requirement to test
python -m pytest test/jpypetest  # run the tests
Devender2806 commented 4 years ago

ok, i simply tried import jpype and i printed a big list of items and finally this

JPContext::shutdown JPContext::shutdown: EXCEPTION THROWN 0x9001000a05dcd18 Attempt to shutdown without a live JVM JPContext::shutdown: EXCEPTION FROM: native/common/jp_context.cpp 301 terminate called after throwing an instance of 'JPypeException' IOT/Abort trap (core dumped)

On Fri, May 1, 2020 at 10:34 AM Karl Nelson notifications@github.com wrote:

Test case 1:

Run helloworld.

import jpype jpype.startJVM() jpype.java.lang.System.out.println(“Hello world”)

Test case 2:

Run the test suite using

python setup.py test_java # build the test suite python -m pip install -r test-requirements.txt # install the requirement to test python -m pytest test/jpypetest # run the tests

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpype-project/jpype/issues/719#issuecomment-622436274, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMFM6SOWMFCEHBUIZVOEYLRPLTWTANCNFSM4MTKBRIA .

Thrameos commented 4 years ago

Did hello world run? If not please attach that console output as a tracelog.

Devender2806 commented 4 years ago

Please find attached a text file with the console output for import jpype.

On Fri, May 1, 2020 at 10:49 AM Karl Nelson notifications@github.com wrote:

Did hello world run? If not please attach that console output as a tracelog.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpype-project/jpype/issues/719#issuecomment-622442723, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMFM6XDI7BRUAQM7R5KG2DRPLVQZANCNFSM4MTKBRIA .

Thrameos commented 4 years ago

Please use the github site to attach. I don't see the attachment.

Devender2806 commented 4 years ago

trace.txt

This is the trace file.

Devender2806 commented 4 years ago

Done.

On Fri, May 1, 2020 at 12:02 PM Karl Nelson notifications@github.com wrote:

Please use the github site to attach. I don't see the attachment.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpype-project/jpype/issues/719#issuecomment-622472066, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMFM6TTIUJOISDAHGDKBQTRPL6DHANCNFSM4MTKBRIA .

Thrameos commented 4 years ago

Does this trace contain a startJVM? I just see an import and the failed terminate.

Devender2806 commented 4 years ago

no it doesn't. I checked that. all I did was have import jpype in my python code and i executed it.

On Fri, May 1, 2020 at 12:13 PM Karl Nelson notifications@github.com wrote:

Does this trace contain a startJVM? I just see an import and the failed terminate.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpype-project/jpype/issues/719#issuecomment-622476235, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMFM6XUD4DAEXOXEO6W2QLRPL7KBANCNFSM4MTKBRIA .