users@glassfish.java.net

RE: Native library already loaded in another classloader

From: Martin Gainty <mgainty_at_hotmail.com>
Date: Tue, 20 Apr 2010 14:38:41 -0400

tweak the LD_LIBRARY_PATH in GF$_HOME/conf/asadminenv.conf

copy your .a or so or .dll or .lib to:

server specific libraries
$JRE_HOME/bin/server

client specific libraries
$JRE_HOME/bin/client

all other libraries
$JRE_HOME/lib

to construct the LD_LIBRARY_PATH you will need to specify both
native-library-path-prefix
AND
native-library-path-suffix

http://docs.sun.com/app/docs/doc/819-3661/abhcx?a=view

hth
Martin Gainty
______________________________________________
Jogi és Bizalmassági kinyilatkoztatás
 Ez az
üzenet bizalmas. Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett. Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs. Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.





> Date: Tue, 20 Apr 2010 18:53:08 +0200
> From: majorpetya_at_sch.bme.hu
> To: users_at_glassfish.dev.java.net
> Subject: Re: Native library already loaded in another classloader
>
> Hi,
>
> If you're not changing the library during deploys, then you could simply
> catch the UnsatisfiedLinkError like this:
> try {
> System.load("/home/usr/glassfish/glassfish/lib/libPlcVirtualEjb.so");
> } catch (UnsatisfiedLinkError ex) {
> //DO NOTHING
> }
>
> But if your library is changing all the time, then you can't do anything
> about it, you have to restart the VM, because the library was already
> loaded in that VM.
>
> Regards,
> Peter
>
> 2010-04-20 18:50 keltezéssel, glassfish_at_javadesktop.org írta:
> > Hello,
> >
> > I am using Glassfish server for my EJB application. Each time I change the server side and run my application, I get this message:
> >
> > Native Library already loaded in another classloader.
> >
> > To avoid this I have to restart the server each time.
> >
> > I tried to move my .so library to ~/gf/lib directory and tried :
> > ./asadmin set server.java-config.native-library-path-suffix=/home/usr/glassfish/glassfish/lib/libPlcVirtualEjb.so
> >
> > but I am getting
> >
> > bash: ./asadmin: is a directory
> >
> > Please suggest what can I do.
> >
> > Thanks,
> >
> > H
> > [Message sent by forum member 'h_p']
> >
> > http://forums.java.net/jive/thread.jspa?messageID=398065
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
                                               
_________________________________________________________________
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3