ibatis错误:java.lang.NoClassDefFoundError

Exception in thread "main" java.lang.NoClassDefFoundError: com/ibatis/common/exception/NestedRuntimeException
	at com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapClientBuilder.java:62)
	at ibatis.iBatisDemo.main(iBatisDemo.java:15)
Caused by: java.lang.ClassNotFoundException: com.ibatis.common.exception.NestedRuntimeException
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	... 2 more
原因:Jar包问题,com.ibatis.common.exception找不到报错,怎么会呢?仔细检查发现重复Jar,mybatis-2.3.5和sqlMap.jar多了,并且和包引用的先后顺序有关。

你可能感兴趣的:(iBatis(Mybatis))