-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: hibernate 2.1 rc1 & jboss-3.2.1 sar deployment
PostPosted: Wed Dec 10, 2003 9:43 pm 
Newbie

Joined: Wed Dec 10, 2003 8:40 pm
Posts: 14
Location: Sydney
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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 10, 2003 10:05 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
There is an expectaion that some sections of the XML are ordered, eg,
Version needs to be before the properties.

If your using Ant for you development then I would suggest you setup the xml verify task to check your mappings before you deploy them.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 10, 2003 11:42 pm 
Newbie

Joined: Wed Dec 10, 2003 8:40 pm
Posts: 14
Location: Sydney
Hi David

Thankyou for the reply, moving the version tag higher above the first property tag worked

cheers
andy


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.