java.lang.NoClassDefFoundError: org/apache/ibatis/mapping/DatabaseIdProvider

我用的方案是:maven+struts2+spring+mybatis

出现上述错误的原因是:

<dependency>

<groupId>org.mybatis</groupId>

<artifactId>mybatis</artifactId>

<version>3.0.1</version>

</dependency>

<dependency>

<groupId>org.mybatis</groupId>

<artifactId>mybatis-spring</artifactId>

<version>1.2.2</version>

</dependency>

两个mybatis版本不兼容,把第一个dependency的mybatis版本提高的最新就可以解决这个问题了。改变后的结果如下所示:

<dependency>

<groupId>org.mybatis</groupId>

<artifactId>mybatis</artifactId>

<version>3.2.7</version>

</dependency>

<dependency>

<groupId>org.mybatis</groupId>

<artifactId>mybatis-spring</artifactId>

<version>1.2.2</version>

</dependency>

java.lang.NoClassDefFoundError: org/apache/ibatis/mapping/DatabaseIdProvider

时间: 2024-10-29 19:11:38

java.lang.NoClassDefFoundError: org/apache/ibatis/mapping/DatabaseIdProvider的相关文章

java lang NoClassDefFoundError org/apache/ibatis/session/Sq

1.错误描述 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngineConfiguration' defined in class path resource [activiti.cfg.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFound

java.lang.NoClassDefFoundError: org/apache/ibatis/cursor/Cursor

因为mybatis的版本和mybatis-spring的版本不兼容导致的,解决方法:mybatis的3.4.0及以上版本用mybatis-spring1.3.0及以上版本:mybatis的3.4.0以下版本用mybatis-spring1.3.0以下版本. 参考链接:http://blog.csdn.net/xqhys/article/details/53982149

MyBatis3.4.0以上的分页插件错误:Could not find method on interface org.apache.ibatis.executor.statement.StatementHandler named prepare. Cause: java.lang.NoSuchMethodException: org.apache.ibatis.executor.stateme

错误: Could not find method on interface org.apache.ibatis.executor.statement.StatementHandler named prepare. Cause: java.lang.NoSuchMethodException: org.apache.ibatis.executor.statement.StatementHandler.prepare(java.sql.Connection)] with root cause 问题

Exception in thread &quot;main&quot; java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

MyEclipse运行的时候报错,菜鸟不理解是什么意思,最后找了一些资料才知道是因为缺少commons-logging.jar包 Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.commons.httpclient.HttpClient.<clinit>(HttpClient.java:66) at c

MyEclipse8.5集成Tomcat7时的启动错误:Exception in thread “main” java.lang.NoClassDefFoundError org/apache/commons/logging/LogFactory

今天,安装Tomcat7.0.21后,单独用D:\apache-tomcat-7.0.21\bin\startup.bat启动web服务正常.但在MyEclipse8.5中集成配置Tomcat7后,在MyEclipse启动Tomcat服务则出现如下错误提示: Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactoryat org.apache.catalina.star

spring异常记录-----java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils

今天在练习怎样SSH中进行单元測试的时候出现下列异常: SEVERE: Exception starting filter Struts2 java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:211

关于java.lang.NoClassDefFoundError: org/apache/commons/collections/FastHashMap的错误解决办法

在JavaEE开发中,在把配置文件中的数据或用户表单提交上来的数据,封装在相应JavaBean的对象的对应属性中时:在实际开发中,使用第三方法工具包BeanUtils(commons-beanutils-xxx.jar 依赖于commons-logging-xx.jar). 如博主在JavaWeb工程中,导入的jar包:commons-beanutils-1.9.3.jar和commons-logging-1.2.jar 这是在运行时报错了:eption in thread "main"

Exception in thread &quot;main&quot; java.lang.NoClassDefFoundError: org/apache/hadoop/yarn/util/Apps Hadoop2.6.0编程问题与解决

从hadoop 1.2.1升级到 Hadoop2.6.0,调试写代码,还是遇到一些问题的.这里记录一下,后续如果自己再遇到类似问题,那也好找原因了. 在eclipse里编译运行 WordCount,出现以下错误. Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/yarn/util/Apps at java.lang.ClassLoader.defineClass1(Native M

struts2与struts1整合,java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

原因:我往项目的WEB-INF/lib中导入了struts2基本的包,还有struts1的core包,以及struts2-strut1-plugin的包,但是没有导入commons-loggin-1.3.1这个包,如下图 我打开commons-loggin-1.3.1这个包看了一下,果然找到了这个组件的class文件 看到这个错误的时候,我感觉就应该i啊是commons-logging这个包没有添加导致的,添加上就好了 struts2与struts1整合,java.lang.NoClassDef