tomcat报错

简介: tomcat报错catalina.sh: line 401: /usr/java/jdk1.7.52/bin/java: No such file or directory将生产服务器的Tomcat目录打包过来后解压后,启动Tomcat后,发现如下问题:# .

tomcat报错catalina.sh: line 401: /usr/java/jdk1.7.52/bin/java: No such file or directory


将生产服务器的Tomcat目录打包过来后解压后,启动Tomcat后,发现如下问题:

# ./shutdown.sh

Using CATALINA_BASE:   /usr/local/tomcat

Using CATALINA_HOME:   /usr/local/tomcat

Using CATALINA_TMPDIR: /usr/local/tomcat/temp

Using JRE_HOME:       /usr/java/jdk1.7.52

/usr/local/tomcat/bin/catalina.sh: line 401: /usr/java/jdk1.7.52/bin/java: No such file or directory

其实安装的是jdk-8u102-linux-x64.rpm,其实并没有所谓的/usr/java/dk1.7.52目录,而是/usr/java/jdk1.8.0_102/

发现/etc/profile文件下的jar_home指向错误,

于是修改vim /etc/profile

export JAVA_HOME=/usr/java/jdk1.8.0_102/

export PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH

export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib

export SANP_HOME=/home/aaa

使配置生效,重新启动tomcat即可

source /etc/profile

目录
相关文章
|
Java 应用服务中间件 Apache
Tomcat 发布jsp报错
Tomcat 发布jsp报错
|
应用服务中间件 Perl
tomcat上传图片报错com.drew.imaging.jpeg.JpegProcessingException: JPEG data is expected to begin wit
tomcat上传图片报错com.drew.imaging.jpeg.JpegProcessingException: JPEG data is expected to begin wit
|
应用服务中间件
Tomcat报错:The required Server component failed to start so Tomcat is unable to start
Tomcat报错:The required Server component failed to start so Tomcat is unable to start
228 0
|
Java 应用服务中间件 容器
Tomcat报错 严重: A child container failed during start
Tomcat报错 严重: A child container failed during start
145 0
|
应用服务中间件 Perl
tomcat上传图片报错com.drew.imaging.jpeg.JpegProcessingException: JPEG data is expected to begin with 0xFFD
tomcat上传图片报错com.drew.imaging.jpeg.JpegProcessingException: JPEG data is expected to begin with 0xFFD
120 0
|
6月前
|
Java 应用服务中间件 Shell
Tomcat 安装配置教程及成功后,启动失败报错解决方案
Tomcat 安装配置教程及成功后,启动失败报错解决方案
117 0
|
6月前
|
前端开发 Java 应用服务中间件
springboot 升级(1.5.7.RELEASE升级到2.7.10) Tomcat启动报错
springboot 升级(1.5.7.RELEASE升级到2.7.10) Tomcat启动报错
|
6月前
|
Java 应用服务中间件
解决tomcat启动报错:无法在web.xml或使用此应用程序部署的jar文件中解析绝对的url [http:java.sun.com/jsp/jstl/core]
解决tomcat启动报错:无法在web.xml或使用此应用程序部署的jar文件中解析绝对的url [http:java.sun.com/jsp/jstl/core]
1345 1
|
6月前
|
Java 应用服务中间件
Tomcat 报错:The origin server did not find a current representation for the target resource
Tomcat 报错:The origin server did not find a current representation for the target resource
70 1
|
6月前
|
监控 应用服务中间件
idea debug模式启动Tomcat报错:Error running ‘tomcat8‘: java.net.SocketException “socket closed“
idea debug模式启动Tomcat报错:Error running ‘tomcat8‘: java.net.SocketException “socket closed“
207 0