-->
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.  [ 1 post ] 
Author Message
 Post subject: component class not found for composite-id class
PostPosted: Thu Oct 19, 2006 4:43 pm 
Newbie

Joined: Thu Oct 19, 2006 4:24 pm
Posts: 1
I am working with a legacy database that uses composite keys. I created a composite identifier class, LotePrimaryKey, to use as the id for my Lote class. In LotePrimaryKey, I implement Serializable and override Equals and hashCode. My Lote.hbm.xml class (compiled as an embedded resource) is:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
<class name="siga.contabilidad.maestro.Lote" table="TBLOTE" schema="CONTABILIDAD">

<composite-id name="id" class="siga.contabilidad.maestro.LotePrimaryKey">
<key-property name="periodoContable" type="java.lang.String" column="CO_PERIODO" />

<key-property name="origenContable" type="java.lang.String" column="TI_ORIGEN" />

<key-property name="numeroLote" type="java.lang.Integer" column="CO_LOTE" />

</composite-id>

<property name="feLote" type="java.util.Date" update="true" insert="true">
<column name="FE_LOTE" not-null="false" sql-type="date" />
</property>

<property name="feCreacion" type="java.sql.Timestamp" update="true" insert="true">
<column name="FE_CREACION" not-null="false" sql-type="Timestamp"/>
</property>

<property name="coUsuCrea" type="java.lang.String" update="true" insert="true">
<column name="CO_USUCREA" not-null="false" sql-type="varchar(10)"/>
</property>

<property name="feModifica" type="java.sql.Timestamp" update="true" insert="true">
<column name="FE_MODIFICA" not-null="false" sql-type="timestamp"/>
</property>

<property name="coUsuModif" type="java.lang.String" update="true" insert="true">
<column name="CO_USUMODIF" not-null="false" sql-type="varchar(10)"/>
</property>

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

</class>

</hibernate-mapping>

I get the following exception when generate db schema


D:\software\certicom\contabilidad\extension\build.xml:26: Schema text failed: component class not found: siga.contabilidad.maestro.LotePrimaryKey

Where am I going wrong?


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

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.