このエラーは、xmlファイルの解析が正しくないことが原因です。それを検証するためにEclipseを使用し はエラーを与える:
cvc-complex-type.2.3: Element 'beans' cannot have character [children], because the type's content type is element-only.
1またはそれらの<bean>
宣言の多くの間でいくつかの奇妙な文字があるように見えます。このテキストを他の場所からコピーしましたか?
すべてのスペースと改行文字を<bean>
定義の間に削除し、エディタに戻します。 XA0:
UPDATE コピーメモ帳++あなたが提供codepaste内のテキスト、およびUTF-8に文字セットを設定への&貼り付けるには、空白行でこれらの文字を示しました。これは
の標準Unicode変換です。これはこの問題の原因になりそうです。
これは私のために[OK]を検証します。
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost:3306/HibernateDB" />
<property name="username" value="HibernateDB" />
<property name="password" value="java" />
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="configurationClass" value="org.hibernate.cfg.AnnotationConfiguration" />
<property name="annotatedClasses">
<list>
<value>hdao.HibernateObject</value>
</list>
</property>
</bean><bean id="springHibernateOperator" class="hdao.SpringHibernateOperatorImplementation">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
</beans>
はあなたになっているXMLとエラーを投稿し、いくつかのタグの間にその隠された文字を見ることができます'
を行いますご質問ください –