You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Andreas Andersson <an...@travelstart.se> on 2005/02/01 20:12:56 UTC

Re: Using native and ld_library_path

Caldarale, Charles R wrote:

> Take a look at:
> http://java.sun.com/docs/books/tutorial/native1.1/stepbystep/step1.html

Hi again. I did take a look but nothing helped me there and I still need 
  help.

My guess is that tomcat has some restrictions when it comes to loading 
native code.

I have several native libraries. One of them is loaded and executed from 
my code, the rest is used by the first one.

What confuses me is that this works on my tomcat on windows but not 
linux. It also works on a standalone program on that same linux machine. 
But not my tomcat on linux.

I've tried putting the libraries in /usr/lib. That works for my 
standalone but not tomcat.

I've tried setting -Djava.library.path in catalina.sh, that doesn't work.

When printing System.getProperties().get("java.library.path") I get the 
right paths but still I get the "unsatisfied link error". Is there more 
debug information available in some way?

This is really frustrating since it shouldn't be this hard :)

I appreciate any help.

-- 
Andreas Andersson
IT Dept.
Travelstart Nordic
andreas@travelstart.se
http://www.travelstart.se

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Using native and ld_library_path

Posted by Andreas Andersson <an...@travelstart.se>.
Has no-one done this?

I think the problem is when the already loaded .so-file wants to load 
other .so's. The java.library.path is set correctly but perhaps only for 
tomcat and not for the loaded .so.

I've also tried to copy all of the required files to /usr/lib but 
without success.

Andreas Andersson wrote:

> Hi again. I did take a look but nothing helped me there and I still need 
>  help.
> 
> My guess is that tomcat has some restrictions when it comes to loading 
> native code.
> 
> I have several native libraries. One of them is loaded and executed from 
> my code, the rest is used by the first one.
> 
> What confuses me is that this works on my tomcat on windows but not 
> linux. It also works on a standalone program on that same linux machine. 
> But not my tomcat on linux.
> 
> I've tried putting the libraries in /usr/lib. That works for my 
> standalone but not tomcat.
> 
> I've tried setting -Djava.library.path in catalina.sh, that doesn't work.
> 
> When printing System.getProperties().get("java.library.path") I get the 
> right paths but still I get the "unsatisfied link error". Is there more 
> debug information available in some way?
> 
> This is really frustrating since it shouldn't be this hard :)
> 
> I appreciate any help.
> 


-- 
Andreas Andersson
IT Dept.
Travelstart Nordic
andreas@travelstart.se
http://www.travelstart.se

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org