Open quote is expected for attribute "{1}" associated with an element type "name".

严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 37 in XML document from URL [jar:file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp5/wtpwebapps/clm-webapp/WEB-INF/lib/clm-domain-1.0-SNAPSHOT.jar!/spring/base-orm.xml] is invalid; nested exception is org.xml.sax.SAXParseException: Open quote is expected for attribute "{1}" associated with an  element type  "name".



xml解析 属性必须用引号

class属性必须用引号。。

添上  <bean id="flMusicUserDBJdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource"ref="flMusicUserDBDataSource" />
</bean>


有了之前的思路,这个轻而易举的就resolve

严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 54 in XML document from URL [jar:file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp5/wtpwebapps/clm-webapp/WEB-INF/lib/clm-domain-1.0-SNAPSHOT.jar!/spring/base-orm.xml] is invalid; nested exception is org.xml.sax.SAXParseException: The end-tag for element type "bean" must end with a '>' delimiter.


需要一个结束的</bean>标签           delimiter(定界符)




2011-12-15 16:26:08|ERROR|main|org.springframework.web.context.ContextLoader  215|Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/UserInfoController.do' defined in file [E:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp5\wtpwebapps\clm-webapp\WEB-INF\classes\spring\controller-inteface.xml]: Cannot resolve reference to bean 'userInfoService' while setting bean property 'userInfoService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userInfoService' defined in URL [jar:file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp5/wtpwebapps/clm-webapp/WEB-INF/lib/clm-service.jar!/spring/clm-service.xml]: Cannot resolve reference to bean 'clmJdbcDao' while setting bean property 'clmJdbcDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clmJdbcDao' defined in URL [jar:file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp5/wtpwebapps/clm-webapp/WEB-INF/lib/clm-domain.jar!/spring/base-dao-jdbc.xml]: Cannot resolve reference to bean 'flMusicUserDBJdbcTemplate' while setting bean property 'flMusicUserDBJdbcTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flMusicUserDBJdbcTemplate' defined in URL [jar:file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp5/wtpwebapps/clm-webapp/WEB-INF/lib/clm-domain.jar!/spring/base-orm.xml]: Cannot resolve reference to bean 'flMusicUserDBDataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.commons.dbcp.BasicDataSource] for bean with name 'flMusicUserDBDataSource' defined in URL [jar:file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp5/wtpwebapps/clm-webapp/WEB-INF/lib/clm-domain.jar!/spring/base-orm.xml]; nested exception is java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource


 org.apache.commons.dbcp.BasicDataSource
这个没有引入这个包 
用proxool的DATASOURCE也可以 如果你要用DBCP的.那么你就要在clm_intf的要目录中的pom.xml中导入这个DBCP包.在网上查一下maven dbcp就能找到.

<bean id="flMusicUserDBDataSource" class="org.apache.commons.dbcp.BasicDataSource"   org.logicalcobwebs.proxool.ProxoolDataSource
destroy-method="close">
<property name="driverClassName">
<value>com.microsoft.sqlserver.jdbc.SQLServerDriver</value>
</property>
<property name="url">
<value>jdbc:sqlserver://192.168.0.108:1433;databasename=flMusicUserDB</value>
</property>
<property name="username">
<value>sa</value>
</property>
<property name="password">
<value>mmiku</value>
</property>
</bean>


2011-12-15 16:54:19|ERROR|main|org.springframework.web.context.ContextLoader  215|Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/UserInfoController.do' defined in file [E:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp5\wtpwebapps\clm-webapp\WEB-INF\classes\spring\controller-inteface.xml]: Cannot resolve reference to bean 'userInfoService' while setting bean property 'userInfoService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userInfoService' defined in URL [jar:file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp5/wtpwebapps/clm-webapp/WEB-INF/lib/clm-service.jar!/spring/clm-service.xml]: Cannot resolve reference to bean 'clmJdbcDao' while setting bean property 'clmJdbcDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clmJdbcDao' defined in URL [jar:file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp5/wtpwebapps/clm-webapp/WEB-INF/lib/clm-domain.jar!/spring/base-dao-jdbc.xml]: Cannot resolve reference to bean 'flMusicUserDBJdbcTemplate' while setting bean property 'flMusicUserDBJdbcTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flMusicUserDBJdbcTemplate' defined in URL [jar:file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp5/wtpwebapps/clm-webapp/WEB-INF/lib/clm-domain.jar!/spring/base-orm.xml]: Cannot resolve reference to bean 'flMusicUserDBDataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flMusicUserDBDataSource' defined in URL [jar:file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp5/wtpwebapps/clm-webapp/WEB-INF/lib/clm-domain.jar!/spring/base-orm.xml]: Initialization of bean failed; nested exception is org.springframework.beans.InvalidPropertyException: Invalid property 'driverClassName' of bean class [org.logicalcobwebs.proxool.ProxoolDataSource]: No property 'driverClassName' found

在改了DataSource后,它的属性也不跟之前的相同了,得将相应的属性也改过来.

<bean id="flMusicUserDBDataSource" class="org.logicalcobwebs.proxool.ProxoolDataSource">
<property name="driver" value="com.microsoft.sqlserver.jdbc.SQLServerDriver">
</property>
<property name="driverUrl"
value="jdbc:sqlserver://192.168.0.108:1433;databasename=flMusicUserDB">
</property>
<property name="user" value="sa">
</property>
<property name="password" value="mmiku">
</property>
</bean>

转载于:https://www.cnblogs.com/anee/archive/2011/12/15/2675898.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值