Closed GoogleCodeExporter closed 9 years ago
how to jSSC extract and load the native lib in static block using Ubuntu(Linux)
machine can u tell me steps?
Original comment by karuna.f...@gmail.com
on 15 Mar 2013 at 1:08
I have problem here " java.lang.UnsatisfiedLinkError?????:
jssc.SerialNativeInterface?????.openPort(Ljava/lang/String;)I"
using jssc 0.9.0 inside a tomcat application (war).
It is working properly in windows machine, but i am getting error in Ubuntu
(Linux) Machine how to solve this error
S/W Details jSSC version : jSSC 0.9.0
OS version : Ubuntu 10.4 Java version : 6
Tomcat 6 Can any one help me?
Original comment by karuna.f...@gmail.com
on 15 Mar 2013 at 1:10
The problem is that the JSSC connector attempts to determine the home directory
and extract the library into that directory. If JSSC cannot determine the home
directory, or the home directory is read only, then it fails to extract the
library.
I submitted suggestions for how to fix this issue and even offered to
contribute the changes myself if the owner of this project would give me access
to commit the change but heard nothing back. So, I went ahead and forked the
code myself and made the required changes to my code and recompiled it.
It's not very difficult - you just add an override parameter to the package
with a location to extract the libs to, check for that parameter in the lib
extractor code, and then extract to the specified lib directory. I did this by
creating a static configuration class where I set a static variable called
libpath when I start using the JSSC connector. Then the lib extractor looks at
that static configuration class to see if there's a libpath specifies and
extracts there if it is specified.
Wish I could fix this for everyone, but could get no response from the author.
Good luck.
Erich
Original comment by erich.pl...@gmail.com
on 15 Mar 2013 at 3:37
Fixed in 2.4.0
Original comment by scream3r.org@gmail.com
on 26 Apr 2013 at 11:56
hi am getting this error when deploying the file in Ubuntu 10.04 please reply
me how can i rectify the error my mail id srkvsivagiri@gmail.com
java.lang.UnsatisfiedLinkError :
jssc.SerialNativeInterface.openPort(Ljava/lang/String;)I
null
please give me a details setp to solve the problem
waiting for u r reply
thanks
Original comment by srkvsiva...@gmail.com
on 2 May 2013 at 2:18
There is no solution in the current code base. I downloaded the source and
patched it myself. This is how I did it.
1) I created a static singleton class to use to hold configuration - call this
"SerialConfiguration" or something like that. I have a String property in
there called libraryPath. This is the destination where I want to extract the
libs to, where I know that I will have RW access to create folders and extract
files.
2) In the JSSC code I modified the class that extracts the libraries to check
first to see if SerialConfiguration has a libraryPath specified. If so, then
it uses this path as the extraction point. If not, then it defaults to the
standard JSSC way of finding the user_home and extracting there.
3) In my code outside of JSSC, I call this singleton and set the property
libraryPath to a directory that I know I can RW to.
Now, it works.
If I could get the owner of JSSC to give me access to the code, I would
contribute my changes, but I haven't been able to reach him so the bug remains
open.
Erich
Original comment by erich.pl...@gmail.com
on 2 May 2013 at 6:50
[deleted comment]
hi sorry ya i tried in Ubuntu but failed to access ,ple correct and give i have
attached my file
Original comment by srkvsiva...@gmail.com
on 3 May 2013 at 10:19
Attachments:
You'll have to send me your full email address so that I can email you a copy
of the jar directly.
Original comment by erich.pl...@gmail.com
on 7 May 2013 at 4:31
hi my email id is srkvsivagiri@gmail.com .......i am getting an error in
tomcat6 while loading the library ...its failed to load the library ... but i
can run in eclipse and netbenas ..ple help me to resolve my problem am waiting
for u r message my error is unsatisfied link error
Original comment by srkvsiva...@gmail.com
on 7 May 2013 at 2:45
I just emailed you my patched jar.
Here's how you use it.
(1) put it in web-inf/lib folder so tomcat loads it.
(2) You'll need to add the following code before you try to do anything with
JSSC:
JSSCProperties.libDirectory="/path/to/rw/directory";
This tells my patched JSSC jar file to extract the JSSC binary files into the
directory that you have specified in the above line of code.
You will need to make sure that the directory you specify is RW for whatever
user you are running tomcat with.
Good luck.
Erich
Original comment by erich.pl...@gmail.com
on 8 May 2013 at 4:54
hi i could not get any value from Ubuntu- tomcat6 using u r files ple give
details steps
my email id srkvsivagiri@gmail.com
Original comment by srkvsiva...@gmail.com
on 10 May 2013 at 5:43
I suggest you first get it working on your machine and once your code works
then try to move it to tomcat on Ubuntu.
Original comment by erich.pl...@gmail.com
on 10 May 2013 at 7:26
hi Erich i got the output thanks for the support :):)
Original comment by srkvsiva...@gmail.com
on 12 May 2013 at 7:03
Original issue reported on code.google.com by
erich.pl...@gmail.com
on 10 Feb 2013 at 2:48