问题描述
才学Ibatis,DAO什么的都已经生成好了。如何才能插入数据或查询数据?是在pulibc static void main(String args[])里实现吗怎么我报Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory需要配置服务器吗? 问题补充:xianshi_cn 写道
解决方案
缺少日志依赖包,去官方网站下载commons-logging.jar,然后复制到你项目的lib文件夹下:http://apache.etoak.com//commons/logging/binaries/commons-logging-1.1.1-bin.zip
解决方案二:
如果你要的话,我可以给你一个完整的Ibatis实例加我MSN qcs4712248@live.com
解决方案三:
引用问题补充:xianshi_cn 写道Your classpath is missing 'org/apache/commons/logging/LogFactory', you gotta add commons-logging in your classpath. The easiest way is copy commons-logging.jar in your lib folder.是ibatis的lib么?Nope. For example, if your project is web application, copy commons-logging.jar to ${you_app}/WEB-INF/lib/ folder.
解决方案四:
ibatis需要commons-logging.jar 的包,去下一个导入工程就不会报这个错了。http://ishare.iask.sina.com.cn/f/12460564.html?from=like&retcode=0
解决方案五:
Your classpath is missing 'org/apache/commons/logging/LogFactory',you gotta add commons-logging in your classpath.The easiest way is copy commons-logging.jar in your lib folder.