问题描述
Exceptioninthread"main"org.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'sqlMapClient'definedinclasspathresource[applicationContext.xml]:Initializationofbeanfailed;nestedexceptionisjava.lang.RuntimeException:Erroroccurred.Cause:com.ibatis.common.xml.NodeletException:ErrorparsingXML.Cause:java.lang.RuntimeException:ErrorparsingXPath'/sqlMapConfig/sqlMap'.Cause:com.ibatis.common.xml.NodeletException:ErrorparsingXML.Cause:java.lang.RuntimeException:ErrorparsingXPath'/sqlMap/insert'.Cause:com.ibatis.sqlmap.client.SqlMapException:Error.Couldnotsetparameterclass.Cause:java.lang.ClassNotFoundException:com.kxy.bean.Message.javajava.lang.RuntimeException:Erroroccurred.Cause:com.ibatis.common.xml.NodeletException:ErrorparsingXML.Cause:java.lang.RuntimeException:ErrorparsingXPath'/sqlMapConfig/sqlMap'.Cause:com.ibatis.common.xml.NodeletException:ErrorparsingXML.Cause:java.lang.RuntimeException:ErrorparsingXPath'/sqlMap/insert'.Cause:com.ibatis.sqlmap.client.SqlMapException:Error.Couldnotsetparameterclass.Cause:java.lang.ClassNotFoundException:com.kxy.bean.Message.javaatcom.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:89)atcom.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapClientBuilder.java:63)atorg.springframework.orm.ibatis.SqlMapClientFactoryBean.afterPropertiesSet(SqlMapClientFactoryBean.java:258)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1091)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:396)atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233)atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:277)atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:313)atorg.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:87)atorg.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:72)atorg.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:63)attest.Test.main(Test.java:15)Causedby:com.ibatis.common.xml.NodeletException:ErrorparsingXML.Cause:java.lang.RuntimeException:ErrorparsingXPath'/sqlMapConfig/sqlMap'.Cause:com.ibatis.common.xml.NodeletException:ErrorparsingXML.Cause:java.lang.RuntimeException:ErrorparsingXPath'/sqlMap/insert'.Cause:com.ibatis.sqlmap.client.SqlMapException:Error.Couldnotsetparameterclass.Cause:java.lang.ClassNotFoundException:com.kxy.bean.Message.javaatcom.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:53)atcom.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:86)...12moreCausedby:java.lang.RuntimeException:ErrorparsingXPath'/sqlMapConfig/sqlMap'.Cause:com.ibatis.common.xml.NodeletException:ErrorparsingXML.Cause:java.lang.RuntimeException:ErrorparsingXPath'/sqlMap/insert'.Cause:com.ibatis.sqlmap.client.SqlMapException:Error.Couldnotsetparameterclass.Cause:java.lang.ClassNotFoundException:com.kxy.bean.Message.javaatcom.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:123)atcom.ibatis.common.xml.NodeletParser.process(NodeletParser.java:84)atcom.ibatis.common.xml.NodeletParser.process(NodeletParser.java:102)atcom.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:72)atcom.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:51)...13moreCausedby:com.ibatis.common.xml.NodeletException:ErrorparsingXML.Cause:java.lang.RuntimeException:ErrorparsingXPath'/sqlMap/insert'.Cause:com.ibatis.sqlmap.client.SqlMapException:Error.Couldnotsetparameterclass.Cause:java.lang.ClassNotFoundException:com.kxy.bean.Message.javaatcom.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:53)atcom.ibatis.sqlmap.engine.builder.xml.SqlMapParser.parse(SqlMapParser.java:51)atcom.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser$11.process(SqlMapConfigParser.java:410)atcom.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:121)...17moreCausedby:java.lang.RuntimeException:ErrorparsingXPath'/sqlMap/insert'.Cause:com.ibatis.sqlmap.client.SqlMapException:Error.Couldnotsetparameterclass.Cause:java.lang.ClassNotFoundException:com.kxy.bean.Message.javaatcom.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:123)atcom.ibatis.common.xml.NodeletParser.process(NodeletParser.java:84)atcom.ibatis.common.xml.NodeletParser.process(NodeletParser.java:102)atcom.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:72)atcom.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:51)...20moreCausedby:com.ibatis.sqlmap.client.SqlMapException:Error.Couldnotsetparameterclass.Cause:java.lang.ClassNotFoundException:com.kxy.bean.Message.javaatcom.ibatis.sqlmap.engine.builder.xml.SqlStatementParser.parseGeneralStatement(SqlStatementParser.java:112)atcom.ibatis.sqlmap.engine.builder.xml.SqlMapParser$19.process(SqlMapParser.java:563)atcom.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:121)...24moreCausedby:java.lang.ClassNotFoundException:com.kxy.bean.Message.javaatjava.net.URLClassLoader$1.run(UnknownSource)atjava.security.AccessController.doPrivileged(NativeMethod)atjava.net.URLClassLoader.findClass(UnknownSource)atjava.lang.ClassLoader.loadClass(UnknownSource)atsun.misc.Launcher$AppClassLoader.loadClass(UnknownSource)atjava.lang.ClassLoader.loadClass(UnknownSource)atjava.lang.ClassLoader.loadClassInternal(UnknownSource)atjava.lang.Class.forName0(NativeMethod)atjava.lang.Class.forName(UnknownSource)atcom.ibatis.common.resources.Resources.classForName(Resources.java:265)atcom.ibatis.sqlmap.engine.builder.xml.SqlStatementParser.parseGeneralStatement(SqlStatementParser.java:108)...26more是我的appliactionContext里面bean写错了吗求改正
解决方案
解决方案二:
又是java来打net脸的