昨天部署JFinal做的项目到windows2003的jsp虚拟主机上报错了

zkool 发布于 2013/05/04 10:53
阅读 721
收藏 0

昨天部署JFinal做的项目到windows2003的jsp虚拟主机上报错了,用的velocity视图,在本地和linux环境下没遇到这个问题哦。求大神看看!

错误信息:

2013-05-04 10:45:55
[ERROR]-[Thread: TP-Processor3]-[com.jfinal.core.ActionHandler.handle()]: /
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.runtime.RuntimeSingleton.init(RuntimeSingleton.java:229)
	at org.apache.velocity.app.Velocity.init(Velocity.java:107)
	at com.jfinal.render.VelocityRender.render(VelocityRender.java:79)
	at com.jfinal.core.ActionHandler.handle(ActionHandler.java:94)
	at com.zkool.handler.HtmlExtensionHandler.handle(HtmlExtensionHandler.java:18)
	at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
	at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
	at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
	at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
	at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
	at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: Error configuring Log4JLogChute : 
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	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)
	... 25 more
Caused by: java.io.FileNotFoundException: velocity.log (Access is 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.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)
	... 27 more

2013-05-04 10:45:55
[ERROR]-[Thread: TP-Processor3]-[com.jfinal.core.JFinalFilter.doFilter()]: /
com.jfinal.render.RenderException: java.lang.NullPointerException
	at com.jfinal.render.VelocityRender.render(VelocityRender.java:126)
	at com.jfinal.render.Error500Render.render(Error500Render.java:46)
	at com.jfinal.core.ActionHandler.handle(ActionHandler.java:121)
	at com.zkool.handler.HtmlExtensionHandler.handle(HtmlExtensionHandler.java:18)
	at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
	at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
	at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
	at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
	at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
	at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
	at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1400)
	at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1380)
	at org.apache.velocity.runtime.RuntimeSingleton.getTemplate(RuntimeSingleton.java:305)
	at org.apache.velocity.app.Velocity.getTemplate(Velocity.java:383)
	at com.jfinal.render.VelocityRender.render(VelocityRender.java:106)
	... 19 more

以下是问题补充:

@zkool:@JFinal @绝望的八皮 (2013/05/04 10:55)
加载中
0
JFinal
JFinal
分析下这句: Caused by: java.io.FileNotFoundException: velocity.log (Access is denied)。没找到这个文件,后面还有句:Access is denied,是不是该用户没有权限访问?
0
zkool
zkool

引用来自“JFinal”的答案

分析下这句: Caused by: java.io.FileNotFoundException: velocity.log (Access is denied)。没找到这个文件,后面还有句:Access is denied,是不是该用户没有权限访问?
哦,问了下,是没有权限,JFinal里怎么配这个路径呢?
JFinal
JFinal
需要找管理员为你配置
0
佰亿互联
佰亿互联

服务器是不是你们自己配置的呀?有没有用Apache,apache在配置的时候涉及到了文件权限,你看看是不是这块的问题!

返回顶部
顶部