Re: Trouble with rxtx and jni interface in classpath

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I get the same issue with an environnement very close of yours
(arm/jamvm/gnuclasspath). Do you solve this issue ?
My solution is to use gcj/openjdk to compile RXTX jni and I don't get
trouble at runtime on AT91. However I would like to get a jni wrapper with
gnu classpath.

Thanks for help.
Best regards,
Claude


Luotao Fu wrote:
> 
> Hi folks,
> 
> I'm trying to use a crosscompiled rxtx on an ARM platform together with
> classpath and jamvm. jamvm is working well for itelf.
> However I get exception during initialisation with the nativeGetVersion
> call out of RXTXVersion object. Seems to me that the jni call is not
> working here. Here is the commandline I use to test rxtx.
> jamvm -verbose:jni -classpath
> /usr/share/jamvm/classes.zip:/usr/share/classpath/glibj.zip:.:/usr/share/java/RXTXcomm.jar
> SerTest
> 
> SerTest is a piece of example test code I grabbed somewhere in the net,
> which
> simply calls getPortIdentifiers() and list them all. I attached the code
> to this
> mail. The code runs well on my host, which is a debian unstable. On my
> target
> however it breaks up with a "java.lang.UnsatisfiedLinkError:
> nativeGetVersion
> thrown while loading gnu.io.RXTXCommDriver". I traced along the jni calls.
> Seems
> that the nativeGetVersion call cannot be found. Here's a part of the
> verbose
> messages by jamvm during the call:
> .....
> [Dynamic-linking native method java.io.VMFile.exists ... JNI]
> [Dynamic-linking native method java.io.VMFile.length ... JNI]
> [Dynamic-linking native method java.lang.VMClassLoader.defineClass ...
> internal]
> [Dynamic-linking native method
> java.lang.VMClassLoader.getBootClassPathSize ... internal]
> [Dynamic-linking native method
> java.lang.VMClassLoader.getBootClassPathResource ... internal]
> [Dynamic-linking native method java.lang.VMClassLoader.getBootPackage ...
> internal]
> [Dynamic-linking native method gnu.io.RXTXVersion.nativeGetVersion ... ]
> [Dynamic-linking native method gnu.io.RXTXCommDriver.nativeGetVersion ...
> ]
> [Dynamic-linking native method gnu.java.nio.VMChannel.write ... JNI]
> java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading
> gnu.io.RXTXCommDriver
> java.lang.NoClassDefFoundError: gnu/io/RXTXCommDriver thrown while loading
> gnu.io.RXTXCommDriver
> [Dynamic-linking native method java.lang.VMRuntime.exit ... internal]
> 
> As far as I can tell. The jni interface seems to be working, since e.g.
> java.io.VMFile.exists, which is implemented in classpath itself could be
> called without trouble. When it however comes to RXTX, jni failed to find
> the
> nativeGetVersion call, which is located in librxtxSerial.so  According to
> strace the library fiel was loaded correctly priorly. I tried to grab a
> little around in the jni code of classpath, where I unfortunately could
> not find
> anything promising. Additionally to my serial test code I attached the
> config.log file of my rxtx package for the case that it might be somehow a
> linker problem. 
> 
> I'd really apericate any hint on my trouble.
> 
> Thx
> Luotao Fu
> 
> -- 
> Pengutronix e.K.                           | Dipl.-Ing. Luotao Fu        |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
> 

-- 
View this message in context: http://www.nabble.com/Trouble-with-rxtx-and-jni-interface-in-classpath-tp24021827p25367286.html
Sent from the Gnu - Classpath - General mailing list archive at Nabble.com.



[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux