Tomcat下运行jdonframework问题??

07-10-14 yekongda

小弟刚接触jdonframework用您配置好的Tomcat环境,解压后运行startup.bat,控制台报错,运行http://localhost:8080/jpetstore/也找不到网页??

log4j:ERROR setFile(null,true) call failed.

java.io.FileNotFoundException: D:\javaserver\jakarta-tomcat-5.0.28\logs\tomcat5.log (系统找不到指定的路径。)

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:272)

at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:151)

at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:206)

at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:247)

at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:123)

at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:87)

at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:645)

at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:603)

at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:500)

at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:406)

at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:432)

at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:456)

at org.apache.log4j.LogManager.<clinit>(LogManager.java:145)

at org.apache.log4j.Logger.getLogger(Logger.java:85)

at org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:229)

at org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:65)

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.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)

at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)

at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)

at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)

at org.apache.catalina.core.StandardService.<clinit>(StandardService.java:53)

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 java.lang.Class.newInstance0(Class.java:355)

at java.lang.Class.newInstance(Class.java:308)

at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:208)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:402)

log4j:ERROR Either File or DatePattern options are not set for appender [R].

1
yekongda
2007-10-15 09:46

网页能打开了一切正常了(小弟的database用户名密码不正确)可log4j还是报错??

banq
2007-10-15 09:53

将log4j.properties中的D:\javaserver\jakarta-tomcat-5.0.28\logs\tomcat5.log 改为你自己的目录

yekongda
2007-10-15 18:48

搞定了,麻烦您了彭老师。