-->
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.  [ 2 posts ] 
Author Message
 Post subject: schematool problem with dynamic-insert
PostPosted: Tue Oct 07, 2003 5:24 pm 
Regular
Regular

Joined: Mon Oct 06, 2003 7:17 am
Posts: 58
Location: Switzerland
Hi,

when I run the schema tool the following exception occurs:

[java] 0 [main] INFO cfg.Environment - Hibernate 2.0 beta 5
[java] 30 [main] INFO cfg.Environment - hibernate.properties not found
[java] 50 [main] INFO cfg.Environment - using CGLIB reflection optimizer
[java] 50 [main] INFO cfg.Environment - JVM proxy support: true
[java] 50 [main] INFO cfg.Configuration - Mapping file: D:\ZZ_RBREITENMOSER\eduswiss\diplomarbeit\projektGastro\generated\com\ebr\middletier\model\Address.hbm.xml
[java] 1102 [main] ERROR util.XMLHelper - Error parsing XML: D:\ZZ_RBREITENMOSER\eduswiss\diplomarbeit\projektGastro\generated\com\ebr\middletier\model\Address.hbm.xml(12)
[java] org.xml.sax.SAXParseException: Attribute "dynamic-insert" must be declared for element type "class".
[java] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
[java] at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
[java] at
....
....

My Address.hbm.xml file looks like:

<?xml version="1.0"?>

<!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.ebr.middletier.model.Address"
table="ADDRESS"
dynamic-update="false"
dynamic-insert="false">

<id
name="id"
column="ADDRESS_ID"
type="java.lang.Long"
>
<generator class="native">
</generator>
</id>

<property
name="city"
type="java.lang.String"
update="true"
insert="true"
column="CITY"
/>

<property
name="country"
type="java.lang.String"
update="true"
insert="true"
column="COUNTRY"
/>

<property
name="street"
type="java.lang.String"
update="true"
insert="true"
column="STREET"
/>

<property
name="streetNumber"
type="java.lang.String"
update="true"
insert="true"
column="STREET_NUMBER"
/>

<property
name="zipCode"
type="java.lang.String"
update="true"
insert="true"
column="ZIP_CODE"
/>

<!--
To add non XDoclet property mappings, create a file named
hibernate-properties-Address.xml
containing the additional properties and place it in your merge dir.
-->

</class>

</hibernate-mapping>


The dynamic-insert attribute is set and so I dont know what the problem is.

thanks
Reto


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 09, 2003 11:49 am 
Regular
Regular

Joined: Mon Oct 06, 2003 7:17 am
Posts: 58
Location: Switzerland
It was a classpath problem in the build.xml (ant)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.