here is my mapping file generated by Sychronizer:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping package="support.operations.sci">
<class name="Usecase" table="USECASE">
<meta attribute="sync-DAO">false</meta>
<meta attribute="sync-DAO">false</meta>
<meta attribute="sync-DAO">false</meta>
<property name="Name" column="NAME" type="string" not-null="true" length="10"/>
<property name="Description" column="DESCRIPTION" type="string" not-null="false" length="128"/>
</class>
</hibernate-mapping>
I am using Hibernate 3.1.3, here is the error I got when I tried to run:
Sep 13, 2006 11:27:48 AM org.hibernate.cfg.Environment
INFO: Hibernate 3.1.3
Sep 13, 2006 11:27:48 AM org.hibernate.cfg.Environment
INFO: hibernate.properties not found
Sep 13, 2006 11:27:48 AM org.hibernate.cfg.Environment
INFO: using CGLIB reflection optimizer
Sep 13, 2006 11:27:48 AM org.hibernate.cfg.Environment
INFO: using JDK 1.4 java.sql.Timestamp handling
Sep 13, 2006 11:27:48 AM org.hibernate.cfg.Configuration
INFO: Reading mappings from resource: Usecase.hbm.xml
Sep 13, 2006 11:27:49 AM org.hibernate.util.XMLHelper
SEVERE: Error parsing XML: XML InputStream(13) The content of element type "class" must match "(meta*,subselect?,cache?,synchronize*,comment?,tuplizer*,(id|composite-id),discriminator?,natural-id?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array)*,((join*,subclass*)|joined-subclass*|union-subclass*),loader?,sql-insert?,sql-update?,sql-delete?,filter*,resultset*,(query|sql-query)*)".
Could not read mappings from resource: Usecase.hbm.xml
Exception in thread "main" java.lang.NullPointerException
at support.operations.sic.test.HibernateTest.main(HibernateTest.java:51)
HELP!!! I got only meta and properties in the Class Element, why is the parser complaining about????
|