-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to use JPype on IBM I series #719
Comments
I haven't done much with that platform but lets first go through the basics.
This is still pretty far from specific.
|
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 ***@***.***> 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
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6X2YIALABB6JQ3PA6TRO6GANANCNFSM4MTKBRIA>
.
|
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
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. |
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 ***@***.***> 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
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6SDBFTGCGXXPMDZBETRPAVHXANCNFSM4MTKBRIA>
.
|
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. |
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 ***@***.***> 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
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6UXCKXX6VXW7UO5HGDRPBK2TANCNFSM4MTKBRIA>
.
|
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.
|
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 ***@***.***> 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
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6UIVPJAE5FKB5AG72DRPDI7LANCNFSM4MTKBRIA>
.
|
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.
|
Lets start with something simple... When I run the script to test tracing
The tracing program should be run at the top level of the jpype repo that you have build using I get an output like. Run this same command on your system and we can see what we get.
|
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 ***@***.***> 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
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6SJNZ4E5U6NPQC7A3TRPEIG3ANCNFSM4MTKBRIA>
.
|
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
And please bare with me as we may take one or shots to pin down the issue.
|
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 ***@***.***> 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 ***@***.***: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
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6RHHE4BVD7QCP5M6B3RPF7DZANCNFSM4MTKBRIA>
.
|
No you use git to check out a copy of the ibm branch from the Thrameos repo.
git clone [email protected]:Thrameos/jpype.git<mailto:[email protected]:Thrameos/jpype.git>
cd jpype
git checkout ibm
python setup.py build_ext –makefile
make
python tracingtest.py
Then send the diagnostics.
|
Sure will work on it.
…On Thu, Apr 30, 2020 at 1:06 PM Karl Nelson ***@***.***> wrote:
No you use git to check out a copy of the ibm branch from the Thrameos
repo.
git clone ***@***.******@***.***
: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
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6XEGGFAYSTFKQL4ZPLRPG42RANCNFSM4MTKBRIA>
.
|
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 ***@***.***> wrote:
No you use git to check out a copy of the ibm branch from the Thrameos
repo.
git clone ***@***.******@***.***
: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
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6XEGGFAYSTFKQL4ZPLRPG42RANCNFSM4MTKBRIA>
.
|
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 ***@***.***> wrote:
No you use git to check out a copy of the ibm branch from the Thrameos
repo.
git clone ***@***.******@***.***
: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
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6XEGGFAYSTFKQL4ZPLRPG42RANCNFSM4MTKBRIA>
.
|
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 ***@***.***> 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 ***@***.***>
wrote:
> No you use git to check out a copy of the ibm branch from the Thrameos
> repo.
>
> git clone ***@***.******@***.***
> :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
> <#719 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/APMFM6XEGGFAYSTFKQL4ZPLRPG42RANCNFSM4MTKBRIA>
> .
>
|
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 Java home is expected to contain something like: (important pieces are bin, include, and lib
The JVM binary is looking for
The PATH must contain $JAVA_HOME/bin which should contain something like where javac is required
The header for java is pulled from $JAVA_HOME/include which contains something like, where jni.h is needed
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. |
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 ***@***.***> 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
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6TVUA6SX2F5BTMJ2JTRPHT55ANCNFSM4MTKBRIA>
.
|
Isn't it at their web site. Unfortunately I don't know anything about AIX so I can't be of assistance. https://developer.ibm.com/javasdk/support/aix-download-service/ |
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 <module>
import setupext
File "/home/dlali/jpype-ibm/setupext/__init__.py", line 3, in <module>
from . import platform
File "/home/dlali/jpype-ibm/setupext/platform.py", line 80, in <module>
[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 ***@***.***> 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
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6UU6KG5E6XV4FF6OC3RPHVNXANCNFSM4MTKBRIA>
.
|
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.
|
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 ***@***.***> 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
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6S6BZETQRJH2J6X3ILRPIALLANCNFSM4MTKBRIA>
.
|
So start by adding a section in setupext/platform.py
(I am assuming it is similar to linux) |
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 ***@***.***> 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
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6V4HFB45IFKDAV73KLRPIFGTANCNFSM4MTKBRIA>
.
|
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 <options> <source files>
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 ***@***.***> 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
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6V4HFB45IFKDAV73KLRPIFGTANCNFSM4MTKBRIA>
.
|
I couldn’t even hazard a guess. I am not a database expert.
|
I was able to come up with a c code to start JVM based on the
documentation, but it still gives the same errors while starting JVM from
jpype.
On Mon, May 4, 2020 at 12:52 PM Karl Nelson <[email protected]>
wrote:
… It is opening the JVM and then dying internally. Thus the best solution it
to write a short C or C++ code the replicates the actions of JPype loading
and starting the JVM. Once we can isolate the problem as to is it something
that JPype (or the python options used to compile JPype) or is it something
wrong with the JVM or the libraries/paths used to start it, then we can
make some progress.
--Karl
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for
Windows 10
From: ***@***.***>
Sent: Monday, May 4, 2020 10:47 AM
To: ***@***.***>
Cc: Nelson, Karl ***@***.***>; Comment<mailto:
***@***.***>
Subject: Re: [jpype-project/jpype] Unable to use JPype on IBM I series
(#719)
If i open the latest core.dmp file i see the following: Does this mean it
started a JVM ? as earlier the message was always no JRE
PID: 13587 : JRE 1.8.0 OS/400 ppc64-64
and a further info proc revealse:-
JIT was enabled for this runtime
AOT enabled, FSD disabled, HCR enabled, JIT enabled
On Sun, May 3, 2020 at 7:09 PM Karl Nelson ***@***.***>
wrote:
> As near as I can tell the issue is outside of JPype as this point. The
> next step would be copy the code for setting of the JVM (load the
library,
> call createJVM) in a short C++ code. Then repeat it without the dlopen
but
> with a hard linkage. These should be straight out the the IBM
documentation.
>
> If it works when calling as a test case but is failing in JPype we can
> diagnosis the issue by looking for a working pattern. If it fails outside
> of JPype using the standard IBM recommended createJVM example then the
> problem with a site problem with the JVM and you will likely need to
> contact an administrator for help.
>
> An example to start from can be found at...
>
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_71/rzaha/invapiex.htm
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <
#719 (comment)>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/APMFM6UHJ7KNR46ZWDIINUTRPYBR5ANCNFSM4MTKBRIA
>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<
#719 (comment)>,
or unsubscribe<
https://github.com/notifications/unsubscribe-auth/AG5TEUK5YOPQQAAVOH6JOB3RP35UNANCNFSM4MTKBRIA
>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6SUGACLCORRCLMKD6DRP36FZANCNFSM4MTKBRIA>
.
|
<jitDump>
#INFO: Crashed in application thread 000000003000E700.
#INFO: Found 0 JITed methods on Java stack.
#INFO: DUMP FAILED: no methods to recompile
</jitDump>
On Mon, May 4, 2020 at 12:52 PM Karl Nelson <[email protected]>
wrote:
… It is opening the JVM and then dying internally. Thus the best solution it
to write a short C or C++ code the replicates the actions of JPype loading
and starting the JVM. Once we can isolate the problem as to is it something
that JPype (or the python options used to compile JPype) or is it something
wrong with the JVM or the libraries/paths used to start it, then we can
make some progress.
--Karl
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for
Windows 10
From: ***@***.***>
Sent: Monday, May 4, 2020 10:47 AM
To: ***@***.***>
Cc: Nelson, Karl ***@***.***>; Comment<mailto:
***@***.***>
Subject: Re: [jpype-project/jpype] Unable to use JPype on IBM I series
(#719)
If i open the latest core.dmp file i see the following: Does this mean it
started a JVM ? as earlier the message was always no JRE
PID: 13587 : JRE 1.8.0 OS/400 ppc64-64
and a further info proc revealse:-
JIT was enabled for this runtime
AOT enabled, FSD disabled, HCR enabled, JIT enabled
On Sun, May 3, 2020 at 7:09 PM Karl Nelson ***@***.***>
wrote:
> As near as I can tell the issue is outside of JPype as this point. The
> next step would be copy the code for setting of the JVM (load the
library,
> call createJVM) in a short C++ code. Then repeat it without the dlopen
but
> with a hard linkage. These should be straight out the the IBM
documentation.
>
> If it works when calling as a test case but is failing in JPype we can
> diagnosis the issue by looking for a working pattern. If it fails outside
> of JPype using the standard IBM recommended createJVM example then the
> problem with a site problem with the JVM and you will likely need to
> contact an administrator for help.
>
> An example to start from can be found at...
>
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_71/rzaha/invapiex.htm
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <
#719 (comment)>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/APMFM6UHJ7KNR46ZWDIINUTRPYBR5ANCNFSM4MTKBRIA
>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<
#719 (comment)>,
or unsubscribe<
https://github.com/notifications/unsubscribe-auth/AG5TEUK5YOPQQAAVOH6JOB3RP35UNANCNFSM4MTKBRIA
>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6SUGACLCORRCLMKD6DRP36FZANCNFSM4MTKBRIA>
.
|
Good that means the problem is something in the library path or JVM installation rather than in the Python side.
|
are there any diagnostics we can do to pin point any library issues or jvm
itself ? so that i can take it up with admin
…On Mon, May 4, 2020 at 6:18 PM Karl Nelson ***@***.***> wrote:
Good that means the problem is something in the library path or JVM
installation rather than in the Python side.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6UIJYM7APO7DTTHTKLRP5ENDANCNFSM4MTKBRIA>
.
|
Unfortunately I have no insight into aix. I usually look on the internet to see if I can find posts on how to find out what shared libraries a shared library depends on.
|
Have shared the core and trace files with AIX admin and requested him to
share with IBM for their review, need to wait for IBM to respond.
…On Mon, May 4, 2020 at 6:45 PM Karl Nelson ***@***.***> wrote:
Unfortunately I have no insight into aix. I usually look on the internet
to see if I can find posts on how to find out what shared libraries a
shared library depends on.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6RWXGXKKBIUTNXXNM3RP5HSBANCNFSM4MTKBRIA>
.
|
quick question could the dlopen of the libjvm.so file could be a
potential reason ?, can we test with a file link ?, is there a way i can do
screen share with you to show you the file system ?
…On Mon, May 4, 2020 at 6:45 PM Karl Nelson ***@***.***> wrote:
Unfortunately I have no insight into aix. I usually look on the internet
to see if I can find posts on how to find out what shared libraries a
shared library depends on.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6RWXGXKKBIUTNXXNM3RP5HSBANCNFSM4MTKBRIA>
.
|
It could. You can try to connect to the JVM using a simple demo program. I know that the diagnostic information on a linked library is much better than the dlopen method. Perhaps it will give you some insight into what is going wrong in the library loading process. |
thanks. Another question i have is with the CLASSPATH, it should point to
the jdbc jar file correct ? i have ojdbc14.jar in JAVA_HOME/lib, is this
the correct file?
…On Sat, May 9, 2020 at 7:10 PM Karl Nelson ***@***.***> wrote:
It could. You can try to connect to the JVM using a simple demo program. I
know that the diagnostic information on a linked library is much better
than the dlopen method. Perhaps it will give you some insight into what is
going wrong in the library loading process.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6UXGFP4LQU5Z2J6YE3RQXWHPANCNFSM4MTKBRIA>
.
|
Likely. Though if it has a native component then you will need to also set the library path. I know that I have a similar issue when using MSSQL. Some jars also have a DLL or SO file that needs to be located. If you get failed to load then it could be an issue.
|
I am going to try to set up the same script for Unix that I did in #729. Perhaps that would help find the issue. |
I added a similar debugging procedure in #739. Perhaps that would assist you in identifying the issue. |
ok i will check. Meanwhile will followup with my admin on IBM's response to
the dump and trc files i sent. I suspect the dlopen to be the culprit, as
my admin too was talking about creating links for the JVM files during his
initial discussion with IBM
…On Sat, May 9, 2020 at 8:38 PM Karl Nelson ***@***.***> wrote:
I added a similar debugging procedure in #739
<#739>. Perhaps that would
assist you in identifying the issue.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6QIQYCWXKISEE5DCXTRQYAQ7ANCNFSM4MTKBRIA>
.
|
so i need to update those 4 files in my current jpype setup and then
re-build correct ?
…On Sat, May 9, 2020 at 8:38 PM Karl Nelson ***@***.***> wrote:
I added a similar debugging procedure in #739
<#739>. Perhaps that would
assist you in identifying the issue.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6QIQYCWXKISEE5DCXTRQYAQ7ANCNFSM4MTKBRIA>
.
|
Those files are independent of the project. Just a readme and a few test programs you can try to see if it helps you resolve the issue. No need to rebuild the full project. Just walk through the project/debug/unix/Readme.rst script and see if anything there works.
|
very useful information, especially the architecture of libjvm, infact that
is why my AIX admin was referring to a missing link of this file in usr/lib
directory. Most likely we can expect something once that link is created.
…On Sat, May 9, 2020 at 9:00 PM Karl Nelson ***@***.***> wrote:
Those files are independent of the project. Just a readme and a few test
programs you can try to see if it helps you resolve the issue. No need to
rebuild the full project. Just walk through the
project/debug/unix/Readme.rst script and see if anything there works.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6UKW53A7JJZ6SCYZGDRQYDDTANCNFSM4MTKBRIA>
.
|
the ldd equivalent in AIX is dump, so i ran a dump -x64 -H libjvm.so and
found the below:-
/osxpf/v7r4m0.cuep/bld/shadow/pase.pgm/p5.cuep/compilers/vac1313/opt/IBM/xlc/13.1.3/../../../../usr/lpp/xlC/lib:/osxpf/v7r4m0.cuep/bld/shadow/pase.pgm/p5.cuep/compilers/vac1313/opt/IBM/xlC/13.1.3/lib/aix61:/osxpf/v7r4m0.cuep/bld/shadow/pase.pgm/p5.cuep/compilers/vac1313/opt/IBM/xlC/13.1.3/lib:/osxpf/v7r4m0.cuep/bld/shadow/pase.pgm/p5.cuep/compilers/vac1313/opt/IBM/xlc/13.1.3/lib/aix61:/osxpf/v7r4m0.cuep/bld/shadow/pase.pgm/p5.cuep/compilers/vac1313/opt/IBM/xlc/13.1.3/lib:/osxpf/v7r4m0.cuep/bld/shadow/pase.pgm/p5.cuep/compilers/vac1313/usr/vac/lib/aix53:/afs/
rchland.ibm.com/usr8/j9/jdk71-32bit-sdk/sdk/jre/lib/ppc/j9vm:/afs/rchland.ibm.com/usr8/j9/jdk71-32bit-sdk/sdk/jre/lib/ppc:/afs/rchland.ibm.com/usr8/j9/jdk71-32bit-sdk/sdk/jre/../lib/ppc:/usr/lib
1 libdl.a shr_64.o
2 libc_r.a shr_64.o
3 libi5osenv.so
…On Sat, May 9, 2020 at 9:00 PM Karl Nelson ***@***.***> wrote:
Those files are independent of the project. Just a readme and a few test
programs you can try to see if it helps you resolve the issue. No need to
rebuild the full project. Just walk through the
project/debug/unix/Readme.rst script and see if anything there works.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6UKW53A7JJZ6SCYZGDRQYDDTANCNFSM4MTKBRIA>
.
|
looks like IBM-I series has hybrid library setup which means the shared
libraries have both 32 and 64 bit components and we will need to explicitly
extract/create the 64 bit versions from the hybrid setup. So its possible
that startjvm is landing into an issue of hitting the hybrid setup and
unable to find explicit shared libraries.
…On Sat, May 9, 2020 at 9:00 PM Karl Nelson ***@***.***> wrote:
Those files are independent of the project. Just a readme and a few test
programs you can try to see if it helps you resolve the issue. No need to
rebuild the full project. Just walk through the
project/debug/unix/Readme.rst script and see if anything there works.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6UKW53A7JJZ6SCYZGDRQYDDTANCNFSM4MTKBRIA>
.
|
Sounds like my information is useful then… Have you tried compiling a 32 bit version of the test code and running it? Perhaps the 32 bit JVM is workable.
|
Yes sir, but then we will hit roadblock with 64 bit python ?,
…On Wed, May 13, 2020 at 11:41 AM Karl Nelson ***@***.***> wrote:
Sounds like my information is useful then… Have you tried compiling a 32
bit version of the test code and running it? Perhaps the 32 bit JVM is
workable.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6SR5JG5RPG6F4EMUDDRRLETNANCNFSM4MTKBRIA>
.
|
Do we need a ojdbc*.jar file in CLASSPATH for jpype to work ?, can you
please advise on the dependencies ?
…On Wed, May 13, 2020 at 11:41 AM Karl Nelson ***@***.***> wrote:
Sounds like my information is useful then… Have you tried compiling a 32
bit version of the test code and running it? Perhaps the 32 bit JVM is
workable.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6SR5JG5RPG6F4EMUDDRRLETNANCNFSM4MTKBRIA>
.
|
It is not required to testing JPype.
Once you have JPype working you can move on the to database tasks.
|
Iam yet to hear from IBM or my system administrator on the logs i shared
with them. Trying to get some answers on stackoverflow, as i have
restricted access on my AIX box and may not get much help, is there any
other way to diagnose the issue?
…On Wed, May 13, 2020 at 2:59 PM Karl Nelson ***@***.***> wrote:
It is not required to testing JPype.
Once you have JPype working you can move on the to database tasks.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMFM6XJEUGCPRRQG7U7CHDRRL3YLANCNFSM4MTKBRIA>
.
|
Not that I am aware of. My only suggestion would be to copy the JVM and required libraries into a user space so that you can try to assemble a working version. But that may not possible on AIX. |
Hi, did you find a way to work? I’m having the same issue. python code trying to use jpype to write a simple hello world didnt work. I’m on an AIX 7.1 box. I could start the JVM machine but this simple code doesnt work and dump: How should I set the vars: java_home, libpath, classpath? Any other var needs to be set? |
Unfortunately, Java 6 and Java 7 are both past service life for the majority of computers. The oldest version of Java that we currently support is Java 8. Many features of the Java were needed to achieve JPype and these older platforms are now very difficult to test and support. If you can upgrade to Java 8 then it should work. JPype 0.6.3 is likely the last version that will operate on older Java versions. https://www.oracle.com/java/technologies/java-se-support-roadmap.html |
I’ve downgrade the jpype to this version, but it didnt work either. How could I set the env vars? |
Only variable is JAVA_HOME which should be set to the base directory for the JRE. |
Hi Karl,
I've just installed Java8 on my AIX and still have the same issue:
Python version: Python 3.7.6
Python Installed packages
Package Version
----------------- -------
click 7.1.2
cycler 0.10.0
Flask 1.1.2
itsdangerous 1.1.0
JayDeBeApi 1.2.3
Jinja2 2.11.2
joblib 0.16.0
JPype1 1.0.1
kiwisolver 1.2.0
MarkupSafe 1.1.1
matplotlib 3.3.0
numpy 1.19.1
pandas 1.1.0
Pillow 7.2.0
pip 20.2.1
pyparsing 2.4.7
python-dateutil 2.8.1
pytz 2020.1
scikit-learn 0.23.2
scipy 1.5.2
setuptools 41.2.0
six 1.15.0
threadpoolctl 2.1.0
typing-extensions 3.7.4.2
Werkzeug 1.0.1
JAVA_HOME=/usr/java8_64/jre
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 8.0.5.26 -
pap6480sr5fp26-20181115_03(SR5 FP26))
IBM J9 VM (build 2.9, JRE 1.8.0 AIX ppc64-64-Bit Compressed References
20181106_401576 (JIT enabled, AOT enabled)
>> import jaydebeapi
>> conn =
jaydebeapi.connect("com.microsoft.sqlserver.jdbc.SQLServerDriver",
"jdbc:sqlserver://DBs:5150;databaseName=MAP", ["USER",
"#PASSWORD"],'/home/hypdev/jdbc/sqljdbc_8.4/enu/mssql-jdbc-8.4.0.jre8.jar')
terminate called after throwing an instance of 'JPypeException'
JVMDUMP039I Processing dump event "abort", detail "" at 2020/08/07 17:28:33
- please wait.
JVMDUMP032I JVM requested System dump using
'/home/hypdev/jdbc/core.20200807.172833.41615488.0001.dmp' in response to
an event
Note: "Enable full CORE dump" in smit is set to FALSE and as a result there
will be limited threading information in core file.
JVMDUMP010I System dump written to
/home/hypdev/jdbc/core.20200807.172833.41615488.0001.dmp
JVMDUMP032I JVM requested Java dump using
'/home/hypdev/jdbc/javacore.20200807.172833.41615488.0002.txt' in response
to an event
JVMDUMP010I Java dump written to
/home/hypdev/jdbc/javacore.20200807.172833.41615488.0002.txt
JVMDUMP032I JVM requested Snap dump using
'/home/hypdev/jdbc/Snap.20200807.172833.41615488.0003.trc' in response to
an event
JVMDUMP010I Snap dump written to
/home/hypdev/jdbc/Snap.20200807.172833.41615488.0003.trc
JVMDUMP007I JVM Requesting JIT dump using
'/home/hypdev/jdbc/jitdump.20200807.172833.41615488.0004.dmp'
JVMDUMP010I JIT dump written to
/home/hypdev/jdbc/jitdump.20200807.172833.41615488.0004.dmp
JVMDUMP013I Processed dump event "abort", detail "".
Any suggestion?
Leo
…On Fri, Jul 31, 2020 at 9:42 PM Karl Nelson ***@***.***> wrote:
Only variable is JAVA_HOME which should be set to the base directory for
the JRE.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQO3AHUMYTBCG2Q7I2DA7CDR6NXHNANCNFSM4MTKBRIA>
.
--
Leo
|
We don't have a lot of testing with the IBM JVM or on AIX, so it may be a fairly simple problem. But you will likely need to debug it yourself as I lack access to that platform. The failure appears to be an unhandled exception. There should be very few (if any places) that don't have an exception handling frame which should have directed the error to the console. I would start by launching jpype with startJVM to see if we can isolate where it went wrong. I would say that it is likely in the code in jp_context.cpp having to do with starting, launching or loading resources. Unfortunately that is only a guess until I have further information to isolate it. The process starts in Python in startJVM() in jpype/_core then proceeds to pyjp_module then to jp_context. It all of that succeeds it returns to jpype/_core to load all the resources. About all I can do to help would be to scan through and see if there are any likely spots that lack an exception frame. As far as I am aware they all do. But perhaps this is a double failure. In such a case something unexpected fails during the start, and it arrives to handle the fail but gets another exception as the resources are not set up. |
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.
The text was updated successfully, but these errors were encountered: