tomcat, native apr connector under linux, problem - WTF?

  • Thread starter Maciej Mrozowski
  • Start date
M

Maciej Mrozowski

hi
I've got the following (common I guess) problem when starting tomcat (under
eclipse):

<console_output>
2006-06-05 19:50:26 org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in
production environments was not found on the
java.library.path: /usr/local/opt/sun-jdk-1.5.0.06/jre/lib/i386/client:/usr/local/opt/sun-jdk-1.5.0.06/jre/lib/i386:/usr/local/opt/sun-jdk-1.5.0.06/jre/../lib/i386
2006-06-05 19:50:27 org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-9080
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:266)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
Caused by: java.lang.UnsatisfiedLinkError: create
at org.apache.tomcat.jni.Pool.create(Native Method)
at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:545)
at
org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:115)
at org.apache.catalina.connector.Connector.initialize(Connector.java:1016)
at
org.apache.catalina.core.StandardService.initialize(StandardService.java:580)
at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:791)
at org.apache.catalina.startup.Catalina.load(Catalina.java:503)
at org.apache.catalina.startup.Catalina.load(Catalina.java:523)
... 6 more
</console_output>

I've compiled native connector from the source (taken from
tomcat/bin/some_tar_gz), and put it in $CATALINA_HOME/lib. Then I followed
instructions (there's readme shipped with source code) and added connector
to $CATALINA_HOME/conf/server.xml:


<Connector port="9010" enableLookups="false" redirectPort="9443"
protocol="org.apache.coyote.http11.Http11AprProtocol" />

Then I added
CATALINA_OPTS="$CATALINA_OPTS -Djava.library.path=$CATALINA_HOME/lib"
to $CATALINA_HOME/bin/setenv.sh
I also experimented with LD_LIBRARY_PATH

and... nothing as you see java.library.path is unchanged...

I also put these libraries in JAVA_HOME/jre/lib/i386 and... nothing

there's native library directory listing:

<code>
maciek@reaver ~/opt/tomcat/lib $ ls -la
total 28
drwxr-xr-x 2 maciek users 4096 2006-06-05 22:07 .
drwxr-xr-x 12 maciek users 4096 2006-06-05 21:01 ..
-rw-r--r-- 1 maciek users 8 2006-06-05 22:06 libtcnative-1.a
-rw-r--r-- 1 maciek users 911 2006-06-05 20:37 libtcnative-1.la
-rw-r--r-- 1 maciek users 912 2006-06-05 22:06 libtcnative-1.lai
lrwxrwxrwx 1 maciek users 22 2006-06-05 22:07 libtcnative-1.so ->
libtcnative-1.so.0.1.3
lrwxrwxrwx 1 maciek users 22 2006-06-05 22:07 libtcnative-1.so.0 ->
libtcnative-1.so.0.1.3
-rwxr-xr-x 1 maciek users 5788 2006-06-05 22:06 libtcnative-1.so.0.1.3
</code>

Library compiled without any fancy CFLAGS, using gcc defaults (i guess -O2),
not stripped

I'm using tomcat-5.5.17 (with servletapi-2.4 library), sun-jdk-1.5.0.06 on
gnu/gentoo box

Can you give me some ideas (in example what am I doing wrong)? - or maybe
some reasonable workaround

I need tomcat as native as possible

thx in advance

Maciej Mrozowski
 
Joined
Jan 9, 2008
Messages
1
Reaction score
0
Any update on this? Im running into the same issure.

I have the the tcnative files under /usr/local/apr/lib

i have Djava.library.path set to /usr/local/apr/lib in Catalina_opts.... I am still getting an error that the native library is not found everytime i start my tomcat instances..

Any help would be appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top