LEADTOOLS Support
General
General Questions
UnsatisfiedLinkError at leadtools.ltkrn.StartRedirectIO when running on Ubuntu
#1
Posted
:
Wednesday, April 5, 2017 1:19:46 PM(UTC)
Groups: Registered
Posts: 3
Hello,
First of all, I hope this is the correct place to post this, sorry if it isn't. Now with the problem: I'm building an Ubuntu server environment to test our application which uses Leadtools, and we identified an error whenever the application tries to load the raster image stream.
This is an excerpt of the resulting exception:
Caused by: java.lang.UnsatisfiedLinkError: leadtools.ltkrn.StartRedirectIO(Ljava/lang/Object;)J
at leadtools.ltkrn.StartRedirectIO(Native Method)
at leadtools.internal.LeadStreamRedirects.start(LeadStreamRedirects.java:32)
at leadtools.codecs.RasterCodecs.loadOnePage(RasterCodecs.java:1683)
at leadtools.codecs.RasterCodecs.doLoad(RasterCodecs.java:1409)
at leadtools.codecs.RasterCodecs.load(RasterCodecs.java:1115)
I understand that UnsatisfiedLinkError happens when the application isn't able to load a native library (.so on our case) but all the libraries are correctly registred in the ld.so.conf.d directory (we also tried putting the lib folder on the LD_LIBRARY_PATH as an enviroment variable). We are running a x64 machine and therefore using the leadtools' x64 libs.
We have a Windows machine that runs the same application with the Windows' Leadtools library and we have not encountered any problems whatsoever. This error only happened on our Ubuntu machine.
Thank you all,
Cheers!
#2
Posted
:
Friday, April 7, 2017 2:45:58 PM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 71
Was thanked: 4 time(s) in 3 post(s)
Hi,
The issue here is the JAR files are not able to match its methods to the corresponding C library functions (specifically the StartRedirectIO function), which is causing linker errors. The LEADTOOLS Java libraries are built using JNI, which actually just wrap our C libraries. The most common cause for linker errors, is the JAR files simply can't find the C libraries (SO).
To begin with, when you ported your code to Linux, did you make sure the Platform.setLibPath is set to the correct location to the LEADTOOLS SO files on your Linux machine?
The code would be something like this based on where you deploy the LEADTOOLS SO files to (code uses the default installation path for the Linux SDK):
Code:Platform.setLibPath("/home/LEADTOOLS19/Bin/Lib/x64");
Aaron Brasington
Developer Support Engineer
LEAD Technologies, Inc.
#3
Posted
:
Monday, April 10, 2017 12:07:05 PM(UTC)
Groups: Registered
Posts: 3
Thanks for the response, Aaron.
Yes, the Platform.setLibPath is correctly set to the SO folder, which is at the default installation path (with total read and write privileges).
EDIT:
This what's in the
The jars that we're using are
#4
Posted
:
Monday, April 10, 2017 2:20:49 PM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 71
Was thanked: 4 time(s) in 3 post(s)
Hi,
Unfortunately, with just the linker error to go off of, it is difficult for me to say exactly what could be happening here. Have you tried running our Linux demos that come with our Linux SDK on your Linux machine?
https://www.leadtools.co...in&SrcOrigin=supportIf the demos themselves run correctly, then the issue would be within your application itself. If that is the case, then would you be able to send me a small sample application that reproduces the issue so I can test this issue further on my end.
If the demos don't run, then it could be an issue with the Linux OS itself. At that point, would you be able to provide me with the demo you used to reproduce the error and the exact specs of your Linux machine so that I can try to get a test machine set up here to find you a solution?
Aaron Brasington
Developer Support Engineer
LEAD Technologies, Inc.
LEADTOOLS Support
General
General Questions
UnsatisfiedLinkError at leadtools.ltkrn.StartRedirectIO when running on Ubuntu
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.