spring+ibatis启动报错
请教:spring+ibatis项目,tomcat启动时报错:org.springframework.beans.factory.BeanCreationExceptio...
请教:
spring+ibatis项目, tomcat启动时报错:
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'oracleSqlMapClient' defined in file
[D:\xxxx\apache-tomcat-8.0.21\webapps\xxxx\WEB-INF\classes\applicationContext-ibatis.xml]:
Invocation of init method failed; nested exception is java.lang.
RuntimeException: Error occurred.
Cause: 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/select'.
Cause: com.ibatis.sqlmap.client.SqlMapException: Error. Could not set result class.
Cause: java.lang.ClassNotFoundException: DutyHistorys
===============================
applicationContext-ibatis.xml中有:
<bean id="oracleSqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation">
<value>
classpath:SqlMapConfigOracle.xml
</value>
</property>
<property name="dataSource" ref="oracleDataSource" />
</bean>
里面的SqlMapConfigOracle.xml文件,也的确在src文件夹下;
web.xml中也有:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext-*.xml</param-value>
</context-param>
===================================
已解决, 是因为实体类的映射文件里面的resultClass名称多了一个字母. 展开
spring+ibatis项目, tomcat启动时报错:
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'oracleSqlMapClient' defined in file
[D:\xxxx\apache-tomcat-8.0.21\webapps\xxxx\WEB-INF\classes\applicationContext-ibatis.xml]:
Invocation of init method failed; nested exception is java.lang.
RuntimeException: Error occurred.
Cause: 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/select'.
Cause: com.ibatis.sqlmap.client.SqlMapException: Error. Could not set result class.
Cause: java.lang.ClassNotFoundException: DutyHistorys
===============================
applicationContext-ibatis.xml中有:
<bean id="oracleSqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation">
<value>
classpath:SqlMapConfigOracle.xml
</value>
</property>
<property name="dataSource" ref="oracleDataSource" />
</bean>
里面的SqlMapConfigOracle.xml文件,也的确在src文件夹下;
web.xml中也有:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext-*.xml</param-value>
</context-param>
===================================
已解决, 是因为实体类的映射文件里面的resultClass名称多了一个字母. 展开
1个回答
2015-10-09
展开全部
已解决, 是因为实体类的映射文件里面的resultClass名称多了一个字母.
自查自省啊。
自查自省啊。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询