zoukankan      html  css  js  c++  java
  • mybatis3.4与spring3.2.5整合出现的问题

    错误信息:

    Exception in thread "main" java.lang.AbstractMethodError: org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout()Ljava/lang/Integer;
     at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:85)
     at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:62)
     at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324)
     at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
     at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
     at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:83)
     at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148)
     at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)
     at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:77)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:408)
     at $Proxy5.selectOne(Unknown Source)
     at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:166)
     at cn.itcast.dao.impl.DeptDaoImpl.findById(DeptDaoImpl.java:28)
     at cn.itcast.service.DeptService.findDept(DeptService.java:34)
     at cn.itcast.service.DeptService.main(DeptService.java:46)

    检查了一下午的错误,还以为是配置文件写错了,结果是jar包不支持

    mybatis3.4需要mybatis-spring1.3才能支持,换了整合jar包就解决了

  • 相关阅读:
    PHP $_POST 变量
    PHP $_GET 变量
    PHP 完整表单实例
    PHP 表单
    PHP 表单
    PHP 表单验证
    00_前情回顾
    18_今日回顾
    VMware 12PRO安装Mac OS X 10.10.5
    05_传智播客iOS视频教程_第一个OC程序
  • 原文地址:https://www.cnblogs.com/wt20/p/6033815.html
Copyright © 2011-2022 走看看