Hello guys....
Every time that i need get a BEAN with the Hibernate Session, a 
ClassCastExcepion ocourr. When I see in my Bean, I get a CGLIB error, like this 
picture.

Anyone have a ideia to help-me?!

PS: JBOSS 4.0.3SP1
Hibernate 3 -> migrated of the Hibernate 2.1 (Package in the Jboss Server)
Oracle 9.

[img]http://www.eltonk.com.br/snapshot2.png[/img]


There is my configuration:

  | package com.bar.sistema.persistence.usuario;
  | 
  | 
  | import java.io.Serializable;
  | import java.util.Date;
  | import java.util.Set;
  | 
  | import org.apache.commons.lang.builder.ToStringBuilder;
  | import org.apache.commons.lang.builder.ToStringStyle;
  | 
  | import com.bar.Sistema.persistence.grupo.GrupoBean;
  | import com.bar.Sistema.persistence.nivel.NivelBean;
  | import org.apache.commons.lang.builder.EqualsBuilder;
  | import org.apache.commons.lang.builder.HashCodeBuilder;
  | 
  | /**
  |  * 
  |  * <strong>Copyright © 2005 bar Tecnologia & Serviços SA </strong> <br>
  |  * <strong>Sistema Eletrônico </strong> <br>
  |  * <br>
  |  * 
  |  * UsuarioBean.java <br>
  |  * <br>
  |  * Classe usada para persistir um usuario e usada para gerar o hbm para o 
hibernate
  |  * 
  |  * @since Apr 12, 2005
  |  * @version $$Revision$$<br>
  |  *          $$Id$$
  |  * @hibernate.class table="USUARIO" dynamic-update="true" lazy="false" 
  |  */
  | public class UsuarioBean implements Serializable
  | {
  | 
  |    /**
  |     * SerialVersionUID default
  |     */
  |    private static final long serialVersionUID = 1L;
  | 
  |    /** Campos */
  |    private Long              cdUsuario;
  |    private String            nmUsuario;
  |    private String            nmLogin;
  |    private String            dsSenha;
  |    private Date              dtCadastro;
  | 
  |    /** campos para o controle das alterações de senha */
  |    private Date              dtAlteracaoSenha;
  |    private String            dsEmail;
  |    private Integer           flBloqueado;
  |    private Integer           flExpirada;
  |    private Integer           nuDiasExpira;
  |    private Integer           nuTentativas;
  | 
  |    /** chaves estrageiras */
  |    private Integer           cdNivel;
  |    private Integer           cdGrupo;
  | 
  |    /** Relacionamento */
  |    private Set               SistemaStatus;
  |    private Set               loteStatus;
  |    private Set               usuarioPagador;
  |    private Set               usuarioFavorecido;
  |    private Set               assinaturas;
  |    private GrupoBean         grupo;
  |    private NivelBean         nivel;
  |    
  | 
  |    /** default constructor */
  |    public UsuarioBean()
  |    {
  |    }
  | 
  |    /**
  |     * @hibernate.id generator-class="sequence" unsaved-value="0" 
column="CD_USUARIO"
  |     * @hibernate.generator-param name = "sequence" value = "SEQ_USUARIO"
  |     * @return Returns the cdUsuario.
  |     */
  |    public Long getCdUsuario()
  |    {
  |       return cdUsuario;
  |    }
  | 
  |    /**
  |     * @param cdUsuario
  |     *           The cdUsuario to set.
  |     */
  |    public void setCdUsuario( Long cdUsuario )
  |    {
  |       this.cdUsuario = cdUsuario;
  |    }
  | 
  |    /**
  |     * @hibernate.property column="DS_SENHA"
  |     * @return Returns the dsSenha
  |     */
  |    public String getDsSenha()
  |    {
  |       return dsSenha;
  |    }
  | 
  |    /**
  |     * @param dsSenha
  |     *           The dsSenha to set.
  |     */
  |    public void setDsSenha( String dsSenha )
  |    {
  |       this.dsSenha = dsSenha;
  |    }
  | 
  |    /**
  |     * @hibernate.property column="DT_CADASTRO"
  |     * @return Returns the dtCadastro
  |     */
  |    public Date getDtCadastro()
  |    {
  |       return dtCadastro;
  |    }
  | 
  |    /**
  |     * @param dtCadastro
  |     *           The dtCadastro to set.
  |     */
  |    public void setDtCadastro( Date dtCadastro )
  |    {
  |       this.dtCadastro = dtCadastro;
  |    }
  | 
  |    /**
  |     * @hibernate.property column="DS_EMAIL"
  |     * @return Returns the dsEmail.
  |     */
  |    public String getDsEmail()
  |    {
  |       return dsEmail;
  |    }
  | 
  |    /**
  |     * @param dsEmail
  |     *           The dsEmail to set.
  |     */
  |    public void setDsEmail( String dsEmail )
  |    {
  |       this.dsEmail = dsEmail;
  |    }
  | 
  |    /**
  |     * @hibernate.property column="DT_ALTERACAO_SENHA"
  |     * @return Returns the dtAlteracaoSenha.
  |     */
  |    public Date getDtAlteracaoSenha()
  |    {
  |       return dtAlteracaoSenha;
  |    }
  | 
  |    /**
  |     * @param dtAlteracaoSenha
  |     *           The dtAlteracaoSenha to set.
  |     */
  |    public void setDtAlteracaoSenha( Date dtAlteracaoSenha )
  |    {
  |       this.dtAlteracaoSenha = dtAlteracaoSenha;
  |    }
  | 
  |    /**
  |     * @hibernate.property column="FL_BLOQUEADO"
  |     * @return Returns the flBloqueado.
  |     */
  |    public Integer getFlBloqueado()
  |    {
  |       return flBloqueado;
  |    }
  | 
  |    /**
  |     * @param flBloqueado
  |     *           The flBloqueado to set.
  |     */
  |    public void setFlBloqueado( Integer flBloqueado )
  |    {
  |       this.flBloqueado = flBloqueado;
  |    }
  | 
  |    /**
  |     * @hibernate.property column="FL_EXPIRADA"
  |     * @return Returns the flExpirada.
  |     */
  |    public Integer getFlExpirada()
  |    {
  |       return flExpirada;
  |    }
  | 
  |    /**
  |     * @param flExpirada
  |     *           The flExpirada to set.
  |     */
  |    public void setFlExpirada( Integer flEspirada )
  |    {
  |       this.flExpirada = flEspirada;
  |    }
  | 
  |    /**
  |     * @hibernate.property column="NU_DIAS_EXPIRA"
  |     * @return Returns the nuDiasExpira.
  |     */
  |    public Integer getNuDiasExpira()
  |    {
  |       return nuDiasExpira;
  |    }
  | 
  |    /**
  |     * @param nuDiasExpira
  |     *           The nuDiasExpira to set.
  |     */
  |    public void setNuDiasExpira( Integer nuDiasEspira )
  |    {
  |       this.nuDiasExpira = nuDiasEspira;
  |    }
  | 
  |    /**
  |     * @hibernate.property column="NU_TENTATIVAS"
  |     * @return Returns the nuTentativas.
  |     */
  |    public Integer getNuTentativas()
  |    {
  |       return nuTentativas;
  |    }
  | 
  |    /**
  |     * @param nuTentativas
  |     *           The nuTentativas to set.
  |     */
  |    public void setNuTentativas( Integer nuTentativas )
  |    {
  |       this.nuTentativas = nuTentativas;
  |    }
  | 
  |    /**
  |     * @hibernate.property column="CD_GRUPO"
  |     * @return Returns the cdGrupo.
  |     */
  |    public Integer getCdGrupo()
  |    {
  |       return cdGrupo;
  |    }
  | 
  |    /**
  |     * @param cdGrupo
  |     *           The cdGrupo to set.
  |     */
  |    public void setCdGrupo( Integer cdGrupo )
  |    {
  |       this.cdGrupo = cdGrupo;
  |    }
  | 
  |    /**
  |     * @hibernate.property column="CD_NIVEL"
  |     * @return Returns the cdNivel.
  |     */
  |    public Integer getCdNivel()
  |    {
  |       return cdNivel;
  |    }
  | 
  |    /**
  |     * @param cdNivel
  |     *           The cdNivel to set.
  |     */
  |    public void setCdNivel( Integer cdNivel )
  |    {
  |       this.cdNivel = cdNivel;
  |    }
  | 
  |    /**
  |     * @hibernate.property column="NM_LOGIN"
  |     * @return Returns the nmLogin
  |     */
  |    public String getNmLogin()
  |    {
  |       return nmLogin;
  |    }
  | 
  |    /**
  |     * @param nmLogin
  |     *           The nmLogin to set.
  |     */
  |    public void setNmLogin( String nmLogin )
  |    {
  |       this.nmLogin = nmLogin;
  |    }
  | 
  |    /**
  |     * @hibernate.property column="NM_USUARIO"
  |     * @return Returns the nmUsuario
  |     */
  |    public String getNmUsuario()
  |    {
  |       return nmUsuario;
  |    }
  | 
  |    /**
  |     * @param nmUsuario
  |     *           The nmUsuario to set.
  |     */
  |    public void setNmUsuario( String nmUsuario )
  |    {
  |       this.nmUsuario = nmUsuario;
  |    }
  | 
  |    /**
  |     * @hibernate.set lazy="false" inverse="true" 
  |     * @hibernate.collection-key column="CD_USUARIO" insert="true" 
update="false"
  |     * @hibernate.collection-one-to-many 
class="com.bar.Sistema.persistence.assinatura.AssinaturaBean" 
  |     * @return Returns the assinaturas.
  |     */
  |    public Set getAssinaturas()
  |    {
  |       return assinaturas;
  |    }
  | 
  |    /**
  |     * @param assinaturas
  |     *           The assinaturas to set.
  |     */
  |    public void setAssinaturas( Set assinaturas )
  |    {
  |       this.assinaturas = assinaturas;
  |    }
  |    
  |    /**
  |     * @hibernate.many-to-one column="CD_NIVEL" insert="false" 
update="false" 
  |     * @return Returns the nivel.
  |     */
  |    public NivelBean getNivel()
  |    {
  |       return nivel;
  |    }
  | 
  |    /**
  |     * @param nivel
  |     *           The nivel to set.
  |     */
  |    public void setNivel( NivelBean nivel )
  |    {
  |       this.nivel = nivel;
  |    }
  | 
  |    /**
  |     * @hibernate.many-to-one column="CD_GRUPO" insert="false" 
update="false" 
  |     * @return Returns the grupo.
  |     */
  |    public GrupoBean getGrupo()
  |    {
  |       return grupo;
  |    }
  | 
  |    /**
  |     * @param grupo
  |     *           The grupo to set.
  |     */
  |    public void setGrupo( GrupoBean grupo )
  |    {
  |       this.grupo = grupo;
  |    }
  | 
  |    /**
  |     * @hibernate.set lazy="false" inverse="true" 
  |     * @hibernate.collection-key column="CD_USUARIO" insert="true" 
update="false"
  |     * @hibernate.collection-one-to-many 
class="com.bar.Sistema.persistence.Sistemastatus.SistemaStatusBean" 
  |     * @return Returns the SistemaStatus.
  |     */
  |    public Set getSistemaStatus()
  |    {
  |       return SistemaStatus;
  |    }
  | 
  |    /**
  |     * @hibernate.set lazy="false" inverse="true" 
  |     * @hibernate.collection-key column="CD_USUARIO" insert="true" 
update="false"
  |     * @hibernate.collection-one-to-many 
class="com.bar.Sistema.persistence.lotestatus.LoteStatusBean" 
  |     * @return Returns the loteStatus.
  |     */
  | 
  |    public Set getLoteStatus()
  |    {
  |       return loteStatus;
  |    }
  | 
  |    /**
  |     * @param loteStatus
  |     *           The loteStatus to set.
  |     */
  |    public void setLoteStatus( Set loteStatus )
  |    {
  |       this.loteStatus = loteStatus;
  |    }
  | 
  |    /**
  |     * @param SistemaStatus
  |     *           The SistemaStatus to set.
  |     */
  |    public void setSistemaStatus( Set SistemaStatus )
  |    {
  |       this.SistemaStatus = SistemaStatus;
  |    }
  | 
  |    /**
  |     * @hibernate.set lazy="false" inverse="true" 
  |     * @hibernate.collection-key column="CD_USUARIO" insert="true" 
update="false"
  |     * @hibernate.collection-one-to-many 
class="com.bar.Sistema.persistence.usuariopagador.UsuarioPagadorBean" 
  |     * @return Returns the usuarioPagador.
  |     */
  |    public Set getUsuarioPagador()
  |    {
  |       return usuarioPagador;
  |    }
  | 
  |    /**
  |     * @param usuarioPagador
  |     *           The usuarioPagador to set.
  |     */
  |    public void setUsuarioPagador( Set usuarioPagador )
  |    {
  |       this.usuarioPagador = usuarioPagador;
  |    }
  | 
  |    /**
  |     * @hibernate.set lazy="false" inverse="true" 
  |     * @hibernate.collection-key column="CD_USUARIO" insert="true" 
update="false"
  |     * @hibernate.collection-one-to-many 
class="com.bar.Sistema.persistence.usuariofavorecido.UsuarioFavorecidoBean" 
  |     * @return Um Set de usuariosFavorecidos.
  |     */
  |    public Set getUsuarioFavorecido()
  |    {
  |       return usuarioFavorecido;
  |    }
  | 
  |    /**
  |     * @param Um
  |     *           Set de usuariosFavorecidos.
  |     */
  |    public void setUsuarioFavorecido( Set usuariosFavorecidos )
  |    {
  |       this.usuarioFavorecido = usuariosFavorecidos;
  |    }
  | 
  |    /**
  |     * @see java.lang.Object#toString()
  |     */
  |    public String toString()
  |    {
  |       return new ToStringBuilder(this, 
ToStringStyle.MULTI_LINE_STYLE).append("nuTentativas", this.nuTentativas)
  |          .append("cdGrupo", this.cdGrupo).append("nmLogin", 
this.nmLogin).append("dtCadastro", this.dtCadastro)
  |          .append("dtAlteracaoSenha", 
this.dtAlteracaoSenha).append("flBloqueado", this.flBloqueado).append(
  |             "cdNivel", this.cdNivel).append("flExpirada", this.flExpirada)
  |          .append("nmUsuario", this.nmUsuario).append("dsEmail", 
this.dsEmail).append("nuDiasExpira",
  |             this.nuDiasExpira).append("cdUsuario", 
this.cdUsuario).toString();
  |    }
  | 
  |    /**
  |     * @see java.lang.Object#equals(Object)
  |     */
  |    public boolean equals( Object object )
  |    {
  |       if (!(object instanceof UsuarioBean))
  |       {
  |          return false;
  |       }
  |       UsuarioBean rhs = (UsuarioBean) object;
  |       return new 
EqualsBuilder().appendSuper(super.equals(object)).append(this.nuTentativas, 
rhs.nuTentativas)
  |          .append(this.nivel, rhs.nivel).append(this.cdGrupo, 
rhs.cdGrupo).append(this.nmLogin, rhs.nmLogin)
  |          .append(this.dtCadastro, 
rhs.dtCadastro).append(this.dtAlteracaoSenha, rhs.dtAlteracaoSenha).append(
  |             this.loteStatus, rhs.loteStatus).append(this.flBloqueado, 
rhs.flBloqueado).append(this.cdNivel,
  |             rhs.cdNivel).append(this.usuarioPagador, 
rhs.usuarioPagador).append(this.flExpirada, rhs.flExpirada)
  |          .append(this.usuarioFavorecido, 
rhs.usuarioFavorecido).append(this.dsSenha, rhs.dsSenha).append(
  |             this.SistemaStatus, rhs.SistemaStatus).append(this.grupo, 
rhs.grupo).append(this.nmUsuario,
  |             rhs.nmUsuario).append(this.dsEmail, 
rhs.dsEmail).append(this.assinaturas, rhs.assinaturas).append(
  |             this.nuDiasExpira, rhs.nuDiasExpira).append(this.cdUsuario, 
rhs.cdUsuario).isEquals();
  |    }
  | 
  |    /**
  |     * @see java.lang.Object#hashCode()
  |     */
  |    public int hashCode()
  |    {
  |       return new HashCodeBuilder(-1718085171, 
1735336429).appendSuper(super.hashCode())
  |          
.append(this.nuTentativas).append(this.nivel).append(this.cdGrupo).append(this.nmLogin).append(
  |             
this.dtCadastro).append(this.dtAlteracaoSenha).append(this.loteStatus).append(this.flBloqueado)
  |          
.append(this.cdNivel).append(this.usuarioPagador).append(this.flExpirada)
  |          
.append(this.usuarioFavorecido).append(this.dsSenha).append(this.SistemaStatus).append(this.grupo)
  |          
.append(this.nmUsuario).append(this.dsEmail).append(this.assinaturas).append(this.nuDiasExpira).append(
  |             this.cdUsuario).toHashCode();
  |    }
  | 
  | }
  | 

hbm:


  | <?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="com.bar.Sistema.persistence.usuario.UsuarioBean"
  |         table="USUARIO"
  |         lazy="false"
  |         dynamic-update="true"
  |     >
  | 
  |         <id
  |             name="cdUsuario"
  |             column="CD_USUARIO"
  |             type="java.lang.Long"
  |             unsaved-value="0"
  |         >
  |             <generator class="sequence">
  |                 <param name="sequence">SEQ_USUARIO</param>
  |               <!--  
  |                   To add non XDoclet generator parameters, create a file 
named 
  |                   hibernate-generator-params-UsuarioBean.xml 
  |                   containing the additional parameters and place it in your 
merge dir. 
  |               --> 
  |             </generator>
  |         </id>
  | 
  |         <property
  |             name="dsSenha"
  |             type="java.lang.String"
  |             update="true"
  |             insert="true"
  |             column="DS_SENHA"
  |         />
  | 
  |         <property
  |             name="dtCadastro"
  |             type="java.util.Date"
  |             update="true"
  |             insert="true"
  |             column="DT_CADASTRO"
  |         />
  | 
  |         <property
  |             name="dsEmail"
  |             type="java.lang.String"
  |             update="true"
  |             insert="true"
  |             column="DS_EMAIL"
  |         />
  | 
  |         <property
  |             name="dtAlteracaoSenha"
  |             type="java.util.Date"
  |             update="true"
  |             insert="true"
  |             column="DT_ALTERACAO_SENHA"
  |         />
  | 
  |         <property
  |             name="flBloqueado"
  |             type="java.lang.Integer"
  |             update="true"
  |             insert="true"
  |             column="FL_BLOQUEADO"
  |         />
  | 
  |         <property
  |             name="flExpirada"
  |             type="java.lang.Integer"
  |             update="true"
  |             insert="true"
  |             column="FL_EXPIRADA"
  |         />
  | 
  |         <property
  |             name="nuDiasExpira"
  |             type="java.lang.Integer"
  |             update="true"
  |             insert="true"
  |             column="NU_DIAS_EXPIRA"
  |         />
  | 
  |         <property
  |             name="nuTentativas"
  |             type="java.lang.Integer"
  |             update="true"
  |             insert="true"
  |             column="NU_TENTATIVAS"
  |         />
  | 
  |         <property
  |             name="cdGrupo"
  |             type="java.lang.Integer"
  |             update="true"
  |             insert="true"
  |             column="CD_GRUPO"
  |         />
  | 
  |         <property
  |             name="cdNivel"
  |             type="java.lang.Integer"
  |             update="true"
  |             insert="true"
  |             column="CD_NIVEL"
  |         />
  | 
  |         <property
  |             name="nmLogin"
  |             type="java.lang.String"
  |             update="true"
  |             insert="true"
  |             column="NM_LOGIN"
  |         />
  | 
  |         <property
  |             name="nmUsuario"
  |             type="java.lang.String"
  |             update="true"
  |             insert="true"
  |             column="NM_USUARIO"
  |         />
  | 
  |         <set
  |             name="assinaturas"
  |             lazy="false"
  |             inverse="true"
  |             cascade="none"
  |             sort="unsorted"
  |         >
  | 
  |             <key
  |                 column="CD_USUARIO"
  |             >
  |             </key>
  | 
  |             <one-to-many
  |                   
class="com.bar.Sistema.persistence.assinatura.AssinaturaBean"
  |             />
  | 
  |         </set>
  | 
  |         <many-to-one
  |             name="nivel"
  |             class="com.bar.Sistema.persistence.nivel.NivelBean"
  |             cascade="none"
  |             outer-join="auto"
  |             update="false"
  |             insert="false"
  |             column="CD_NIVEL"
  |         />
  | 
  |         <many-to-one
  |             name="grupo"
  |             class="com.bar.Sistema.persistence.grupo.GrupoBean"
  |             cascade="none"
  |             outer-join="auto"
  |             update="false"
  |             insert="false"
  |             column="CD_GRUPO"
  |         />
  | 
  |         <set
  |             name="SistemaStatus"
  |             lazy="false"
  |             inverse="true"
  |             cascade="none"
  |             sort="unsorted"
  |         >
  | 
  |             <key
  |                 column="CD_USUARIO"
  |             >
  |             </key>
  | 
  |             <one-to-many
  |                   
class="com.bar.Sistema.persistence.Sistemastatus.SistemaStatusBean"
  |             />
  | 
  |         </set>
  | 
  |         <set
  |             name="loteStatus"
  |             lazy="false"
  |             inverse="true"
  |             cascade="none"
  |             sort="unsorted"
  |         >
  | 
  |             <key
  |                 column="CD_USUARIO"
  |             >
  |             </key>
  | 
  |             <one-to-many
  |                   
class="com.bar.Sistema.persistence.lotestatus.LoteStatusBean"
  |             />
  | 
  |         </set>
  | 
  |         <set
  |             name="usuarioPagador"
  |             lazy="false"
  |             inverse="true"
  |             cascade="none"
  |             sort="unsorted"
  |         >
  | 
  |             <key
  |                 column="CD_USUARIO"
  |             >
  |             </key>
  | 
  |             <one-to-many
  |                   
class="com.bar.Sistema.persistence.usuariopagador.UsuarioPagadorBean"
  |             />
  | 
  |         </set>
  | 
  |         <set
  |             name="usuarioFavorecido"
  |             lazy="false"
  |             inverse="true"
  |             cascade="none"
  |             sort="unsorted"
  |         >
  | 
  |             <key
  |                 column="CD_USUARIO"
  |             >
  |             </key>
  | 
  |             <one-to-many
  |                   
class="com.bar.Sistema.persistence.usuariofavorecido.UsuarioFavorecidoBean"
  |             />
  | 
  |         </set>
  | 
  |         <!--
  |             To add non XDoclet property mappings, create a file named
  |                 hibernate-properties-UsuarioBean.xml
  |             containing the additional properties and place it in your merge 
dir.
  |         -->
  | 
  |     </class>
  | 
  | </hibernate-mapping>
  | 


bean do Nivel

  | package com.bar.sistema.persistence.nivel;
  | 
  | 
  | import java.io.Serializable;
  | import java.util.Set;
  | 
  | import org.apache.commons.lang.builder.ToStringBuilder;
  | import org.apache.commons.lang.builder.ToStringStyle;
  | import org.apache.commons.lang.builder.EqualsBuilder;
  | import org.apache.commons.lang.builder.HashCodeBuilder;
  | 
  | /**
  |  * 
  |  * <strong>Copyright © 2005 bar Tecnologia & Serviços SA </strong> <br>
  |  * <strong>Sistema Eletrônico </strong> <br>
  |  * <br>
  |  * 
  |  * NivelBean.java <br>
  |  * <br>
  |  * Classe usada para persistir um nivel e usada para gerar o hbm para o 
hibernate
  |  * 
  |  
  |  * @since Apr 12, 2005
  |  * @version $$Revision$$<br>
  |  *          $$Id$$
  |  * @hibernate.class table="NIVEL" dynamic-update="true" lazy="false"
  |  * @hibernate.cache usage="read-only"
  |  */
  | public class NivelBean implements Serializable
  | {
  | 
  |    /**
  |     * SerialVersionUID default
  |     */
  |    private static final long serialVersionUID = 1L;
  | 
  |    /** Campos */
  |    private Integer           cdNivel;
  |    private String            dsNivel;
  | 
  |    /** Relacionamento */
  |    private Set               usuarios;
  | 
  |    /**
  |     * Construtor Completo
  |     * 
  |     * @param cdNivel
  |     *           <code> Integer </code> codigo de nivel
  |     * @param dsNivel
  |     *           <code> String </code> descricao de nivel
  |     * @param usuarios
  |     *           <code> UsuarioBean </code> colecao de usuarios
  |     */
  |    public NivelBean( Integer cdNivel , String dsNivel , Set usuarios )
  |    {
  |       this.cdNivel = cdNivel;
  |       this.dsNivel = dsNivel;
  |       this.usuarios = usuarios;
  |    }
  | 
  |    /**
  |     * Construtor Default
  |     */
  |    public NivelBean()
  |    {
  |    }
  | 
  |    /**
  |     * @hibernate.id generator-class="sequence" unsaved-value="0" 
column="CD_NIVEL"
  |     * @hibernate.generator-param name = "sequence" value = "SEQ_NIVEL"
  |     * @return Returns the cdNivel.
  |     */
  |    public Integer getCdNivel()
  |    {
  |       return cdNivel;
  |    }
  | 
  |    /**
  |     * @param cdNivel
  |     *           The cdNivel to set.
  |     */
  |    public void setCdNivel( Integer cdNivel )
  |    {
  |       this.cdNivel = cdNivel;
  |    }
  | 
  |    /**
  |     * @hibernate.property column="DS_NIVEL"
  |     * @return Returns the dsNivel
  |     */
  |    public String getDsNivel()
  |    {
  |       return dsNivel;
  |    }
  | 
  |    /**
  |     * @param dsNivel
  |     *           The dsNivel to set.
  |     */
  |    public void setDsNivel( String dsNivel )
  |    {
  |       this.dsNivel = dsNivel;
  |    }
  | 
  |    /**
  |     * @hibernate.set lazy="false" inverse="true"
  |     * @hibernate.collection-key column="CD_NIVEL" insert="true" 
update="false"
  |     * @hibernate.collection-one-to-many 
class="com.bar.Sistema.persistence.usuario.UsuarioBean"
  |     * @return Returns the usuarios.
  |     */
  |    public Set getUsuarios()
  |    {
  |       return usuarios;
  |    }
  | 
  |    /**
  |     * @param usuarios
  |     *           The usuarios to set.
  |     */
  |    public void setUsuarios( Set usuarios )
  |    {
  |       this.usuarios = usuarios;
  |    }
  | 
  |    /**
  |     * @see java.lang.Object#toString()
  |     */
  |    public String toString()
  |    {
  |       return new ToStringBuilder(this, 
ToStringStyle.MULTI_LINE_STYLE).append("dsNivel", this.dsNivel).append(
  |          "cdNivel", this.cdNivel).toString();
  |    }
  | }
  | 

hbm do nivel

  | <?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="com.bar.sistema.persistence.nivel.NivelBean"
  |         table="NIVEL"
  |         lazy="false"
  |         dynamic-update="true"
  |     >
  |         <cache usage="read-only" />
  | 
  |         <id
  |             name="cdNivel"
  |             column="CD_NIVEL"
  |             type="java.lang.Integer"
  |             unsaved-value="0"
  |         >
  |             <generator class="sequence">
  |                 <param name="sequence">SEQ_NIVEL</param>
  |               <!--  
  |                   To add non XDoclet generator parameters, create a file 
named 
  |                   hibernate-generator-params-NivelBean.xml 
  |                   containing the additional parameters and place it in your 
merge dir. 
  |               --> 
  |             </generator>
  |         </id>
  | 
  |         <property
  |             name="dsNivel"
  |             type="java.lang.String"
  |             update="true"
  |             insert="true"
  |             column="DS_NIVEL"
  |         />
  | 
  |         <set
  |             name="usuarios"
  |             lazy="false"
  |             inverse="true"
  |             cascade="none"
  |             sort="unsorted"
  |         >
  | 
  |             <key
  |                 column="CD_NIVEL"
  |             >
  |             </key>
  | 
  |             <one-to-many
  |                   class="com.bar.sistema.persistence.usuario.UsuarioBean"
  |             />
  | 
  |         </set>
  | 
  |         <!--
  |             To add non XDoclet property mappings, create a file named
  |                 hibernate-properties-NivelBean.xml
  |             containing the additional properties and place it in your merge 
dir.
  |         -->
  | 
  |     </class>
  | 
  | </hibernate-mapping>
  | 

jboss-service.xml

  | <?xml version="1.0" encoding="UTF-8"?>
  | <server>
  |     <mbean code="org.jboss.hibernate.jmx.Hibernate" 
name="jboss.har:service=Hibernate">
  |             <attribute name="DatasourceName">java:/SistemaDS</attribute>
  |             <attribute 
name="Dialect">org.hibernate.dialect.Oracle9Dialect</attribute>
  |             <attribute 
name="SessionFactoryName">java:/hibernate/SistemaSessionFactory</attribute>
  |             <attribute 
name="CacheProviderClass">org.hibernate.cache.HashtableCacheProvider</attribute>
  |             <attribute name="ReflectionOptimizationEnabled">true</attribute>
  |             <attribute name="StatGenerationEnabled">true</attribute>
  |             <attribute name="MaxFetchDepth">1</attribute>           
  |             <!-- <attribute name="ShowSqlEnabled">true</attribute> -->
  |     </mbean>
  | </server>
  | 


Thanks for any help....

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3925407#3925407

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3925407


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to