calling native code

2004-04-05 Thread Astrid Wagner
Hi,

I am using tomcat 4.1.24 and want to use native c-code with JNI.
I have a shared library installed in an oracle subdirectory that is 
added to the LD_LIBRARY_PATH
when Apache is started (apachectl) but when I restart tomcat this 
directory is no longer in it
which leads to a

java.lang.UnsatisfiedLinkError:

error. Where can I modify the LD_LIBRARY_PATH within tomcat ?
When I restart Apache, the LD_LIBRARY_PATH is correct but I get a
ClassDefNotFound exeception

for the class that calls the c-interface (IprShellInterface.class 
package com.mot.sps.ipr.common).
I have installed that class in 
CATALINA_HOME/common/classes/com/mot/sps/ipr/common/IprShellInterface.class.
I called that class successfully before but now I seemed to have run 
into a deadlock.

Can anyone help?

Thanks
Astrid


RE: calling native code

2004-04-05 Thread Peter Guyatt
Hi there,

What OS are you using ?

If windows just copy the dll to the windows/system32 directory or solaris to
the use/lib directory.

That way you dont have to specify the location of the library

Thanks

Pete

-Original Message-
From: Astrid Wagner [mailto:[EMAIL PROTECTED]
Sent: 05 April 2004 13:13
To: [EMAIL PROTECTED]
Subject: calling native code


Hi,

I am using tomcat 4.1.24 and want to use native c-code with JNI.
I have a shared library installed in an oracle subdirectory that is
added to the LD_LIBRARY_PATH
when Apache is started (apachectl) but when I restart tomcat this
directory is no longer in it
which leads to a

java.lang.UnsatisfiedLinkError:

error. Where can I modify the LD_LIBRARY_PATH within tomcat ?
When I restart Apache, the LD_LIBRARY_PATH is correct but I get a

ClassDefNotFound exeception

for the class that calls the c-interface (IprShellInterface.class
package com.mot.sps.ipr.common).
I have installed that class in
CATALINA_HOME/common/classes/com/mot/sps/ipr/common/IprShellInterface.class.
I called that class successfully before but now I seemed to have run
into a deadlock.

Can anyone help?

Thanks
Astrid


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: calling native code

2004-04-05 Thread Paul Mansfield
On Mon, 2004-04-05 at 13:12, Astrid Wagner wrote:
 added to the LD_LIBRARY_PATH
 when Apache is started (apachectl) but when I restart tomcat this 
 directory is no longer in it
 which leads to a
 java.lang.UnsatisfiedLinkError:
 error. Where can I modify the LD_LIBRARY_PATH within tomcat ?
 When I restart Apache, the LD_LIBRARY_PATH is correct but I get a
 
 ClassDefNotFound exeception
 
 for the class that calls the c-interface (IprShellInterface.class 
 package com.mot.sps.ipr.common).
 I have installed that class in 
 CATALINA_HOME/common/classes/com/mot/sps/ipr/common/IprShellInterface.class.

I ran into this problem with linux and tomcat5. I tried every variant of
LD_LIRBARY_PATH but no joy. Then I put this line into catalina.sh and
everything worked:
JAVA_OPTS=-Djava.library.path=/usr/local/jakarta-tomcat/so

I put my library.so files into /usr/local/jakarta-tomcat/so

take a look at 
http://www.rgagnon.com/javadetails/java-0348.html

HTH
Paul


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: calling native code

2004-04-05 Thread Astrid Wagner
Hi,

I just found out that setting the LD_LIBRARY_PATH var on the shell
suffices. When I restart tomcat it takes it from there (working on 
Solaris 8).
Still do  not know why I had the

ClassDefNotFound exeception

after I restarted Apache though.
It seems that I always have to go in order
1) Apache and then
2) Tomcat
as far as starting is concerned ?!
Thanks.

Astrid

Peter Guyatt wrote:

Hi there,

	What OS are you using ?

If windows just copy the dll to the windows/system32 directory or solaris to
the use/lib directory.
That way you dont have to specify the location of the library

Thanks

Pete

-Original Message-
From: Astrid Wagner [mailto:[EMAIL PROTECTED]
Sent: 05 April 2004 13:13
To: [EMAIL PROTECTED]
Subject: calling native code
Hi,

I am using tomcat 4.1.24 and want to use native c-code with JNI.
I have a shared library installed in an oracle subdirectory that is
added to the LD_LIBRARY_PATH
when Apache is started (apachectl) but when I restart tomcat this
directory is no longer in it
which leads to a
java.lang.UnsatisfiedLinkError:

error. Where can I modify the LD_LIBRARY_PATH within tomcat ?
When I restart Apache, the LD_LIBRARY_PATH is correct but I get a
ClassDefNotFound exeception

for the class that calls the c-interface (IprShellInterface.class
package com.mot.sps.ipr.common).
I have installed that class in
CATALINA_HOME/common/classes/com/mot/sps/ipr/common/IprShellInterface.class.
I called that class successfully before but now I seemed to have run
into a deadlock.
Can anyone help?

Thanks
Astrid
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: calling native code

2004-04-05 Thread Paul Mansfield
On Mon, 2004-04-05 at 13:25, Astrid Wagner wrote:
 Hi,
 
 I just found out that setting the LD_LIBRARY_PATH var on the shell

hmmm, that didn't work for me, so maybe it's a tomcat4 thing.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]