Olá Pessoal,
Rescentemente comecei s estudar hibernate, no próprio fórum encontrei conteúdos muito bom para quem esta iniciando, vi no link
o documento em pdf, por sinal ótimo:<a href="//www.guj.com.br/java.tutorial.artigo.174.1.guj">http://www.guj.com.br/java.tutorial.artigo.174.1.guj</a> . Assim tentei reproduzir como esta no documento,
porém esta ocorrendo erros, segue abaixo:
run:
24/09/2010 13:41:54 org.hibernate.cfg.Environment
INFO: Hibernate 3.2.5
24/09/2010 13:41:54 org.hibernate.cfg.Environment
INFO: hibernate.properties not found
24/09/2010 13:41:54 org.hibernate.cfg.Environment buildBytecodeProvider
INFO: Bytecode provider name : cglib
24/09/2010 13:41:54 org.hibernate.cfg.Environment
INFO: using JDK 1.4 java.sql.Timestamp handling
24/09/2010 13:41:54 org.hibernate.cfg.Configuration configure
INFO: configuring from resource: hibernate.cfg.xml
24/09/2010 13:41:54 org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: Configuration resource: hibernate.cfg.xml
24/09/2010 13:41:54 org.hibernate.cfg.Configuration addResource
INFO: Reading mappings from resource : Turma.hbm.xml
24/09/2010 13:41:54 org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
INFO: Mapping class: Turma -> Turma
24/09/2010 13:41:55 org.hibernate.cfg.HbmBinder bindCollection
INFO: Mapping collection: Turma.alunos -> Turma_has_Aluno
24/09/2010 13:41:55 org.hibernate.cfg.Configuration addResource
INFO: Reading mappings from resource : Pessoa.hbm.xml
24/09/2010 13:41:55 org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
INFO: Mapping class: Pessoa -> Pessoa
24/09/2010 13:41:55 org.hibernate.cfg.Configuration addResource
INFO: Reading mappings from resource : Aluno.hbm.xml
24/09/2010 13:41:55 org.hibernate.cfg.HbmBinder bindJoinedSubclass
INFO: Mapping joined-subclass: Aluno -> Aluno
24/09/2010 13:41:55 org.hibernate.cfg.HbmBinder bindCollection
INFO: Mapping collection: Aluno.turmas -> Turma_has_Aluno
24/09/2010 13:41:55 org.hibernate.cfg.Configuration addResource
INFO: Reading mappings from resource : Professor.hbm.xml
24/09/2010 13:41:55 org.hibernate.cfg.HbmBinder bindJoinedSubclass
INFO: Mapping joined-subclass: Professor -> Professor
24/09/2010 13:41:55 org.hibernate.cfg.Configuration addResource
INFO: Reading mappings from resource : Endereco.hbm.xml
24/09/2010 13:41:55 org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
INFO: Mapping class: Endereco -> Endereco
24/09/2010 13:41:55 org.hibernate.cfg.Configuration doConfigure
INFO: Configured SessionFactory: null
24/09/2010 13:41:55 org.hibernate.cfg.HbmBinder bindCollectionSecondPass
INFO: Mapping collection: Professor.turmas -> Turma
org.hibernate.MappingException: An association from the table Turma refers to an unmapped class: Disciplina
at org.hibernate.cfg.Configuration.secondPassCompileForeignKeys(Configuration.java:1252)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1170)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1286)
Estou usando netbeans e postgres,
:thumbup:Se puderem me ajudar desde já agradeço, fui —>
