Multiple markers at this line - The type org.springframework.dao.DataAccessException cannot be

本文分享了在使用Spring框架的JdbcTemplate时遇到DataAccessException错误的解决方案。通过检查并引入缺失的spring-tx依赖,成功解决了JdbcTemplate更新方法中引用类型未解析的问题。

今天测试使用JdbcTemplate,报错,报错内容如下:

Multiple markers at this line

      - The type org.springframework.dao.DataAccessException cannot be resolved. It is indirectly referenced from

       required .class files

      - The method update(String) from the type JdbcTemplate refers to the missing type DataAccessException

 

最开始以为是jre版本过高了,改成1.6还是同样的问题,后来发现是有一个包spring-tx-4.1.5.RELEASE.jar,没有放到lib里面,下载粘贴进去,build to path错误就消失了

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值