---
title: "错误信息：与tomcat有关的异常错误"
author: "simple_hui"
date: "2010-11-20T19:56:15Z"
tags: []
categories: ["编程语言"]
slug: "tomcat"
draft: false
lastmod: "2010-11-20T19:56:15Z"
id: 818153
url: "https://simple-hui.iteye.com/blog/818153"
---

1.Unable to find a javac compiler;Perhaps JAVA_HOME does not point to the JDK
 
tomcat_home, java_home都已经添加到了环境变量里，但启动jsp的时候却出现了以下的异常
Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK
解决方案：
只要把JAVA_HOME/lib/tools.jar拷到TOMCAT_HOME\common\lib下，重启动Tomcat，OK

2.java.lang.IllegalArgumentException: Document base 

有些刚开始使用的Tomcat的朋友会出现的问题，明明已经将某个web应用从tomcat下的webapps下移除了，为什么还会抛这样的异常呢？

java.lang.IllegalArgumentException: Document base *** does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:141)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3957)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4126)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
********

.................

其实这个问题很简单，tomcat的一个应用不只是那个文件夹而已...

详细操作应该是这样的：
确定3点：
1.该项目的War文件从***\apache-tomcat-6.0.16\webapps 移出；
2.该项目的某些配置从 ***apache-tomcat-6.0.16\work\Catalina\localhost 移除3.该项目的配置文件，目录： ***\apache-tomcat-6.0.16\conf\Catalina\localhost移除。