Details
-
Improvement
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
None
-
None
Description
It can be confusing when you cannot start app because of that
SEVERE: StandardWrapper.Throwable Unable to instantiate VelocityEngine! - Class: org.apache.velocity.runtime.log.LogManager File: LogManager.java Method: createLogChute Line: 206 - org/apache/velocity/runtime/log/LogManager.java:206:-1 at org.apache.struts2.views.velocity.VelocityManager.newVelocityEngine(VelocityManager.java:468) at org.apache.struts2.views.velocity.VelocityManager.init(VelocityManager.java:228) at org.apache.struts2.sitemesh.VelocityDecoratorServlet.init(VelocityDecoratorServlet.java:77) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5229) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5516) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083) at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1880) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.velocity.exception.VelocityException: Failed to initialize an instance of org.apache.velocity.runtime.log.Log4JLogChute with the current runtime configuration. at org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.java:206) at org.apache.velocity.runtime.log.LogManager.updateLog(LogManager.java:255) at org.apache.velocity.runtime.RuntimeInstance.initializeLog(RuntimeInstance.java:795) at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:250) at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:589) at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:135) at org.apache.struts2.views.velocity.VelocityManager.newVelocityEngine(VelocityManager.java:466) ... 18 more Caused by: java.lang.RuntimeException: Error configuring Log4JLogChute : 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:526) at org.apache.velocity.util.ExceptionUtils.createWithCause(ExceptionUtils.java:67) at org.apache.velocity.util.ExceptionUtils.createRuntimeException(ExceptionUtils.java:45) at org.apache.velocity.runtime.log.Log4JLogChute.initAppender(Log4JLogChute.java:133) at org.apache.velocity.runtime.log.Log4JLogChute.init(Log4JLogChute.java:85) at org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.java:157) ... 24 more Caused by: java.io.FileNotFoundException: velocity.log (Permission denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:221) at java.io.FileOutputStream.<init>(FileOutputStream.java:142) at org.apache.log4j.FileAppender.setFile(FileAppender.java:294) at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:207) at org.apache.log4j.FileAppender.<init>(FileAppender.java:110) at org.apache.log4j.RollingFileAppender.<init>(RollingFileAppender.java:79) at org.apache.velocity.runtime.log.Log4JLogChute.initAppender(Log4JLogChute.java:118) Aug 25, 2014 9:01:55 PM org.apache.catalina.core.StandardContext loadOnStartup SEVERE: Servlet /struts2-showcase threw load() exception java.io.FileNotFoundException: velocity.log (Permission denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:221) at java.io.FileOutputStream.<init>(FileOutputStream.java:142) at org.apache.log4j.FileAppender.setFile(FileAppender.java:294) at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:207) at org.apache.log4j.FileAppender.<init>(FileAppender.java:110) at org.apache.log4j.RollingFileAppender.<init>(RollingFileAppender.java:79) at org.apache.velocity.runtime.log.Log4JLogChute.initAppender(Log4JLogChute.java:118) at org.apache.velocity.runtime.log.Log4JLogChute.init(Log4JLogChute.java:85) at org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.java:157) at org.apache.velocity.runtime.log.LogManager.updateLog(LogManager.java:255) at org.apache.velocity.runtime.RuntimeInstance.initializeLog(RuntimeInstance.java:795) at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:250) at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:589) at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:135) at org.apache.struts2.views.velocity.VelocityManager.newVelocityEngine(VelocityManager.java:466) at org.apache.struts2.views.velocity.VelocityManager.init(VelocityManager.java:228) at org.apache.struts2.sitemesh.VelocityDecoratorServlet.init(VelocityDecoratorServlet.java:77) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5229) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5516) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083) at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1880) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)