我最近在启动时开始收到以下异常:
Error log4j:ERROR setFile(null,false) call failed.
| Error java.io.FileNotFoundException: /var/log/log4j/log4jEvents.xml (No such file or directory)
| Error at java.io.FileOutputStream.open(Native Method)
| Error at java.io.FileOutputStream.<init>(FileOutputStream.java:194)
| Error at java.io.FileOutputStream.<init>(FileOutputStream.java:116)
| Error at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
| Error at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
| Error at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
| Error at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:295)
| Error at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:176)
| Error at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:191)
| Error at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:523)
| Error at org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.java:436)
| Error at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:1004)
| Error at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:872)
| Error at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:778)
| Error at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
| Error at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
| Error at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:415)
| Error at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| Error at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| Error at java.lang.reflect.Method.invoke(Method.java:597)
| Error at org.codehaus.groovy.grails.cli.GrailsScriptRunner.initializeLogging(GrailsScriptRunner.java:659)
| Error at org.codehaus.groovy.grails.cli.GrailsScriptRunner.initializeState(GrailsScriptRunner.java:631)
| Error at org.codehaus.groovy.grails.cli.GrailsScriptRunner.callPluginOrGrailsScript(GrailsScriptRunner.java:414)
| Error at org.codehaus.groovy.grails.cli.GrailsScriptRunner.executeCommand(GrailsScriptRunner.java:379)
| Error at org.codehaus.groovy.grails.cli.GrailsScriptRunner.main(GrailsScriptRunner.java:227)
| Error at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| Error at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| Error at java.lang.reflect.Method.invoke(Method.java:597)
| Error at org.codehaus.groovy.grails.cli.support.GrailsStarter.rootLoader(GrailsStarter.java:236)
| Error at org.codehaus.groovy.grails.cli.support.GrailsStarter.main(GrailsStarter.java:264)
| Error at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| Error at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| Error at java.lang.reflect.Method.invoke(Method.java:597)
| Error at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
它似乎没有任何影响,但它有点烦人。我猜测最近放入的一些插件或依赖会导致这种情况开始发生,因为它并不总是存在。我无法追查导致它的原因,所以我希望也许有人在这里有想法?