失败 - 在上下文路径/ blah部署应用程序但上下文无法启动

时间:2012-11-20 13:16:35

标签: tomcat web-applications

我在部署war文件时遇到了错误(在标题中)。

这是来自catalina的日志。我得到了。我想根据第一行,我需要更改catalina.2012-11-19.log的权限,但该怎么办? (原谅我新手的问题)。 TKS

    Listening for transport dt_socket at address: 50754
java.util.logging.ErrorManager: 4
java.io.FileNotFoundException: /usr/share/tomcat6/logs/catalina.2012-11-19.log (Permission denied)
    at java.io.FileOutputStream.openAppend(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:207)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
    at org.apache.juli.FileHandler.openWriter(FileHandler.java:304)
    at org.apache.juli.FileHandler.<init>(FileHandler.java:63)
    at org.apache.juli.FileHandler.<init>(FileHandler.java:54)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
    at java.lang.Class.newInstance0(Class.java:372)
    at java.lang.Class.newInstance(Class.java:325)
    at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:458)
    at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:403)
    at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:281)
    at java.util.logging.LogManager$2.run(LogManager.java:278)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.util.logging.LogManager.readPrimordialConfiguration(LogManager.java:276)
    at java.util.logging.LogManager.getLogManager(LogManager.java:259)
    at java.util.logging.Logger.<init>(Logger.java:245)
    at java.util.logging.LogManager$RootLogger.<init>(LogManager.java:1106)
    at java.util.logging.LogManager$RootLogger.<init>(LogManager.java:1103)
    at java.util.logging.LogManager$1.run(LogManager.java:199)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.util.logging.LogManager.<clinit>(LogManager.java:176)
    at java.util.logging.Logger.getLogger(Logger.java:307)
    at org.apache.juli.logging.DirectJDKLog.<init>(DirectJDKLog.java:71)
    at org.apache.juli.logging.DirectJDKLog.getInstance(DirectJDKLog.java:178)
    at org.apache.juli.logging.LogFactory.getInstance(LogFactory.java:171)
    at org.apache.juli.logging.LogFactory.getInstance(LogFactory.java:243)
    at org.apache.juli.logging.LogFactory.getLog(LogFactory.java:298)
    at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:55)

1 个答案:

答案 0 :(得分:0)

假设您使用的是tomcat6,只需在/ usr / share / tomcat6中提供此命令

chown -R tomcat6 logs
chmod -R 750 logs

如果需要,对其他子目录(webapps,conf等)执行相同操作。