项目本来是用Maven2 管理的,用了struts2 ibatis 等等框架,今天做单元测试,发现ibatis不显示实际执行的SQL实在难过就网上搜了一下怎么才能显示,得知需要配置log4j,于是想正好就把日志啊什么的都添加上。
可是在pom中添加了commons-logging 和log4j依赖后,再次mvn test,就开始报错了。具体信息贴在下面。
我尝试删了出错的几个jar文件,让maven重新下载,但是没有作用。
[WARNING] POM for 'javax.jms:jms:pom:1.1:compile' is invalid.
Its dependencies (if any) will NOT be available to the current build.
[WARNING] POM for 'com.sun.jdmk:jmxtools:pom:1.2.1:compile' is invalid.
Its dependencies (if any) will NOT be available to the current build.
[WARNING] POM for 'com.sun.jmx:jmxri:pom:1.2.1:compile' is invalid.
...
Failure executing javac, but could not parse the error:
错误:读取 F:.m2\repository\javax\jms\jms\1.1\jms-1.1.jar 时出错; error in opening zip file
错误:读取 F:.m2\repository\com\sun\jdmk\jmxtools\1.2.1\jmxtools-1.2.1.jar 时出错; error in opening zip file
错误:读取 F:.m2\repository\com\sun\jmx\jmxri\1.2.1\jmxri-1.2.1.jar 时出错; error in opeing zip file
3 错误
希望有知道怎么回事或者也曾遇到过类似问题的人能帮忙.谢谢
[color=red]该问题已经解决,只是将 log4j 的版本从1.2.15改成1.2.14,但是具体出错原因我还没有找到,希望有人能把解决方法贴到回复里面,我好做有满意答案结贴方便以后查找的人^_^[/color]