Error message here!

Hide Error message here!

忘记密码?

Error message here!

请输入正确邮箱

Hide Error message here!

密码丢失?请输入您的电子邮件地址。您将收到一个重设密码链接。

Error message here!

返回登录

Close

4号随笔

java石头人 2020-10-05 01:00:00 阅读数:26 评论数:0 点赞数:0 收藏数:0

项目大概做到了数据库service编写,遇到了问题,有一个错误:

log4j:ERROR Could not instantiate class [org,apache.log4j.PatternLayout].
java.lang.ClassNotFoundException: org,apache.log4j.PatternLayout
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.log4j.helpers.Loader.loadClass(Loader.java:198)
at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:327)
at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:124)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:797)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:66)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:277)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:288)
at com.feng.chapter2.util.PropsUtil.<clinit>(PropsUtil.java:13)
at com.feng.chapter2.service.CustomerService.<clinit>(CustomerService.java:23)
at com.feng.chapter2.test.CustomerServiceTest.<init>(CustomerServiceTest.java:19)

说log4j创建实例异常,问题待解决,不知道是参数写错了还是格式配置,还是其他原因?

简单框架模拟到现在MVC模式已经建好了模板,数据库创建完成,创建了转型,集合,加载文件,字符串工具类,

配置了log,jdbc文件,整个过程遇到了许多bug,下星期继续码。

版权声明
本文为[java石头人]所创,转载请带上原文链接,感谢
https://www.cnblogs.com/zzy8080/p/13768980.html