-->
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.  [ 8 posts ] 
Author Message
 Post subject: Need help with <version /> tag
PostPosted: Tue Jul 20, 2004 2:49 pm 
Newbie

Joined: Sun Nov 09, 2003 12:34 pm
Posts: 15
I have version coded as

Code:
<version name="prodVersion" column="LOCK_VERSION" />


in my mapping file?

Do I need something more??

I get a mapping exception when I include this version tag.

The error is:

org.xml.sax.SAXParseException: 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*))".


Any ideas?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 20, 2004 2:54 pm 
Beginner
Beginner

Joined: Tue Jun 29, 2004 3:44 pm
Posts: 43
That looks like a good tag to me. Maybe you have it in the wrong place? Judging from the error, you've either left something out of your class mapping, or added something that shouldn't be there.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 20, 2004 3:01 pm 
Newbie

Joined: Sun Nov 09, 2003 12:34 pm
Posts: 15
class tag problem: If I remove that then the the mapping is loaded fine, so I guess the class tag is fine.

Position: I am not sure, I will try and read some more.

Does anyone have any ideas how to read this error

org.xml.sax.SAXParseException: 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*))".

I mean what does these characters mean: '*', and '?'. like we have '?' after discrimination, version|timestamp and cache|jcs-cache

thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 20, 2004 3:05 pm 
Beginner
Beginner

Joined: Tue Jun 29, 2004 3:44 pm
Posts: 43
If you post the whole mapping file, I'll see if I can find a problem. The mess in that error comes from the xml DTD file ( at http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd ) that declares what the proper tags and elements are.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 20, 2004 3:28 pm 
Newbie

Joined: Sun Nov 09, 2003 12:34 pm
Posts: 15
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">

<!--
Copyright 2003, 2004 abc, Inc. All rights reserved.
$Id: ItemNodeImpl.hbm.xml,v 1.75 2004/06/01 14:59:33 partans Exp $
-->
<hibernate-mapping>

<class name="com.abc.mdm.domain.item.bo.impl.ItemNodeImpl" table="ITEM" discriminator-value="1" >

<!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -->
<!-- ID -->
<!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -->
<id name="id" type="long" column="ITEM_ID">
<generator class="sequence">
<param name="sequence">ITEM_SEQ</param>
</generator>
</id>

<!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -->
<!-- DISCRIMINATOR AND CONFIGURATION TYPE -->
<!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -->
<discriminator column="ITEM_CONFIG_TYP_ID" type="long" />
<many-to-one name="configuration" class="com.abc.mdm.domain.item.bo.impl.ItemConfigurationImpl"
column="ITEM_CONFIG_TYP_ID" insert="false" update="false" access="field" not-null="true"/>

<!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -->
<!-- EFFECTIVITY AND AUDIT -->
<!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -->
<property name="startDate" column="EFFECTIVE_DATETIME" type="timestamp" />
<property name="endDate" column="END_DATETIME" type="timestamp" />
<property name="createDate" column="CREATED_DATETIME" type="timestamp" not-null="true" />
<property name="createUserId" column="CREATED_BY_USER_ID" type="long" not-null="true" />

<!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -->
<!-- LEVEL AND IDENTIFIER -->
<!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -->
<many-to-one name="level" class="com.abc.mdm.domain.hierarchy.bo.impl.HierarchyLevelImpl" column="LVL_ID" />

<set name="identifiers" access="field" table="ITEM_IDENT" inverse="true" cascade="all-delete-orphan" lazy="true">
<key column="ITEM_ID" />
<one-to-many class="com.abc.mdm.domain.item.bo.impl.ItemNodeIdentifierImpl" />
</set>

<!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -->
<!-- DESCRIPTION -->
<!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -->

<set name="localizedDescriptions" table="ITEM_DSC" inverse="true" cascade="all-delete-orphan">
<key column="ITEM_ID" />
<one-to-many class="com.abc.mdm.domain.item.bo.impl.ItemNodeLabel" />
</set>

<set name="images" table="ITEM_IMAGE" inverse="true" cascade="all" access="field">
<key column="ITEM_ID" />
<one-to-many class="com.abc.mdm.domain.item.bo.impl.ItemImageImpl" />
</set>

<!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -->
<!-- PARENTS AND CHILDREN -->
<!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -->
<idbag name="allParents" table="ITEM_PARENT_CHILD" cascade="save-update" lazy="true">
<collection-id type="long" column="ITEM_PARENT_CHILD_ID">
<generator class="sequence">
<param name="sequence">ITEM_PARENT_CHILD_SEQ</param>
</generator>
</collection-id>
<key column="CHILD_ITEM_ID" />
<many-to-many class="com.abc.mdm.domain.item.bo.impl.ItemNodeImpl" column="PARENT_ITEM_ID" />
</idbag>

<set name="allChildren" lazy="true" table="ITEM_PARENT_CHILD" inverse="true">
<key column="PARENT_ITEM_ID" />
<many-to-many class="com.abc.mdm.domain.item.bo.impl.ItemNodeImpl" column="CHILD_ITEM_ID" />
</set>

<!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -->
<!-- ATTRIBUTE VALUE CONTAINER STANDARD STUFF -->
<!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -->

<component name="valueTracker" class="com.abc.mdm.domain.attribute.bo.impl.InheritableValueTrackerImpl" access="field">
<parent name="container" />
<map name="referencesByAttribute" table="ITEM_ATTR_REF" access="field">
<key column="REFERENCING_ITEM_ID" />
<index-many-to-many column="ATTR_ID" class="com.abc.mdm.domain.attribute.bo.impl.AttributeImpl" />
<many-to-many column="REFERENCED_ITEM_ID" class="com.abc.mdm.domain.item.bo.impl.ItemNodeImpl" />
</map>
</component>

<set name="dynamicAttributeValueContainers" cascade="all-delete-orphan" table="ITEM_FLEX_ATTR" inverse="true">
<key column="ITEM_ID" />
<one-to-many class="com.abc.mdm.domain.item.bo.impl.ItemNodeFlexibleAttributeValueImpl" />
</set>

<!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -->
<!-- INTERSECTIONS -->
<!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -->

<!-- Mapping as bag because that lets Hibernate add a new intersection without loading all the existing ones -->

<bag access="field" name="itemLocations" inverse="true" lazy="true" cascade="none" table="ITEM_LOC">
<key column="ITEM_ID" />
<one-to-many class="com.abc.mdm.domain.itemlocation.bo.impl.ItemLocationImpl" />
</bag>

<bag access="field" name="itemSuppliers" inverse="true" lazy="true" cascade="none" table="ITEM_SUPP">
<key column="ITEM_ID" />
<one-to-many class="com.abc.mdm.domain.itemsupplier.bo.impl.ItemSupplierImpl" />
</bag>

<bag access="field" name="itemSupplierLocations" inverse="true" lazy="true" cascade="none" table="ITEM_SUPP_LOC">
<key column="ITEM_ID" />
<one-to-many class="com.abc.mdm.domain.itemsupplierlocation.bo.impl.ItemSupplierLocationImpl" />
</bag>

<!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -->
<!-- ATTRIBUTES -->
<!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -->

<property name="inductionVersion" type="long" column="ITEM_INDUCT_VERSION" access="field" />
<many-to-one name="authorizationStatus" class="com.abc.mdm.domain.induction.bo.impl.AuthorizationStatusImpl" column="ITEM_AUTH_STATUS_ID" access="field"/>

<many-to-one name="transactionLevel" class="com.abc.mdm.domain.hierarchy.bo.impl.HierarchyLevelImpl" column="TRANSACTION_LVL" access="field" />
<property name="productLabel" column="PROD_LABEL" type="string" access="field" />
<property name="handlingTemp" type="big_decimal" column="HNDL_TEMP" access="field" />

<many-to-one name="tempUOM" class="com.abc.mdm.domain.attribute.bo.impl.UnitOfMeasureImpl" column="HNDL_TEMP_UOM_ID" access="field" />
<component name="standardUOM" class="com.abc.mdm.domain.attribute.bo.impl.UnitOfMeasureEnumOptionImpl" access="field">
<many-to-one name="unitOfMeasure" class="com.abc.mdm.domain.attribute.bo.impl.UnitOfMeasureImpl" column="STD_UOM_ID" />
</component>
<component name="linearUOM" class="com.abc.mdm.domain.attribute.bo.impl.UnitOfMeasureEnumOptionImpl" access="field">
<many-to-one name="unitOfMeasure" class="com.abc.mdm.domain.attribute.bo.impl.UnitOfMeasureImpl" column="LINEAR_UOM_ID" />
</component>
<component name="weightUOM" class="com.abc.mdm.domain.attribute.bo.impl.UnitOfMeasureEnumOptionImpl" access="field">
<many-to-one name="unitOfMeasure" class="com.abc.mdm.domain.attribute.bo.impl.UnitOfMeasureImpl" column="WEIGHT_UOM_ID" />
</component>
<many-to-one name="tareType" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="TARE_TYP" access="field" />
<many-to-one name="flavor" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="FLAVOR" access="field" />
<many-to-one name="conveyMethod" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="CONVEY_METHOD" access="field" />
<many-to-one name="storeOrderMultiple" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="STORE_ORDER_MULTI" access="field" />
<many-to-one name="wasteType" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="WASTE_TYP" access="field" />
<many-to-one name="season" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="SEASON" access="field" />
<many-to-one name="phase" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="PHASE" access="field" />
<many-to-one name="handlingSensitivity" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="HNDL_SENSITIVITY" access="field" />
<many-to-one name="costPriceZone" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="COST_PRICE_ZONE" access="field" />
<many-to-one name="retailPriceZone" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="RTL_PRICE_ZONE" access="field" />
<many-to-one name="size1" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="SIZE_1" access="field" />
<many-to-one name="size2" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="SIZE_2" access="field" />
<many-to-one name="artist" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="ARTIST" access="field" />
<many-to-one name="author" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="AUTHOR" access="field" />
<many-to-one name="brand" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="BRAND" access="field" />
<!--
<many-to-one name="color" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="COLOR" access="field" />
-->
<many-to-one name="scent" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="SCENT" access="field" />
<many-to-one name="rating" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="RATING" access="field" />
<many-to-one name="pattern" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="PATTERN" access="field" />
<many-to-one name="packageType" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="PKG_TYP" access="field" />
<many-to-one name="material" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="MATERIAL" access="field" />
<many-to-one name="license" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="LICENSE" access="field" />
<many-to-one name="silhouette" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="SILHOUETTE" access="field" />
<many-to-one name="itemServiceLevel" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="ITEM_SERVICE_LVL" access="field" />
<many-to-one name="hangerType" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="HANGER_TYP" access="field" />
<many-to-one name="finish" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="FINISH" access="field" />
<many-to-one name="fabric" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="FABRIC" access="field" />
<many-to-one name="construction" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="CONSTRUCTION" access="field" />
<many-to-one name="collection" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="COLLECTION" access="field" />
<many-to-one name="merchantOption" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="MERCHANT" access="field" />
<many-to-one name="buyer" class="com.abc.mdm.domain.attribute.bo.impl.StringEnumOptionImpl" column="BUYER" access="field" />

<property name="handlingTempMaxInternal" type="big_decimal" column="HNDL_TEMP_MAX" access="field" />
<property name="handlingTempMinInternal" type="big_decimal" column="HNDL_TEMP_MIN" access="field" />
<property name="uomConversionFactor" column="UOM_CONV_FACTOR" type="big_decimal" access="field" />
<property name="statCube" column="STATS_CUBE" type="big_decimal" access="field" />
<property name="tier" column="TI" type="big_decimal" access="field" />
<property name="merchandise" column="MERCH_IND" type="boolean" access="field" />
<property name="orderable" column="ORDER_IND" type="boolean" access="field" />
<property name="backOrderable" column="BACKORDER_IND" type="boolean" access="field" />
<property name="origRetailPrice" column="ORIG_RTL_PRICE" type="big_decimal" access="field" />
<property name="sellable" column="SELL_IND" type="boolean" access="field" />
<property name="catchWeight" column="CATCH_WGT_IND" type="boolean" access="field" />
<property name="specialOrder" column="SPECIAL_ORDER_IND" type="boolean" access="field" />
<property name="shipAlone" column="SHIP_ALONE_IND" type="boolean" access="field" />
<property name="aggregate" column="AGGR_IND" type="boolean" access="field" />
<property name="forecast" column="FORECAST_IND" type="boolean" access="field" />
<property name="giftWrap" column="GIFT_WRAP_IND" type="boolean" access="field" />
<property name="employeeDiscount" column="EMP_DSCNT_IND" type="boolean" access="field" />
<property name="employeeDiscountPercent" column="EMP_DSCNT_PCT" type="big_decimal" access="field" />
<property name="wastePercent" column="WASTE_PCT" type="big_decimal" access="field" />
<property name="hi" column="HI" type="big_decimal" access="field" />
<property name="streetDate" column="STREET_DATE" type="date" access="field" />
<property name="status" column="STATUS" type="string" access="field" />
<property name="comments" column="COMMENTS" type="string" access="field" />
<property name="caseQuantity" column="CASE_QTY" type="big_decimal" access="field" />
<property name="innerQuantity" column="INNER_QTY" type="big_decimal" access="field" />
<property name="primaryRefItem" column="PRIMARY_REF_ITEM_IND" type="boolean" access="field" />
<property name="transformed" column="TRANSFORMED_ITEM_IND" type="boolean" access="field" />
<property name="approvedRMS9" column="APPROVED_IND" type="boolean" access="field" />
<property name="worksheetRMS10" column="WORKSHEET_IND" type="boolean" access="field" />

<property name="mfrPrice" type="com.abc.platform.util.type.uom.MoneyUserType" access="field">
<column name="MFR_RECOMMEND_RTL_PRICE" />
<column name="MFR_RECOMMEND_RTL_CURRENCY" />
</property>

<property name="marketAmount" type="com.abc.platform.util.type.uom.MoneyUserType" access="field">
<column name="MKT_AMOUNT" />
<column name="MKT_AMOUNT_CURRENCY" />
</property>

<component name="diameter" class="com.abc.mdm.domain.attribute.bo.impl.MeasurementImpl" access="field">
<property name="number" type="big_decimal" column="DIAMETER" />
<many-to-one name="unitOfMeasure" class="com.abc.mdm.domain.attribute.bo.impl.UnitOfMeasureImpl" column="DIAMETER_UOM_ID" />
</component>

<component name="height" class="com.abc.mdm.domain.attribute.bo.impl.MeasurementImpl" access="field">
<property name="number" type="big_decimal" column="HEIGHT" />
<many-to-one name="unitOfMeasure" class="com.abc.mdm.domain.attribute.bo.impl.UnitOfMeasureImpl" column="HEIGHT_UOM_ID" />
</component>

<component name="width" class="com.abc.mdm.domain.attribute.bo.impl.MeasurementImpl" access="field">
<property name="number" type="big_decimal" column="WIDTH" />
<many-to-one name="unitOfMeasure" class="com.abc.mdm.domain.attribute.bo.impl.UnitOfMeasureImpl" column="WIDTH_UOM_ID" />
</component>

<component name="length" class="com.abc.mdm.domain.attribute.bo.impl.MeasurementImpl" access="field">
<property name="number" type="big_decimal" column="LENGTH" />
<many-to-one name="unitOfMeasure" class="com.abc.mdm.domain.attribute.bo.impl.UnitOfMeasureImpl" column="LENGTH_UOM_ID" />
</component>

<component name="liquidVolume" class="com.abc.mdm.domain.attribute.bo.impl.MeasurementImpl" access="field">
<property name="number" type="big_decimal" column="LIQUID_VOLUME" />
<many-to-one name="unitOfMeasure" class="com.abc.mdm.domain.attribute.bo.impl.UnitOfMeasureImpl" column="LIQUID_VOLUME_UOM_ID" />
</component>

<component name="grossWeight" class="com.abc.mdm.domain.attribute.bo.impl.MeasurementImpl" access="field">
<property name="number" type="big_decimal" column="GROSS_WEIGHT" />
<many-to-one name="unitOfMeasure" class="com.abc.mdm.domain.attribute.bo.impl.UnitOfMeasureImpl" column="GROSS_WEIGHT_UOM_ID" />
</component>

<component name="netWeight" class="com.abc.mdm.domain.attribute.bo.impl.MeasurementImpl" access="field">
<property name="number" type="big_decimal" column="NET_WEIGHT" />
<many-to-one name="unitOfMeasure" class="com.abc.mdm.domain.attribute.bo.impl.UnitOfMeasureImpl" column="NET_WEIGHT_UOM_ID" />
</component>

<component name="tareWeight" class="com.abc.mdm.domain.attribute.bo.impl.MeasurementImpl" access="field">
<property name="number" type="big_decimal" column="TARE_WEIGHT" />
<many-to-one name="unitOfMeasure" class="com.abc.mdm.domain.attribute.bo.impl.UnitOfMeasureImpl" column="TARE_WEIGHT_UOM_ID" />
</component>

<component name="exchangePeriod" class="com.abc.mdm.domain.attribute.bo.impl.MeasurementImpl" access="field">
<property name="number" type="big_decimal" column="EXCHG_PERIOD" />
<many-to-one name="unitOfMeasure" class="com.abc.mdm.domain.attribute.bo.impl.UnitOfMeasureImpl" column="EXCHG_PERIOD_UOM_ID" />
</component>

<component name="volume" class="com.abc.mdm.domain.attribute.bo.impl.MeasurementImpl" access="field">
<property name="number" type="big_decimal" column="VOLUME" />
<many-to-one name="unitOfMeasure" class="com.abc.mdm.domain.attribute.bo.impl.UnitOfMeasureImpl" column="VOLUME_UOM_ID" />
</component>

<component name="packageSize" class="com.abc.mdm.domain.attribute.bo.impl.MeasurementImpl" access="field">
<property name="number" type="big_decimal" column="PKG_SIZE" />
<many-to-one name="unitOfMeasure" class="com.abc.mdm.domain.attribute.bo.impl.UnitOfMeasureImpl" column="PKG_SIZE_UOM_ID" />
</component>

<component name="warrantyPartPeriod" class="com.abc.mdm.domain.attribute.bo.impl.MeasurementImpl" access="field">
<property name="number" type="big_decimal" column="WRTY_PART_PERIOD" />
<many-to-one name="unitOfMeasure" class="com.abc.mdm.domain.attribute.bo.impl.UnitOfMeasureImpl" column="WRTY_PART_PERIOD_UOM_ID" />
</component>

<component name="warrantyLaborPeriod" class="com.abc.mdm.domain.attribute.bo.impl.MeasurementImpl" access="field">
<property name="number" type="big_decimal" column="WRTY_LABOR_PERIOD" />
<many-to-one name="unitOfMeasure" class="com.abc.mdm.domain.attribute.bo.impl.UnitOfMeasureImpl" column="WRTY_LABOR_PERIOD_UOM_ID" />
</component>


<!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -->
<!-- SUBCLASS - PACK -->
<!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -->
<subclass name="com.abc.mdm.domain.item.bo.impl.PackImpl" discriminator-value="2">
<many-to-one name="packageConfiguration"
class="com.abc.mdm.domain.item.bo.impl.PackageConfigurationImpl"
column="PKG_SHIP_CONFIG_TYP_ID" cascade="none" not-null="true" />

<set name="componentItems" table="ITEM_CONFIGURED" inverse="true" cascade="all-delete-orphan" access="field">
<key column="CONFIGURED_ITEM_ID" />
<one-to-many class="com.abc.mdm.domain.item.bo.impl.ConfiguredItemComponentImpl" />
</set>

</subclass>

<!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -->
<!-- VERSION -->
<!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -->
<version name="version" column="LOCK_VERSION" unsaved-value="undefined"/>

</class>
</hibernate-mapping>


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 20, 2004 3:42 pm 
Beginner
Beginner

Joined: Tue Jun 29, 2004 3:44 pm
Posts: 43
I screwed around with your (HUGE!) mapping file for a minute in Eclipse. When I moved the <version> tag up to just under the discriminator:

Code:
      <!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -->
      <!-- DISCRIMINATOR AND CONFIGURATION TYPE -->
      <!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -->
      <discriminator column="ITEM_CONFIG_TYP_ID" type="long" />

      <!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -->
      <!-- VERSION -->
      <!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -->
      <version name="version" column="LOCK_VERSION" unsaved-value="undefined"/>

      <many-to-one name="configuration" ...


The xml errors that Eclipse shows went away. Maybe you can try that. I couldn't tell you why it might make a difference, though.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 20, 2004 4:02 pm 
Newbie

Joined: Sun Nov 09, 2003 12:34 pm
Posts: 15
Hi,
Thanks a bunch, not sure what the problem is though. I moved that line and now that error went away.

Something really strange. And also, it works only if it is moved just after <descriminator tag, if moved somewhere else, it again gives the problem.

Thanks anyway.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 20, 2004 8:56 pm 
Newbie

Joined: Tue Jul 20, 2004 8:52 pm
Posts: 6
The dtd defines the ordering of the elements. If you space that error out a bit you will be able to see what order they need to be in a bit easier. Thats why the version tag has to be after the discriminator tag.

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*))".


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.