java - Tomcat - 无法打开日志 - 无法部署

标签 java mysql tomcat ubuntu

我正在尝试在 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/

相关文章:

java - Tomcat 在所有新部署的 WAR 文件上报告 404 错误?

java - 计算没有两个相邻字符相同的所有排列

java - Scala:从字节码角度创建公共(public)非最终类字段

mysql - 如何构建具有多个条件的复杂 MySQL 查询

php - 需要使用 WordPress 访问 HostGator 插件域上的 phpmyadmin

java - Tomcat 服务器未作为服务 : %1 is not a valid Win32 application 启动

java - 如何在博客中玩java游戏

java - 使用 Retrofit 2 将 JSON 数据解析为 Horizo​​ntalScrollView

android - 如何在android中创建数据库?

tomcat - apache 中的连接池(Web 服务器)