JFinal1.9使用jetty启动报错,无解中,求解救~~

Starting JFinal 1.9
Starting scanner at interval of 5 seconds.
Starting web server on port: 80
log4j:WARN File option not set for appender [file].
log4j:WARN Are you using FileAppender instead of ConsoleAppender?
log4j:ERROR Either File or DatePattern options are not set for appender [file].
2016-11-21 17:45:24,813 [com.jd.xueche.common.config.DriveConfig]-[INFO] Load Routes BEGIN.....

2016-11-21 17:45:24
[INFO]-[Thread: main]-[com.jd.xueche.common.config.DriveConfig.configRoute()]: Load Routes BEGIN.....
log4j:ERROR No output stream or file set for the appender named [file].
log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
log4j:ERROR The class "org.apache.log4j.Appender" was loaded by 
log4j:ERROR [sun.misc.Launcher$AppClassLoader@41dee0d7] whereas object of type 
log4j:ERROR "org.apache.log4j.ConsoleAppender" was loaded by [WebAppClassLoader=@38f4f222].
log4j:ERROR Could not instantiate appender named "console".
log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
log4j:ERROR The class "org.apache.log4j.Appender" was loaded by 
log4j:ERROR [sun.misc.Launcher$AppClassLoader@41dee0d7] whereas object of type 
log4j:ERROR "org.apache.log4j.ConsoleAppender" was loaded by [WebAppClassLoader=@38f4f222].
log4j:ERROR Could not instantiate appender named "stdout".
log4j:ERROR A "org.apache.log4j.DailyRollingFileAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
log4j:ERROR The class "org.apache.log4j.Appender" was loaded by 
log4j:ERROR [sun.misc.Launcher$AppClassLoader@41dee0d7] whereas object of type 
log4j:ERROR "org.apache.log4j.DailyRollingFileAppender" was loaded by [WebAppClassLoader=@38f4f222].
log4j:ERROR Could not instantiate appender named "file".
log4j:WARN No appenders could be found for logger (org.apache.commons.httpclient.params.DefaultHttpParams).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
2016-11-21 17:45:25,039 [com.jd.xueche.common.config.DriveConfig]-[INFO] Load Routes END.....

2016-11-21 17:45:25
[INFO]-[Thread: main]-[com.jd.xueche.common.config.DriveConfig.configRoute()]: Load Routes END.....
2016-11-21 17:45:25,039 [com.jd.xueche.common.config.DriveConfig]-[INFO] Load Plugin BEGIN.....

2016-11-21 17:45:25
[INFO]-[Thread: main]-[com.jd.xueche.common.config.DriveConfig.configPlugin()]: Load Plugin BEGIN.....
2016-11-21 17:45:28,374 [com.alibaba.druid.pool.DruidDataSource]-[INFO] {dataSource-1} inited

2016-11-21 17:45:28
[INFO]-[Thread: main]-[com.alibaba.druid.pool.DruidDataSource.init()]: {dataSource-1} inited
Starting Complete. Welcome To The JFinal World :)



一个老项目,用tomcat启动正常,jetty启动就这样子报错,不知道哪里不对。


评论区

JFinal

2016-11-21 18:02

换掉 log4j.properties 这个配置文件,在首页下载 jfinal demo,里面有一个这文件,直接 copy 过去使用即可

nbjgl

2016-11-22 08:27

Starting JFinal 1.9
Starting scanner at interval of 5 seconds.
Starting web server on port: 80
log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
log4j:ERROR [sun.misc.Launcher$AppClassLoader@f7b650a] whereas object of type
log4j:ERROR "org.apache.log4j.ConsoleAppender" was loaded by [WebAppClassLoader=@38f4f222].
log4j:ERROR Could not instantiate appender named "stdout".
log4j:ERROR A "org.apache.log4j.FileAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
log4j:ERROR [sun.misc.Launcher$AppClassLoader@f7b650a] whereas object of type
log4j:ERROR "org.apache.log4j.FileAppender" was loaded by [WebAppClassLoader=@38f4f222].
log4j:ERROR Could not instantiate appender named "file".
Starting Complete. Welcome To The JFinal World :)

nbjgl

2016-11-22 08:27

复制过来以后,报这个错了~~

热门反馈

扫码入社