Hi Everyone,
I'm using MyEclipse IDE on Windows X/P against an Oracle database.
Also, I'm trying to use Hibernate 3.1.
I have a problem with an error that is appearing in my
hibernate.cfg.xml file. So it's not even running or getting
anything going yet.
Somehow the file flags the <hibernate-configuration> line with
an error that reads:
"The content of element type "hibernate configuration" must match
"session-factory, security?)". "
Can someone please help? Below is the hibernate.cfg.xml.
Just in case, I'm also including the Location.hbm.xml file.
By the way, does anyone know when using MyEclipse why
the Hibernate 3.1 Core Libraries sometimes appear in the
package explorer and when making new projects sometimes
there're not there? How can one make them part of the project
and appear in the Project on the Package Explorer?
Thanks,
Rudi
Hibernate version: 3.1
Mapping documents:
The hibernate.cfg.xml:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="connection.username">admin</property>
<property name="connection.url">jdbc:oracle:thin:@test:1521:testdb</property>
<property name="dialect">org.hibernate.dialect.OracleDialect</property>
<property name="myeclipse.connection.profile">Oracle</property>
<property name="connection.password">test2</property>
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
</session-factory>
<mapping resource="Location.hbm.xml" />
</hibernate-configuration>
The Location.hbm.xml:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sf.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class name="com.myproject.Location" table="admin.Location">
<id name="location_id" column="location_id">
<generator class="native"/>
</id>
<property name="location" column="location"/>
</class>
</hibernate-mapping>
|