项目大概做到了数据库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,下星期继续码。