Cannot create Java VM on Suse 64 with IBM JVM

N

Naresh Agarwal

Hi

I'm trying to create Java VM (JNI_CreateJavaVM) from a C++ application
on Suse 64 using IBM JDK v1.4.2, but getting error code -4, which means
"ENOMEM".

But looks like issue is not related to memory (we have tried changed VM
heap and stack sizes). When i switch on "verbose:jni", i see following
error message -

- JVMJ9VM019E Fatal error: Unable to find and initialize required
class java/lang/Object

- JVMJ9VM020I Searched in
/home/snarasi1/zeus/katana_Linux64/install/java/jre/lib/jclSC14/classes.zip


- JVMJ9VM020I Searched in
/home/snarasi1/zeus/katana_Linux64/install/java/jre/lib/core.jar

- JVMJ9VM020I Searched in
/home/snarasi1/zeus/katana_Linux64/install/java/jre/lib/.....(all other
jar files present in jre/lib/)

- JVMJ9VM023I This may indicate that JAVA_HOME is incorrect, or that
class libraries are not installed

- JVMJ9VM015W Initialization error for library jclscar_22(13):
JVMJ9VM009E J9VMDllMain failed

JDK is properly installed and normal java application is working fine.

Any help would be appreciated!

Thanks & Regards,
Naresh
 
D

dinrat

For the same issue, the problem comes if I link my executable to
libz.so.1 on Suse Linux 64. It might be related to libj9zlib22.so and
libz.so.1 integration. Any clues?
 
G

Gordon Beaton

I'm trying to create Java VM (JNI_CreateJavaVM) from a C++
application on Suse 64 using IBM JDK v1.4.2, but getting error code
-4, which means "ENOMEM".

What (java related) dependencies does ldd say that your C++ launcher
has?

What directories are in your LD_LIBARY_PATH?

/gordon
 
D

dinrat

The jvm gets created fine and I am able to do findClass getMethodId etc
and run java code from my sample app if that does not link with
libz.so.1 though as soon as I link (its just linking, I dont use any
symbol from libz) my sample app with libz it fails to create jvm.

The ldd dependences and LD_LIBRARY_PATH looks fine as after if I dont
link with libz it works fine.
 
G

Gordon Beaton

The jvm gets created fine and I am able to do findClass getMethodId
etc and run java code from my sample app if that does not link with
libz.so.1 though as soon as I link (its just linking, I dont use any
symbol from libz) my sample app with libz it fails to create jvm.

And did you think of mentioning these things in your orignal post?

/gordon
 
D

dinrat

We had not found this out till that time. It was only later on after we
were experimenting with things we figured this out.

Dinesh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top