Erro com hibernate

org.hibernate.MappingException: entity class not found: hibernate.TelefoneContatos at org.hibernate.mapping.PersistentClass.getMappedClass(PersistentClass.java:99) at org.hibernate.tuple.PropertyFactory.getGetter(PropertyFactory.java:168) at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:44) at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:118) at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:425) at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109) at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55) at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218) at jdo.Sessao.<clinit>(Sessao.java:35) at jdo.Gerencia.inclui(Gerencia.java:72) at jdo.Usuario.main(Usuario.java:197) Caused by: java.lang.ClassNotFoundException: hibernate.TelefoneContatos at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:164) at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:100) at org.hibernate.mapping.PersistentClass.getMappedClass(PersistentClass.java:96) ... 11 more
por favor alguém sabe pq isso?
o nome inclusive com o caminho estão corretos pois eu ja mudei umas 30 vzs e sempre da o mesmo erro com aquele nome q eu coloquei!
alguma idéia?? sugestão?? qualquer coisa!! Obrigado

vc esta fazendo o mapeamento via hbm.xml??? se sim, posta o arquivo aih pra gente…se for via annotations ou xdoclet…pista tb, hehehehehe…

senão a gente nao consegue ajudar…flw

[code]<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >

<hibernate-mapping>
<!–
Created by the Middlegen Hibernate plugin 2.1

http&#58;//boss.bekk.no/boss/middlegen/
http&#58;//www.hibernate.org/

–>

<class
name="hibernate.TelefoneContatos"
table="telefone_contato"
>
<meta attribute="class-description" inherit="false">
@hibernate.class
table="telefone_contato"
</meta>

&lt;composite-id name=&quot;comp_id&quot; class=&quot;hibernate.TelefoneContatoPk&quot;&gt;
    &lt;meta attribute=&quot;field-description&quot; inherit=&quot;false&quot;&gt;
       @hibernate.id
        generator-class=&quot;assigned&quot;
    &lt;/meta&gt;
    &lt;key-property 
        name=&quot;codigoContato&quot; 
        column=&quot;codigo_contato&quot; 
        type=&quot;java.lang.Integer&quot;
        length=&quot;4&quot;
    &gt;
        &lt;meta attribute=&quot;field-description&quot;&gt;
           @hibernate.property
            column=&quot;codigo_contato&quot;
        &lt;/meta&gt; 
    &lt;/key-property&gt;
    &lt;key-property 
        name=&quot;codigoTelefone&quot; 
        column=&quot;codigo_telefone&quot; 
        type=&quot;java.lang.Integer&quot;
        length=&quot;4&quot;
    &gt;
        &lt;meta attribute=&quot;field-description&quot;&gt;
           @hibernate.property
            column=&quot;codigo_telefone&quot;
        &lt;/meta&gt; 
    &lt;/key-property&gt;
&lt;/composite-id&gt;    

&lt;property
    name=&quot;ddd&quot;
    type=&quot;java.lang.String&quot;
    column=&quot;ddd&quot;
    length=&quot;5&quot;
&gt;
    &lt;meta attribute=&quot;field-description&quot;&gt;
       @hibernate.property
        column=&quot;ddd&quot;
        length=&quot;5&quot;
    &lt;/meta&gt;    
&lt;/property&gt;
&lt;property
    name=&quot;numero&quot;
    type=&quot;java.lang.String&quot;
    column=&quot;numero&quot;
    length=&quot;30&quot;
&gt;
    &lt;meta attribute=&quot;field-description&quot;&gt;
       @hibernate.property
        column=&quot;numero&quot;
        length=&quot;30&quot;
    &lt;/meta&gt;    
&lt;/property&gt;
&lt;property
    name=&quot;observacao&quot;
    type=&quot;java.lang.String&quot;
    column=&quot;observacao&quot;
    length=&quot;-1&quot;
&gt;
    &lt;meta attribute=&quot;field-description&quot;&gt;
       @hibernate.property
        column=&quot;observacao&quot;
        length=&quot;-1&quot;
    &lt;/meta&gt;    
&lt;/property&gt;

&lt;!-- Associations --&gt;
&lt;!-- derived association&#40;s&#41; for compound key --&gt;
&lt;!-- bi-directional many-to-one association to Contato --&gt;
&lt;many-to-one
    name=&quot;contato&quot;
    class=&quot;hibernate.Contatos&quot;
    update=&quot;false&quot;
    insert=&quot;false&quot;
&gt;
    &lt;meta attribute=&quot;field-description&quot;&gt;
       @hibernate.many-to-one
        update=&quot;false&quot;
        insert=&quot;false&quot;
    &lt;/meta&gt;
    &lt;meta attribute=&quot;field-description&quot;&gt;
       @hibernate.column
        name=&quot;codigo_contato&quot;
    &lt;/meta&gt;
	&lt;column name=&quot;codigo_contato&quot; /&gt;
&lt;/many-to-one&gt;

&lt;!-- end of derived association&#40;s&#41; --&gt;

&lt;!-- bi-directional many-to-one association to TipoTelefone --&gt;
&lt;many-to-one
    name=&quot;tipoTelefone&quot;
    class=&quot;hibernate.TipoTelefone&quot;
    not-null=&quot;true&quot;
&gt;
    &lt;meta attribute=&quot;field-description&quot;&gt;
       @hibernate.many-to-one
        not-null=&quot;true&quot;
       @hibernate.column name=&quot;codigo_tipo_telefone&quot;         
    &lt;/meta&gt;
    &lt;column name=&quot;codigo_tipo_telefone&quot; /&gt;
&lt;/many-to-one&gt;

</class>
</hibernate-mapping>
[/code]
só pra esclarecer meus codigos fontes estão dentro da pasta jdo e os
.hbm.xml dentro da pasta hibernate [/quote]

se as suas classes estão no pacote jdo seu mapeamento esta errado…

onde tem
hibernate.TelefoneContatos

tu deve mudar para

jdo.TelefoneContatos

isso se o pacote jdo estiver na raiz das suas package…vc tem q por o caminho completo da classe…para facilitar, dentro da sua classe, na primeira linha dela, tem o caminho completo da package q ela se encontra…

flw

blz, era isso mesmo!
mas agora to com outro erro q é o seguinte

org.hibernate.PropertyNotFoundException&#58; Could not find a getter for comp_id in class jdo.Telefones at org.hibernate.property.BasicPropertyAccessor.createGetter&#40;BasicPropertyAccessor.java&#58;282&#41; at org.hibernate.property.BasicPropertyAccessor.getGetter&#40;BasicPropertyAccessor.java&#58;275&#41; at org.hibernate.tuple.PropertyFactory.getGetter&#40;PropertyFactory.java&#58;168&#41; at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty&#40;PropertyFactory.java&#58;44&#41; at org.hibernate.tuple.entity.EntityMetamodel.&lt;init&gt;&#40;EntityMetamodel.java&#58;118&#41; at org.hibernate.persister.entity.AbstractEntityPersister.&lt;init&gt;&#40;AbstractEntityPersister.java&#58;425&#41; at org.hibernate.persister.entity.SingleTableEntityPersister.&lt;init&gt;&#40;SingleTableEntityPersister.java&#58;109&#41; at org.hibernate.persister.PersisterFactory.createClassPersister&#40;PersisterFactory.java&#58;55&#41; at org.hibernate.impl.SessionFactoryImpl.&lt;init&gt;&#40;SessionFactoryImpl.java&#58;226&#41; at org.hibernate.cfg.Configuration.buildSessionFactory&#40;Configuration.java&#58;1218&#41;
mas na minha classe jdo.Telefones eu tenho setCompId e getCompId e o meu mapeamento da classe telefones é o seguinte

[code]<hibernate-mapping>
<!–
Created by the Middlegen Hibernate plugin 2.1

http&#58;//boss.bekk.no/boss/middlegen/
http&#58;//www.hibernate.org/

–>

<class
name="jdo.Telefones"
table="telefones"
>
<meta attribute="class-description" inherit="false">
@jdoclass
table="telefones"
</meta>

&lt;composite-id name=&quot;comp_id&quot; class=&quot;hibernate.TelefonePk&quot;&gt;
    &lt;meta attribute=&quot;field-description&quot; inherit=&quot;false&quot;&gt;
       @hibernate.id
        generator-class=&quot;assigned&quot;
    &lt;/meta&gt;
    &lt;key-property 
        name=&quot;codigoLigacao&quot; 
        column=&quot;codigo_ligacao&quot; 
        type=&quot;java.lang.Integer&quot;
        length=&quot;4&quot;
    &gt;
        &lt;meta attribute=&quot;field-description&quot;&gt;
           @hibernate.property
            column=&quot;codigo_ligacao&quot;
        &lt;/meta&gt; 
    &lt;/key-property&gt;
    &lt;key-property 
        name=&quot;codigoTelefone&quot; 
        column=&quot;codigo_telefone&quot; 
        type=&quot;java.lang.Integer&quot;
        length=&quot;4&quot;
    &gt;
        &lt;meta attribute=&quot;field-description&quot;&gt;
           @hibernate.property
            column=&quot;codigo_telefone&quot;
        &lt;/meta&gt; 
    &lt;/key-property&gt;
&lt;/composite-id&gt;    

&lt;property
    name=&quot;ddd&quot;
    type=&quot;java.lang.String&quot;
    column=&quot;ddd&quot;
    length=&quot;5&quot;
&gt;
    &lt;meta attribute=&quot;field-description&quot;&gt;
       @hibernate.property
        column=&quot;ddd&quot;
        length=&quot;5&quot;
    &lt;/meta&gt;    
&lt;/property&gt;
&lt;property
    name=&quot;numero&quot;
    type=&quot;java.lang.String&quot;
    column=&quot;numero&quot;
    length=&quot;30&quot;
&gt;
    &lt;meta attribute=&quot;field-description&quot;&gt;
       @hibernate.property
        column=&quot;numero&quot;
        length=&quot;30&quot;
    &lt;/meta&gt;    
&lt;/property&gt;
&lt;property
    name=&quot;observacao&quot;
    type=&quot;java.lang.String&quot;
    column=&quot;observacao&quot;
    length=&quot;-1&quot;
&gt;
    &lt;meta attribute=&quot;field-description&quot;&gt;
       @hibernate.property
        column=&quot;observacao&quot;
        length=&quot;-1&quot;
    &lt;/meta&gt;   
&lt;/property&gt;

&lt;!-- Associations --&gt;
&lt;!-- derived association&#40;s&#41; for compound key --&gt;
&lt;!-- bi-directional many-to-one association to Ligacoe --&gt;
&lt;many-to-one
    name=&quot;ligacoes&quot;
    class=&quot;jdo.Ligacoes&quot;
    update=&quot;false&quot;
    insert=&quot;false&quot;
&gt;
    &lt;meta attribute=&quot;field-description&quot;&gt;
       @hibernate.many-to-one
        update=&quot;false&quot;
        insert=&quot;false&quot;
    &lt;/meta&gt;
    &lt;meta attribute=&quot;field-description&quot;&gt;
       @hibernate.column
        name=&quot;codigo_ligacao&quot;
    &lt;/meta&gt;
	&lt;column name=&quot;codigo_ligacao&quot; /&gt;
&lt;/many-to-one&gt;

&lt;!-- end of derived association&#40;s&#41; --&gt;

&lt;!-- bi-directional many-to-one association to TipoTelefone --&gt;
&lt;many-to-one
    name=&quot;tipoTelefone&quot;
    class=&quot;jdo.TipoTelefone&quot;
    not-null=&quot;true&quot;
&gt;
    &lt;meta attribute=&quot;field-description&quot;&gt;
       @hibernate.many-to-one
        not-null=&quot;true&quot;
       @hibernate.column name=&quot;codigo_tipo_telefone&quot;         
    &lt;/meta&gt;
    &lt;column name=&quot;codigo_tipo_telefone&quot; /&gt;
&lt;/many-to-one&gt;

</class>
</hibernate-mapping>
[/code]
o erro esta na chave composta o q eu estou fazendo de errado?

achei o erro! tem q colocar exatamente como esta no mapeamento, claro!!!
eu fiz setCompId e getCompId, mas é setcomp_id e getcomp_id!
valeu!!!