Tomcat/Ubuntu not using correct JDK
I am trying to use an AMI created from ubuntu instance running on AWS. The
original instance had the java 1.7.0_21 installed and JAVA_HOME pointing
to it. I compile my classes with compatibility set to 1.7 as I need the
javax.net.ssl package. My application runs fine inside tomcat. But when I
try to run an instance created from AMI, I am getting the Unsupported
major.minor version 51.0 (unable to load class error. I do a ps on the
processes running and I see the tomcat has been started with jdk 1.7.0_21
as expected. I am not sure why I get this error.
ubuntu@XXXX:~$ ps aux | grep tomcat
tomcat6 2554 0.8 35.3 997460 213768 ? Sl 07:01 0:21
/usr/local/java/jdk1.7.0_21/bin/java
-Djava.util.logging.config.file=/var/lib/tomcat6/conf/logging.properties
-Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.endorsed.dirs=/usr/share/tomcat6/endorsed -classpath
/usr/share/tomcat6/bin/bootstrap.jar -Dcatalina.base=/var/lib/tomcat6
-Dcatalina.home=/usr/share/tomcat6
-Djava.io.tmpdir=/tmp/tomcat6-tomcat6-tmp
org.apache.catalina.startup.Bootstrap start
No comments:
Post a Comment