Foros de discusión

"The APR based Apache Tomcat Native library..." after upgrading to LDS 1.3

Phoenix Zerin, modificado hace 12 años.

"The APR based Apache Tomcat Native library..." after upgrading to LDS 1.3

Junior Member Mensajes: 60 Fecha de incorporación: 28/06/11 Mensajes recientes
When starting up my Liferay instance from Liferay Developer Studio 1.3.1v201109080731 on Mac OS X, I notice the following message in my log:

INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java


That's odd though because I have libtcnative installed (per the instructions on the wiki), and it was working as expected under LDS 1.2.

The supporting files for libtcnative have been installed into /usr/lib/java:

> l /usr/lib/java/
total 5.6M
...
lrwxr-xr-x   1 root wheel   42 Oct  6 11:47 libtcnative-1.0.1.20.jnilib -> /opt/local/lib/libtcnative-1.0.1.20.jnilib*
lrwxr-xr-x   1 root wheel   37 Oct  6 11:47 libtcnative-1.0.jnilib -> /opt/local/lib/libtcnative-1.0.jnilib*
lrwxr-xr-x   1 root wheel   30 Oct  6 11:47 libtcnative-1.a -> /opt/local/lib/libtcnative-1.a
lrwxr-xr-x   1 root wheel   35 Oct  6 11:47 libtcnative-1.jnilib -> /opt/local/lib/libtcnative-1.jnilib*
lrwxr-xr-x   1 root wheel   31 Oct  6 11:47 libtcnative-1.la -> /opt/local/lib/libtcnative-1.la*


(filemtime shows just now because I've been experimenting with moving the links around to other locations)

I've tried moving the files to /Library/Java/Extensions and /System/Library/Java/Extensions, and I've tried changing the softlinks to hardlinks, but all methods had the same result.

What do I need to do to get Tomcat to see my libtcnative files during startup?
thumbnail
David H Nebinger, modificado hace 12 años.

RE: "The APR based Apache Tomcat Native library..." after upgrading to LDS

Liferay Legend Mensajes: 14916 Fecha de incorporación: 2/09/06 Mensajes recientes
Hmm, I've been seeing this under LDS 1.3 / 6.0 EE SP2 on my local system (Windows) also...

I know previously all I had to do was drop the native stuff into the tomcat\bin directory (and they are there now), but I get those messages still...

I've been ignoring the issue, since it's only my local dev system. But since you're seeing this too, I wonder if I'll have the same issue once I get to test/prod...
thumbnail
Gregory Amerson, modificado hace 12 años.

RE: "The APR based Apache Tomcat Native library..." after upgrading to LDS

Liferay Legend Mensajes: 1123 Fecha de incorporación: 16/02/10 Mensajes recientes
Hi Phoenix,

Could you try to launch tomcat externally from the command line using
tomcat-6.0.32/bin/catalina.sh run

Then see if you get the message about the native library. Let me know the results and we can diagnose the problem from there.
Phoenix Zerin, modificado hace 12 años.

RE: "The APR based Apache Tomcat Native library..." after upgrading to LDS

Junior Member Mensajes: 60 Fecha de incorporación: 28/06/11 Mensajes recientes
Hey Gregory.

Looks like it's getting the same issue:

[501][~] cd /.../tomcat-6.0.29/bin/
[502][bin] ./catalina.sh run
Using CATALINA_BASE:   /.../tomcat-6.0.29
Using CATALINA_HOME:   /.../tomcat-6.0.29
Using CATALINA_TMPDIR: /.../tomcat-6.0.29/temp
Using JRE_HOME:        /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
Using CLASSPATH:       /.../tomcat-6.0.29/bin/bootstrap.jar
Oct 10, 2011 3:29:12 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
...
Phoenix Zerin, modificado hace 12 años.

RE: "The APR based Apache Tomcat Native library..." after upgrading to LDS

Junior Member Mensajes: 60 Fecha de incorporación: 28/06/11 Mensajes recientes
I also went ahead and tried it with Liferay EE 6.0SP2 without success:

[501][~] cd /.../liferay-portal-6.0-ee-sp2/tomcat-6.0.32/bin/
[502][bin] ./catalina.sh run
Using CATALINA_BASE:   /.../liferay-portal-6.0-ee-sp2/tomcat-6.0.32
Using CATALINA_HOME:   /.../liferay-portal-6.0-ee-sp2/tomcat-6.0.32
Using CATALINA_TMPDIR: /.../liferay-portal-6.0-ee-sp2/tomcat-6.0.32/temp
Using JRE_HOME:        /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
Using CLASSPATH:       /.../liferay-portal-6.0-ee-sp2/tomcat-6.0.32/bin/bootstrap.jar
Oct 10, 2011 3:37:58 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
thumbnail
Gregory Amerson, modificado hace 12 años.

RE: "The APR based Apache Tomcat Native library..." after upgrading to LDS

Liferay Legend Mensajes: 1123 Fecha de incorporación: 16/02/10 Mensajes recientes
For development this should not be a major concern. Only on a production system would it be crucial one would think for this library to be available. Let me know if you require this library being there for development purposes and we can do some more research.
Phoenix Zerin, modificado hace 12 años.

RE: "The APR based Apache Tomcat Native library..." after upgrading to LDS

Junior Member Mensajes: 60 Fecha de incorporación: 28/06/11 Mensajes recientes
The performance boost to the portal startup process alone would make this nice to have.

Also, my suspicion is that we will see similar issues once we apply SP2 to our production instances, so it would seem to me that it would be advantageous to troubleshoot the problem on a development instance first so that we can be prepared to resolve it should our production instances be affected.