我正在尝试在 Ubuntu 系统上部署网络应用。 WAR 是一个EXPLODED 文件夹。 构建没有问题。但是我无法部署到Tomcat6 服务器。一切正常。 相同的代码,相同的文件。突然间,无法部署。
我现在发现的主要区别是 - 日志 在/var/lib/tomcat6/logs - localhost.2010-11-01.log已锁定 并且只能由 root 用户打开。不明白为什么?
由于这个问题,我收到以下错误(来自 localhost.2010-11-01.log):
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
我的问题与
有关吗BeanCreationException in Spring Framework .WAR deploy to Tomcat 6 on Ubuntu 9.10?
更新1: root 用户可读取 Tomcat 日志的问题现已解决。但是,这些错误仍然存在。
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'africa' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'antarctica' while setting bean property 'antarctica'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'antarctica' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'australia' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'australia' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.Exception: Unexpected line
Warning: mysql_connect(): Lost connection to MySQL server during query in .... #ERROR:Too Many Connections!
更新 2:
Just switched on my Ubuntu system. Only firefox running at the moment. No Eclipse or other software running. Did not shutdown or restart Tomcat. Just tried to launch the web app thru Tomcat Manager application (http://localhost:8080/manager/html) - the same thing I had been trying before.
结果:Web 应用程序顺利启动!
我完全不知道为什么这在以前不起作用。此外,不知道为什么它现在可以正常工作,如果确实存在严重问题的话。我浪费了一整天:(。
最佳答案
如果您像这样设置日志记录:Tomcat startup logs - SEVERE: Error filterStart how to get a stack trace?
那么至少你会得到堆栈跟踪。
关于java - Tomcat - 无法打开日志 - 无法部署,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4070556/