SSH配置出错 20
严重:Contextinitializationfailedorg.springframework.beans.factory.BeanCreationException...
严重: Context initialization failed
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'userController' defined in file [E:\MyEclipse file2\.metadata\.me_tcat\webapps\SpringMvc_XM\WEB-INF\classes\com\action\UserController.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating 展开
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'userController' defined in file [E:\MyEclipse file2\.metadata\.me_tcat\webapps\SpringMvc_XM\WEB-INF\classes\com\action\UserController.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating 展开
1个回答
展开全部
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.commons.dbcp.BasicDataSource] for bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception isjava.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource
解决:
缺少commons-dbcp.jar和commons-pool.jar两个包。将个包填入WEB-INF/lib目录下。(在Project Explorer中直接托过去)
二、
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.jdbc.datasource.DataSourceTransationManager] for bean with name 'transactionManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception isjava.lang.ClassNotFoundException: org.springframework.jdbc.datasource.DataSourceTransationManager
解决:
原类名是
org.springframework.jdbc.datasource.DataSourceTransactionManager
拼写时少写了个c。
附:transaction事务处理、更新数据;transation事务处理、交易
三、
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClient' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: ServletContext resource [/WEB-INF/sql-map-config.xml]; nested exception iscom.ibatis.common.xml.NodeletException: Error parsing XML. Cause:org.xml.sax.SAXParseException: Document root element "sqlmapconfig", must match DOCTYPE root "sqlMapConfig".
解决:
原来是<!DOCTYPE sqlMapConfig 中的sqlMapConfig的写法与下面的两个标签<sqlmapconfig>和<sqlmap>不一致。将它们改成一致的就可以了,如下:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMapConfig
PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<sqlMap resource="com/XXXXX/persistence/map/xml/Student.xml"/>
</sqlMapConfig>
你可以参考一下
解决:
缺少commons-dbcp.jar和commons-pool.jar两个包。将个包填入WEB-INF/lib目录下。(在Project Explorer中直接托过去)
二、
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.jdbc.datasource.DataSourceTransationManager] for bean with name 'transactionManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception isjava.lang.ClassNotFoundException: org.springframework.jdbc.datasource.DataSourceTransationManager
解决:
原类名是
org.springframework.jdbc.datasource.DataSourceTransactionManager
拼写时少写了个c。
附:transaction事务处理、更新数据;transation事务处理、交易
三、
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClient' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: ServletContext resource [/WEB-INF/sql-map-config.xml]; nested exception iscom.ibatis.common.xml.NodeletException: Error parsing XML. Cause:org.xml.sax.SAXParseException: Document root element "sqlmapconfig", must match DOCTYPE root "sqlMapConfig".
解决:
原来是<!DOCTYPE sqlMapConfig 中的sqlMapConfig的写法与下面的两个标签<sqlmapconfig>和<sqlmap>不一致。将它们改成一致的就可以了,如下:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMapConfig
PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<sqlMap resource="com/XXXXX/persistence/map/xml/Student.xml"/>
</sqlMapConfig>
你可以参考一下
追问
你要看下我的饿配置文件吗?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询