JNI problems

2005-04-08 Thread Al Niessner

I am looking for help on how to continue tracking this problem to its
source. A solution would be nice, but it is not expected.

I am using jdk1.5.0_01-x86_64 and have created a C++ library that
creates an embedded JVM. I want to use a bunch of Java that I have
written from within Octave (see www.octave.org for details). However,
when I compile my library into Octave and try start the JVM I get this
dump:

java.lang.InternalError
at java.util.zip.Inflater.init(Native Method)
at java.util.zip.Inflater.(Inflater.java:79)
at java.util.zip.ZipFile.getInflater(ZipFile.java:373)
at java.util.zip.ZipFile.getInputStream(ZipFile.java:318)
at java.util.zip.ZipFile.getInputStream(ZipFile.java:287)
at java.util.jar.JarFile.hasClassPathAttribute(JarFile.java:455)
at
java.util.jar.JavaUtilJarAccessImpl.jarFileHasClassPathAttribute(JavaUtilJarAccessImpl.java:15)
at sun.misc.URLClassPath
$JarLoader.getClassPath(URLClassPath.java:809)
at sun.misc.URLClassPath.getLoader(URLClassPath.java:293)
at sun.misc.URLClassPath.getResource(URLClassPath.java:160)
at java.net.URLClassLoader$1.run(URLClassLoader.java:192)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

Since it works with a C++ main(), I am guessing that there is some
symbol in Octave that is clashing with what libzip.so would get from
else where. Using 'nm' I have not gotten too far. Anyone have any
suggestions on how to further isolate the cause of this error so that it
is not guess work. Oh, I have used gdb and strace with little success at
getting closer to the cause of the problem. Yeah, it was strace that
sent me looking at libzip.so:
stat("/usr/local/jdk1.5.0_01-x86_64/jre/lib/amd64/libzip.so",
{st_mode=S_IFREG|0755, st_size=112392, ...}) = 0

is right before the failure.

Any and all suggestions are appreciated. Thanks in advance...

Al


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: JNI problems

2005-04-08 Thread Juergen Kreileder
Al Niessner <[EMAIL PROTECTED]> writes:

> Since it works with a C++ main(), I am guessing that there is some
> symbol in Octave that is clashing with what libzip.so

Probably, AFAIK Sun internalizes symbols in the i386 build but not in
the x86-64 and ia64 builds.  Our 1.4.2-01 for x86-64 should be OK.

If you have to use Sun's 1.5.0, you might be able to work around the
problem by LD_PRELOADing Java's libzip


Juergen

-- 
Juergen Kreileder, Blackdown Java-Linux Team
http://blog.blackdown.de/


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]