Hi
I'm trying to deploy hibernate as a .sar in jboss and I keep getting the following error:
11:27:44,770 INFO [Environment] Hibernate 2.1 rc1
11:27:44,780 INFO [Environment] hibernate.properties not found
11:27:44,786 INFO [Environment] using CGLIB reflection optimizer
11:27:44,795 INFO [Configuration] Mapping resource: com/generator/dom/hibernate/Assignment.hbm.xml
11:27:45,136 ERROR [XMLHelper] Error parsing XML: XML InputStream(33) The content of element type "class" must match "(meta*,(cache|jcs-cache)?,(id|composite-id),discriminator?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|any|map|set|list|bag|idbag|array|primitive-array)*,(subclass*|joined-subclass*))".
11:27:45,296 INFO [Binder] Mapping class: com.generator.dom.hibernate.Assignment -> assignments
11:27:45,540 INFO [HibernateServiceMBean] Could not build SessionFactory using the MBean classpath - will try again using client classpath: Error reading resource: com/generator/dom/hibernate/Assignment.hbm.xml
11:27:45,581 INFO [SessionFactoryObjectFactory] Factory name: java:/comp/env/Hibernate/SessionFactory
11:27:45,587 INFO [NamingHelper] JNDI InitialContext properties:{}
11:27:45,595 INFO [NamingHelper] Creating subcontext: env
11:27:45,596 INFO [NamingHelper] Creating subcontext: Hibernate
11:27:45,598 INFO [SessionFactoryObjectFactory] Bound factory to JNDI name: java:/comp/env/Hibernate/SessionFactory
11:27:45,599 WARN [SessionFactoryObjectFactory] InitialContext did not implement EventContext
11:27:45,614 INFO [MainDeployer] Deployed package: file:/usr/local/jboss-3.2.1/server/default/deploy/hibernate.sar
I have stared at my mapping file trying to identify what is causing this problem but I can't find it. Hope fully a fresh pair of eyes may spot the problem.
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class name="com.generator.dom.hibernate.Assignment" table="assignments" discriminator-value="assm" proxy="com.generator.dom.hibernate.Assignment">
<id name="id" column="assignmentid" type="long">
<generator class="native"/>
</id>
<property name="description" type="java.lang.String" not-null="true"/>
<property name="solution" type="java.lang.String"/>
<property name="dateRaised" type="java.util.Date" not-null="true" update="false"/>
<property name="dateLastModified" type="java.util.Date"/>
<property name="raisedBy" type="com.generator.dom.hibernate.User" not-null="true" update="false"/>
<property name="updatedBy" type="com.generator.dom.hibernate.User"/>
<property name="status" type="com.generator.dom.hibernate.Status" not-null="true"/>
<many-to-one name="issue" column="issueid" class="com.generator.dom.hibernate.Issue" not-null="true"/>
<many-to-one name="assignee" class="com.generator.dom.hibernate.User" not-null="true"/>
<version name="version" type="integer"/>
</class>
</hibernate-mapping>
cheers
andy
|