运行报错啦,研究半天没解决,求大神!
我是spring+struts2+ibatis整合的,配置ibatis时报错的,大家帮帮忙啊啊,研究很多了,急啊。
[ERROR] 2011-03-06 14:32:10 :Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClient' defined in class path resource [applicationContext.xml]: Invocation of init method failed;
nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [sqlMapConfig.xml]; nested exception is
com.ibatis.common.xml.NodeletException: Error parsing XML. Cause:
java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.
RuntimeException: Error parsing XPath '/sqlMap/resultMap'. Cause: java.lang.RuntimeException: Error configuring Result. Could not set ResultClass. Cause:
java.lang.ClassNotFoundException: xml.user
...中间还有很多
严重: Error listenerStart2011-3-6 14:32:10 org.apache.catalina.core.StandardContext start
严重: Context [/UserManager]
startup failed due to previous errors[INFO ] 2011-03-06 14:32:10 :Closing Spring root WebApplicationContext
[INFO ] 2011-03-06 14:32:10 :Shutting down log4j
------解决方案--------------------应该是sqlMapConfig.xml里面有错误。以前用过一次ibatis,配置文件里的sql语句很多错误,跑了十几次才搞好。sql太差了,可耻的匿了……
------解决方案--------------------Could not set ResultClass. Cause: java.lang.
ClassNotFoundException: xml.user
------解决方案--------------------
看看你的配置文件中应该有
resultClass="xml.user"
将类名写正确就行了。