Problema com composite-element(hibernate) em relação tern

Oli,

Alguém poderia me dar uma força com o seguinte problema:

Tenho três tbls nod bd uma chamada elemento, outra atributos
e uma chamada opcoes_conteudos. Daí existe uma relação ternária entre elas
que gera a tbl OPS_SUBATR_ATR.

Tenho as seguintes classes:

[code]public class AtributoProduto{
private Long id;
private String descricao;
private Set opcao = new HashSet();
private Set elementoNcm = new HashSet();

public class Opcao {
private Long id;
private String descricao;
private String nmOpcao;
private Set atributos = new HashSet();

public class ElementoNcm {
private TipoElementoNcm tipoElementoNcm;
private String descricao;
private Long id;

[/code]

e

[code]public class OpsSubAtrAtr {
private AtributoProduto atributo;
private ElementoNcm elementoNcm;
private Opcao opcao;

... 

[/code]

e estou fazendo o seguinte mapeamento

[code]<?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="AtributoProduto" table="ATRIBUTOS">

     &lt;id name=&quot;id&quot; column=&quot;ATBS_NR_SQ&quot; type=&quot;java.lang.Long&quot; &gt;
         &lt;generator class=&quot;native&quot;/&gt;  
     &lt;/id&gt;

     &lt;property name=&quot;descricao&quot; type=&quot;java.lang.String&quot; update=&quot;true&quot;
     	insert=&quot;true&quot; column=&quot;ATBS_TX_DESCRICAO&quot;length=&quot;300&quot;not-null=&quot;true&quot;/&gt;
        
     
     &lt;set name=&quot;opcao&quot; lazy=&quot;true&quot; table=&quot;OPS_SUBATR_ATR&quot;  &gt;
         &lt;key column=&quot;OPSA_SUAT_NR_SQ&quot;/&gt;
         &lt;composite-element class=&quot;OpsSubAtrAtr&quot; &gt;      
             &lt;parent name=&quot;atributo&quot;/&gt;
             &lt;many-to-one name=&quot;opcao&quot; class=&quot;Opcao&quot;
                 column=&quot;OPSA_OPCO_NR_SQ&quot; not-null=&quot;true&quot;&gt;                             
             &lt;/many-to-one&gt;
              &lt;many-to-one name=&quot;elementoNcm&quot; class=&quot;ElementoNcm&quot;
                 column=&quot;OPSA_ELNC_NR_SQ&quot; not-null=&quot;true&quot;&gt;                             
             &lt;/many-to-one&gt; 
             
         &lt;/composite-element&gt;
     &lt;/set&gt; 
 &lt;/class&gt;

</hibernate-mapping>
[/code]

Daí tento fazer uma inserção na relação assim:

[code]ElementoNcm ncm = (ElementoNcm) session.get(ElementoNcm.class, new Long(1));
AtributoProduto atributo = (AtributoProduto) session.get(AtributoProduto.class, new Long(1));
Opcao opc = (Opcao)session.get(Opcao.class, new Long(1));

     atributo.getElementoNcm&#40;&#41;.add&#40;ncm&#41;; 
     atributo.getOpcao&#40;&#41;.add&#40;opc&#41;;
     atributo.setDescricao&#40;&quot;Descricao teste&quot;&#41;;        
 
     try&#123;
          session.save&#40;atributo&#41;; 
         session.flush&#40;&#41;;
         tx.commit&#40;&#41;;
         session.close&#40;&#41;;
     &#125; catch&#40;Exception ex&#41;&#123;
         ex.printStackTrace&#40;&#41;;
     &#125;

[/code]

e a seguinte exception é me apresentada:

ibernate&#58; /* load collection AtributoProduto.opcao */ select opcao0_.OPSA_SUAT_NR_SQ as OPSA1_0_, opcao0_.OPSA_OPCO_NR_SQ as OPSA2_0_, opcao0_.OPSA_ELNC_NR_SQ as OPSA3_0_ from OPS_SUBATR_ATR opcao0_ where opcao0_.OPSA_SUAT_NR_SQ=? Hibernate&#58; /* insert collection row AtributoProduto.opcao */ insert into OPS_SUBATR_ATR &#40;OPSA_SUAT_NR_SQ, OPSA_OPCO_NR_SQ, OPSA_ELNC_NR_SQ&#41; values &#40;?, ?, ?&#41; &#40;def.AbstractFlushingEventListener 299 &#41; Could not synchronize database state with session org.hibernate.PropertyAccessException&#58; exception getting property value with CGLIB &#40;set hibernate.cglib.use_reflection_optimizer=false for more info&#41; getter of OpsSubAtrAtr.? org.hibernate.PropertyAccessException&#58; exception getting property value with CGLIB &#40;set hibernate.cglib.use_reflection_optimizer=false for more info&#41; getter of OpsSubAtrAtr.? at org.hibernate.tuple.PojoComponentTuplizer.getPropertyValues&#40;PojoComponentTuplizer.java&#58;79&#41; at org.hibernate.tuple.PojoComponentTuplizer.getPropertyValues&#40;PojoComponentTuplizer.java&#58;79&#41; at org.hibernate.type.ComponentType.getPropertyValues&#40;ComponentType.java&#58;307&#41; at org.hibernate.type.ComponentType.getPropertyValues&#40;ComponentType.java&#58;307&#41; at org.hibernate.type.ComponentType.nullSafeGetValues&#40;ComponentType.java&#58;280&#41; at org.hibernate.type.ComponentType.nullSafeGetValues&#40;ComponentType.java&#58;280&#41; at org.hibernate.type.ComponentType.nullSafeSet&#40;ComponentType.java&#58;251&#41; at org.hibernate.type.ComponentType.nullSafeSet&#40;ComponentType.java&#58;251&#41; at org.hibernate.persister.collection.AbstractCollectionPersister.writeElement&#40;AbstractCollectionPersister.java&#58;697&#41; at org.hibernate.persister.collection.AbstractCollectionPersister.writeElement&#40;AbstractCollectionPersister.java&#58;697&#41; at org.hibernate.persister.collection.AbstractCollectionPersister.insertRows&#40;AbstractCollectionPersister.java&#58;1200&#41; at org.hibernate.persister.collection.AbstractCollectionPersister.insertRows&#40;AbstractCollectionPersister.java&#58;1200&#41; at org.hibernate.action.CollectionUpdateAction.execute&#40;CollectionUpdateAction.java&#58;56&#41; at org.hibernate.action.CollectionUpdateAction.execute&#40;CollectionUpdateAction.java&#58;56&#41; at org.hibernate.engine.ActionQueue.execute&#40;ActionQueue.java&#58;243&#41; at org.hibernate.engine.ActionQueue.execute&#40;ActionQueue.java&#58;243&#41; at org.hibernate.engine.ActionQueue.executeActions&#40;ActionQueue.java&#58;227&#41; at org.hibernate.engine.ActionQueue.executeActions&#40;ActionQueue.java&#58;227&#41; at org.hibernate.engine.ActionQueue.executeActions&#40;ActionQueue.java&#58;143&#41; at org.hibernate.engine.ActionQueue.executeActions&#40;ActionQueue.java&#58;143&#41; at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions&#40;AbstractFlushingEventListener.java&#58;296&#41; at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions&#40;AbstractFlushingEventListener.java&#58;296&#41; at org.hibernate.event.def.DefaultFlushEventListener.onFlush&#40;DefaultFlushEventListener.java&#58;27&#41; at org.hibernate.event.def.DefaultFlushEventListener.onFlush&#40;DefaultFlushEventListener.java&#58;27&#41; at org.hibernate.impl.SessionImpl.flush&#40;SessionImpl.java&#58;1009&#41; at org.hibernate.impl.SessionImpl.flush&#40;SessionImpl.java&#58;1009&#41; at hMain.main&#40;Main.java&#58;80&#41; at Main.main&#40;Main.java&#58;80&#41; Caused by&#58; java.lang.ClassCastException Caused by&#58; java.lang.ClassCastException at OpsSubAtrAtr$$BulkBeanByCGLIB$$f416b45a.getPropertyValues&#40;&lt;generated&gt;&#41; at OpsSubAtrAtr$$BulkBeanByCGLIB$$f416b45a.getPropertyValues&#40;&lt;generated&gt;&#41; at net.sf.cglib.beans.BulkBean.getPropertyValues&#40;BulkBean.java&#58;48&#41; at net.sf.cglib.beans.BulkBean.getPropertyValues&#40;BulkBean.java&#58;48&#41; at org.hibernate.tuple.PojoComponentTuplizer.getPropertyValues&#40;PojoComponentTuplizer.java&#58;76&#41; at org.hibernate.tuple.PojoComponentTuplizer.getPropertyValues&#40;PojoComponentTuplizer.java&#58;76&#41;

alguém tem alguma sugestão?

obs: as consultas de opc e elementoNcm estão rolando na boa