java.lang.AbstractMethodError: org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout()Ljava/lang/Integer; 報錯解決
在mybatis+spring整合中,由於版本的問題會報錯:
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:325)
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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:408)
at com.sun.proxy.$Proxy12.selectList(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:206)
at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:128)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:68)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:53)
at com.sun.proxy.$Proxy13.selectByExample(Unknown Source)
at bz.beppe.daoTest.SeckillMapperTest.selectByExample(SeckillMapperTest.java:26)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:73)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:73)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:224)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:83)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:68)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:163)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
關於這種問題的根源可以檢視mybatis的官網對於mybatis—spring jar包版本的應用
MyBatis-Spring | MyBatis | Spring |
---|---|---|
1.0.0 and 1.0.1 | 3.0.1 to 3.0.5 | 3.0.0 or higher |
1.0.2 | 3.0.6 | 3.0.0 or higher |
1.1.0 or higher | 3.1.0 or higher | 3.0.0 or higher |
1.3.0 or higher | 3.4.0 or higher | 3.0.0 or higher |
通過這個對應關係來選擇你需要的mybatis-spring jar 包的版本
我之前使用的是spring 4.1+mybatis 3.4 而mybatis-spring 使用的是1.2版本,導致專案報錯,改成1.3.0 版本後一切正常!!
相關推薦
java.lang.AbstractMethodError: org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout()Ljava/lang/Integer; 報錯解決
在mybatis+spring整合中,由於版本的問題會報錯: java.lang.AbstractMethodError: org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout()Ljava/lang/Integer; at or
org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout()Ljava/lang/Integer;解決該問題2018.11
宣告,使用JDK8,maven3.5.4, spring5.0.7, idea2018.2 問題描述: 在spring整合mybatis測試過程中報錯如下: java.lang.AbstractMethodError:org.mybatis.spring.transac
org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout()Ljava/lang/Integer;錯誤解決:
在ssm專案執行的時候報錯: 嚴重: Servlet.service() for servlet [springmvc] in context with path [/BookSystem] threw exception [Handler dispatch failed;
org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout()Ljava/lang/Integer;報錯解決
問題解決 問題原因:在mybatis+spring整合中,由於版本的問題會報錯。 解決 MyBatis-Spring MyBatis Spring 1.0.0 and
org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout()Ljava/lang/Integer
原帖地址:https://www.cnblogs.com/beppezhang/p/6118661.html在mybatis+spring整合中,由於版本的問題會報錯:關於這種問題的根源可以檢視mybatis的官網對於mybatis—spring jar包版本的應用MyBat
整合spring和mybatis時,異常java.lang.AbstractMethodError: org.mybatis.spring.transaction.SpringManagedTrans
觸發原因:單方面升級mybatis版本。 mybatis、mybatis-spring版本如下: <dependency> <groupId>org.mybatis</groupId> <artifa
【JavaBug篇】java.lang.AbstractMethodError: org.mybatis.spring.transaction.SpringManagedTransactionFact
Got unchecked and undeclared exception which called by 192.168.228.1. service: cn.uppp.user.IUserCor
springboot整合mybatis報錯:Invalid default: public abstract java.lang.Class org.mybatis.spring.annotation
在spring boot啟動main方法所在的類中加入 @MapperScan注入後報錯: Invalid default: public abstract java.lang.Class org.mybatis.spring.annotation.MapperScan.
Jersey-Spring整合:java.lang.AbstractMethodError: javax.ws.rs.core.UriBuilder.uri(Ljava/lang/String;)..
Jersey與Spring整合時報的錯誤:java.lang.AbstractMethodError: javax.ws.rs.core.UriBuilder.uri(Ljava/lang/String
java.lang.NoSuchMethodError: org.apache.commons.validator.Validator.setParameter(Ljava/lang/String;Ljava/lang/Object;)V解決方法
ERROR 2009-07-16 11:29:49 org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/zxtest].[action] Servlet.service() for servlet a
cxf之java.lang.NoSuchMethodError: org.springframework.aop.support.AopUtils.isCglibProxyClass(Ljava/lang/C
樓主好懶,主要還是jar版本的問題,spring4.2.0以上需要使用cxf3.0.0以上的版本 看了一下cxf的相關pom檔案確實是版本陳舊........ <!-- cxf begin -
hadoop寫MR程式報錯java.lang.AbstractMethodError: org.apache.hadoop.yarn.api.records.LocalResource.setShou
情況:在本地書寫mapreduce的時候,執行driver類 開始跑任務的時候,有時候可能會報 java.lang.AbstractMethodError: org.apache.hadoop.yarn.api.records.LocalResource.setShouldBeUploadedT
Java開發常見錯誤:org.mybatis.spring.MyBatisSystemException
org.apache.ibatis.binding.BindingException: Parameter 'username' not found. Available parameters are [param1, tag] 《=====================
CXF:java.lang.AbstractMethodError:org.apache.xerces.dom.ElementNSImpl.setUserData
前言: 在一個JavaWeb專案中,要接入WebService時,使用CXF,但是接入的時候出現異常: java.lang.AbstractMethodError: org.apache.
Spring和mybatis整合 org.mybatis.spring.mapper.MapperScannerConfigurer
註冊 rop repo html itl tar hive mybatis property 在springmvc與mybatis整合時,需要對每一個mapper定義對應的一個MapperFactoryBean,可以使用MapperScannerConfigurer自動掃描
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.mybatis.spring.mapper.MapperScannerConfigurer#0'
4.2 register class rop required endorsed current namespace prope 七月 05, 2018 10:26:54 上午 org.apache.tomcat.util.digester.SetPropertiesRul
org.mybatis.spring.MyBatisSystemException解決方法
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: Error instantiating class cn.sxt.
spring+redis 報錯 org.springframework.core.serializer.support.DeserializingConverter.(Ljava/lang
這個問題的原因大概就是spring-data-redis.jar包版本不對 ,下面版本可以正常啟動 <dependency> <groupId>org.springframework.data</groupId> <artifactI
Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.Persistence
今天發現一個簡單的錯誤,詳細如下: type Exception report message Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exceptio
mybatis報錯解決辦法 :Result Maps collection does not contain value for java.lang.String
錯誤 java.lang.IllegalArgumentException: Result Maps collection does not contain value for java.lang.String at org.apache.ibatis.session.Configura