求java高手帮我解决这个问题!!! 5
log4j:ERRORCouldnotreadconfigurationfile[conf\log4j.properties].java.io.FileNotFoundE...
log4j:ERROR Could not read configuration file [conf\log4j.properties].
java.io.FileNotFoundException: conf\log4j.properties (系统找不到指定的路径。)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:120)
at java.io.FileInputStream.<init>(FileInputStream.java:79)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:316)
at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:342)
at run.SegMain.<init>(SegMain.java:18)
at run.SegMain.main(SegMain.java:27)
log4j:ERROR Ignoring configuration file [conf\log4j.properties].
log4j:WARN No appenders could be found for logger (org.ictclas4j.segment.Segment).
log4j:WARN Please initialize the log4j system properly.
请问怎么下载语料库,只要有语料库下载就可以了。 展开
java.io.FileNotFoundException: conf\log4j.properties (系统找不到指定的路径。)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:120)
at java.io.FileInputStream.<init>(FileInputStream.java:79)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:316)
at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:342)
at run.SegMain.<init>(SegMain.java:18)
at run.SegMain.main(SegMain.java:27)
log4j:ERROR Ignoring configuration file [conf\log4j.properties].
log4j:WARN No appenders could be found for logger (org.ictclas4j.segment.Segment).
log4j:WARN Please initialize the log4j system properly.
请问怎么下载语料库,只要有语料库下载就可以了。 展开
5个回答
展开全部
创建这个文件就好了嘛 conf\log4j.properties
它是 Log4j 的配置文件
# Set log levels #
log4j.rootLogger = DEBUG, Console, LogFile
# Output the log info to the Java Console #
log4j.appender.Console = org.apache.log4j.ConsoleAppender
log4j.appender.Console.Target = System.out
log4j.appender.Console.ImmediateFlush = true
log4j.appender.Console.Threshold = DEBUG
log4j.appender.Console.layout = org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern = <%-d{yyyy-MM-dd HH:mm:ss}> <%t> %l %n<%p> %m%n%n
# Save the log info to the log file #
log4j.appender.LogFile = org.apache.log4j.RollingFileAppender
log4j.appender.LogFile.File = logs/log.log
log4j.appender.LogFile.Append = true
log4j.appender.LogFile.ImmediateFlush = false
log4j.appender.LogFile.MaxFileSize = 8MB
log4j.appender.LogFile.MaxBackupIndex = 256
log4j.appender.LogFile.Threshold = INFO
log4j.appender.LogFile.layout = org.apache.log4j.PatternLayout
log4j.appender.LogFile.layout.ConversionPattern = <%-d{yyyy-MM-dd HH:mm:ss}> <%t> %l %n<%p> %m%n%n
它是 Log4j 的配置文件
# Set log levels #
log4j.rootLogger = DEBUG, Console, LogFile
# Output the log info to the Java Console #
log4j.appender.Console = org.apache.log4j.ConsoleAppender
log4j.appender.Console.Target = System.out
log4j.appender.Console.ImmediateFlush = true
log4j.appender.Console.Threshold = DEBUG
log4j.appender.Console.layout = org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern = <%-d{yyyy-MM-dd HH:mm:ss}> <%t> %l %n<%p> %m%n%n
# Save the log info to the log file #
log4j.appender.LogFile = org.apache.log4j.RollingFileAppender
log4j.appender.LogFile.File = logs/log.log
log4j.appender.LogFile.Append = true
log4j.appender.LogFile.ImmediateFlush = false
log4j.appender.LogFile.MaxFileSize = 8MB
log4j.appender.LogFile.MaxBackupIndex = 256
log4j.appender.LogFile.Threshold = INFO
log4j.appender.LogFile.layout = org.apache.log4j.PatternLayout
log4j.appender.LogFile.layout.ConversionPattern = <%-d{yyyy-MM-dd HH:mm:ss}> <%t> %l %n<%p> %m%n%n
展开全部
你的配置文件的路径有问题
你的是 web项目还是 se项目?
你的是 web项目还是 se项目?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
代码粘上来好不好呢 这错误信息什么也看不出来
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
路径不正确呗,贴上你的代码才能看出来具体问题
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询