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条)

报告相同问题?

悬赏问题

  • ¥50 如何增强飞上天的树莓派的热点信号强度,以使得笔记本可以在地面实现远程桌面连接
  • ¥15 MCNP里如何定义多个源?
  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services