顯示具有 tomcat 標籤的文章。 顯示所有文章
顯示具有 tomcat 標籤的文章。 顯示所有文章

2014年11月17日 星期一

"no JDK found – please set JAVA_HOME" while starting tomcat7


Solution 1 to make sure default-java exists underneath /usr/lib/jvm/ folder,if no, you can do something as follow:

ln -s /usr/lib/jvm/java-7-oracle /usr/lib/jvm/default-java

Solution 2 Add JAVA_HOME variable into /etc/default/tomcat7 file to specific JDK for tomcat7

sudo gedit /etc/default/tomcat7

Added JAVA_HOME variable

JAVA_HOME=/usr/lib/jvm/java-7-oracle

Reference:

2014年11月4日 星期二

Installing the APR based Apache Tomcat Native library on Ubuntu 12.04

05-Nov-2014 13:38:52.881 INFO [main] org.apache.catalina.core.AprLifecycleListener.init The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
05-Nov-2014 13:38:52.962 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:colorado-webapp' did not find a matching property.


sudo apt-get install libtcnative-1


Due to Tomcat 7.0.55 requires libtcnative-1 1.1.30, you will see follow error message after restart the Tomcat server.

05-Nov-2014 14:02:03.109 SEVERE [main] org.apache.catalina.core.AprLifecycleListener.init An incompatible version 1.1.22 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.30


You can upgrade it with:

$ sudo add-apt-repository ppa:pharmgkb/trusty
$ sudo apt-get update
$ sudo apt-get upgrade libtcnative-1

References:
Tomcat APR native library not loaded *even* when present and configured
Tomcat native library update
Installing the APR-based Tomcat Native Library for Jira on Debian 7 (Updated)
Apache Tomcat Native Library Doc

Other Topics:
Specify JDK for tomcat7

Download
Apache Tomcat Native library