gpt4 book ai didi

tomcat - 部署 grails 应用程序时 stacktrace.log 出现问题

转载 作者:行者123 更新时间:2023-11-28 21:45:42 25 4
gpt4 key购买 nike

我在部署 grails 应用程序时遇到问题。

我得到以下异常:

log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: stacktrace.log (Permission denied)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:177)
at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
at org.apache.log4j.spi.OptionHandler$activateOptions.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
at org.codehaus.groovy.grails.plugins.logging.Log4jConfig.createFullstackTraceAppender(Log4jConfig.groovy:177)
at org.codehaus.groovy.grails.plugins.logging.Log4jConfig.this$2$createFullstackTraceAppender(Log4jConfig.groovy)
at org.codehaus.groovy.grails.plugins.logging.Log4jConfig$this$2$createFullstackTraceAppender.callCurrent(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:145)
at org.codehaus.groovy.grails.plugins.logging.Log4jConfig.configure(Log4jConfig.groovy:145)
at org.codehaus.groovy.grails.web.util.Log4jConfigListener.contextInitialized(Log4jConfigListener.java:62)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
May 25, 2011 11:16:54 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext

我在配置中对记录器的设置如下所示:

log4j = { 
appenders {
rollingFile name: "stacktrace", maxFileSize: 1024, file: "/var/www/logs/myapp-stacktrace.log"
}
}

我还尝试禁用记录器 log4j = { 附加程序{ “空”名称:“堆栈跟踪” }

这个目录的权限是为tomcat用户设置的

-rwxr--r-- 1 tomcat6 root 0 May 24 18:38 myapp-stacktrace.log

完全没有成功...感谢任何反馈和帮助!!

最佳答案

我在 Grails 1.3.7 中遇到了类似的问题,并发现此问题已修复(通过将堆栈跟踪日志推送到标准日志记录目录)

log4j = {
appenders {
rollingFile name: "stacktrace", maxFileSize: 1024, file: "/var/logs/piws-stacktrace.log"
....

关于tomcat - 部署 grails 应用程序时 stacktrace.log 出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6132095/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com