iteye_17523 2010-03-17 14:22
浏览 187
已采纳

Maven2 ibatis log4j配置时的问题

项目本来是用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]

  • 写回答

3条回答

  • qwe_rt 2010-03-17 14:40
    关注

    对于log4j1.2.15版本也有解决办法,
    下面文章讲了
    [quote]http://tsaijemmy.spaces.live.com/blog/cns!4AD532D0CD18A21D!1505.entry[/quote]
    Log4J 1.2.15依賴三個Jar之故。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥200 uniapp长期运行卡死问题解决
  • ¥15 latex怎么处理论文引理引用参考文献
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?
  • ¥15 乘性高斯噪声在深度学习网络中的应用