項目大概作到了數據庫service編寫,遇到了問題,有一個錯誤:java
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建立實例異常,問題待解決,不知道是參數寫錯了仍是格式配置,仍是其餘緣由?apache
簡單框架模擬到如今MVC模式已經建好了模板,數據庫建立完成,建立了轉型,集合,加載文件,字符串工具類,框架
配置了log,jdbc文件,整個過程遇到了許多bug,下星期繼續碼。工具