加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MsSql教程 > 正文

Open quote is expected for attribute "{1}" a

发布时间:2020-12-12 14:49:02 所属栏目:MsSql教程 来源:网络整理
导读:严重: 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 [
严重: 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.pluginsorg.eclipse.wst.server.coretmp5wtpwebappsclm-webappWEB-INFclassesspringcontroller-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.pluginsorg.eclipse.wst.server.coretmp5wtpwebappsclm-webappWEB-INFclassesspringcontroller-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>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读