Using Hibernate version:3.0
Problem with Artifact Generation & Mapping documents:
I am a hibernate new user, so help me please!!!
I am using the Hibernate 3.0.1, Eclipse 3.1.M6 width jboss Eclipse IDE 1.5.M1-hibernate-tools and Oracle 9i on Windows XP PRO. My goal is to create Hibernate Artifacts from my Oracle 9i database, using "Reverse Engineer from JDBC Connection" and "Generate domain code." Here is my Hibernate.properties file: ... property name="hibernate.connection.username">user property name="hibernate.connection.password">*** property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect property name="hibernate.connection.url">jdbc:oracle:thin:@IP:1521:company property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver ... I make the console width de hibernate.cfg.xml and i have included the jar of oracle jdbc (ojdbc14.jar and nls...) When i try to generate the mapping classes i get the following error: "Error under artifact generation Reason: org.hibernate.Mappingexception:Could not configure datastore from file : C:\programfiles\documentsand settings\………..\container.hbm.xml My Container.hbm.xml looks like this <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" > <hibernate-mapping> <class name="com.cms.domain.Container" table="TBL_CONTAINER"> <id name="id" type="long" column="CONTAINER_NO"> <meta attribute="finder-method">findById</meta> <generator class="sequence"> <param name="sequence">SQ_CONTAINER_NO</param> </generator> </id> <many-to-one name="category" class="com.vai.cms.domain.Category"> <meta attribute="finder-method">findByCategory</meta> <column name="FK_CATEGORY_NO" not-null="true"/> </many-to-one> "C:/Documents and Settings/user /Sandbox/src/com/cms/xml/hibernate/maps/Category.hbm.xml" <property name="referenceId" type="string" column="REFERENCE_ID" length="127"> <meta attribute="finder-method">findByReferenceId</meta> </property> <property name="name" type="string" column="NAME" length="127"/> <set name="contained" inverse="true" lazy="true" cascade="save-update"> <key column="FK_CONTAINER_CONTAINER_NO"/> <one-to-many class="com.cms.domain.Container"/> </set> </class> </hibernate-mapping> Please help. [/b]
|