Spring 根元素前面文档中的标记必须在applicationContext中格式良好
我不熟悉Spring和hibernate。在尝试执行一个简单的示例时,我遇到了以下错误。请帮助 下面是我的applicationContext.xmlSpring 根元素前面文档中的标记必须在applicationContext中格式良好,spring,hibernate,Spring,Hibernate,我不熟悉Spring和hibernate。在尝试执行一个简单的示例时,我遇到了以下错误。请帮助 下面是我的applicationContext.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
<property name="url" value=""/>
<property name="username" value="uname"/>
<property name="password" value="pwd"/>
</bean>
<bean id="mySessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"></property>
<property name="mappingResources">
<list>
<value>Employee.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.OracleDialect</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
</bean>
<bean id="empl" class="com.pgn.sprnghiber.domain.Employee">
<property name="sessionFactory" ref="mySessionFactory"></property>
</bean>
</beans>
Employee.hbm.xml
org.hibernate.dialen.oraclealent
符合事实的
错误是文档第5行的错误:根元素前面的文档中的标记必须格式正确。这是IDE给您的错误吗?我没有得到这样的错误。嗨,我在使用EclipseIDE,在控制台中我得到了这个错误