Erro no Hibernate (Urgente)

Pessoal, to usando hibernate aqui e quando ele passa pela seguinte instrução:

sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory();

gera o seguinte erro:

04/06/2009 10:25:15 org.hibernate.cfg.annotations.Version
INFO: Hibernate Annotations 3.3.1.GA
04/06/2009 10:25:16 org.hibernate.cfg.Environment
INFO: Hibernate 3.2.5
04/06/2009 10:25:16 org.hibernate.cfg.Environment
INFO: hibernate.properties not found
04/06/2009 10:25:16 org.hibernate.cfg.Environment buildBytecodeProvider
INFO: Bytecode provider name : cglib
04/06/2009 10:25:16 org.hibernate.cfg.Environment
INFO: using JDK 1.4 java.sql.Timestamp handling
04/06/2009 10:25:16 org.hibernate.cfg.Configuration configure
INFO: configuring from resource: /hibernate.cfg.xml
04/06/2009 10:25:16 org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: Configuration resource: /hibernate.cfg.xml
04/06/2009 10:25:16 org.hibernate.cfg.Configuration doConfigure
INFO: Configured SessionFactory: null
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.UsuarioView
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.UsuarioView on table USUARIO_VIEW
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.PspObjetivo
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspObjetivo on table PSP_OBJ_EST
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.PspResponsavel
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspResponsavel on table PSP_RESP
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.PspDiretriz
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspDiretriz on table PSP_DIR_LP
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.UtilCgRefCodes
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.UtilCgRefCodes on table CG_REF_CODES
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.PspTipoBaseTerr
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspTipoBaseTerr on table PSP_TIPO_BASE_TERR
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.PspTipoBeneficios
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspTipoBeneficios on table PSP_TIPO_BENEFICIOS
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.PspTipoEnt
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspTipoEnt on table PSP_TIPO_ENT
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.PspTipoEventos
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspTipoEventos on table PSP_TIPO_EVENTOS
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.PspTipoFormEntEnv
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspTipoFormEntEnv on table PSP_TIPO_FORM_ENT_ENV
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.PspTipoProvidencias
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspTipoProvidencias on table PSP_TIPO_PROVIDENCIAS
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.PspTipoRecAloc
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspTipoRecAloc on table PSP_TIPO_REC_ALOC
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.PspTipoRestricoes
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspTipoRestricoes on table PSP_TIPO_RESTRICOES
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.PspEntEnvol
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspEntEnvol on table PSP_ENT_ENVOL
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.PspUniInd
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspUniInd on table PSP_UNI_IND
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.PspMeta
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspMeta on table PSP_META
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.PspFasesGeren
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspFasesGeren on table PSP_FASES_GEREN
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.PspTema
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspTema on table PSP_TEMA
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.PspInic
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspInic on table PSP_INIC
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.PspBaseTerr
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspBaseTerr on table PSP_BASE_TERR
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.PspCategInic
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspCategInic on table PSP_CATEG_INIC
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.PspBeneficios
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspBeneficios on table PSP_BENEFICIOS
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.PspDirObj
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspDirObj on table PSP_ASS_OBJ_DIR
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.PspAssTemaBase
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspAssTemaBase on table PSP_ASS_TEMA_BASE_TERR
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.PspIndicador
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspIndicador on table PSP_INDICADOR
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.PspLegen
04/06/2009 10:25:16 org.hibernate.cfg.annotations.QueryBinder bindQuery
INFO: Binding Named query: PspLegen.findAll => SELECT p FROM PspLegen p
04/06/2009 10:25:16 org.hibernate.cfg.annotations.QueryBinder bindQuery
INFO: Binding Named query: PspLegen.findBySeqLegen => SELECT p FROM PspLegen p WHERE p.seqLegen = :seqLegen
04/06/2009 10:25:16 org.hibernate.cfg.annotations.QueryBinder bindQuery
INFO: Binding Named query: PspLegen.findBySigLegen => SELECT p FROM PspLegen p WHERE p.sigLegen = :sigLegen
04/06/2009 10:25:16 org.hibernate.cfg.annotations.QueryBinder bindQuery
INFO: Binding Named query: PspLegen.findByNomLegen => SELECT p FROM PspLegen p WHERE p.nomLegen = :nomLegen
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspLegen on table PSP_LEGEN
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.PspAssMetaIndRr
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspAssMetaIndRr on table PSP_ASS_META_IND_RR
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.PspIndRr
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspIndRr on table PSP_IND_RR
04/06/2009 10:25:16 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: br.gov.sp.planejamento.planejasp.beans.PspAssFxAvalIndRr
04/06/2009 10:25:16 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspAssFxAvalIndRr on table PSP_ASS_FX_AVAL_IND_RR
Exception in thread “main” java.lang.ExceptionInInitializerError
at br.gov.sp.planejamento.planejasp.dao.PspResponsavelDao.(PspResponsavelDao.java:23)
at br.gov.sp.planejamento.planejasp.bo.PspResponsavelBo.incluir(PspResponsavelBo.java:39)
at br.gov.sp.planejamento.planejasp.teste.dao.TestaInsertBO.main(TestaInsertBO.java:392)
Caused by: java.lang.NullPointerException
at org.hibernate.cfg.AnnotationConfiguration.processFkSecondPassInOrder(AnnotationConfiguration.java:440)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:304)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1286)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:859)
at br.gov.sp.planejamento.planejasp.hibernate.HibernateUtil.(HibernateUtil.java:20)
… 3 more
Java Result: 1

Alguem pode me ajudar?

Desde ja agradeço.

Alguem ??? ?

Rapaz, essa stack não é muito esclarecedora…

INFO: Bind entity br.gov.sp.planejamento.planejasp.beans.PspAssFxAvalIndRr on table PSP_ASS_FX_AVAL_IND_RR

Exception in thread “main” java.lang.ExceptionInInitializerError
at br.gov.sp.planejamento.planejasp.dao.PspResponsavelDao.<init>(PspResponsavelDao.java:23)
at br.gov.sp.planejamento.planejasp.bo.PspResponsavelBo.incluir(PspResponsavelBo.java:39)
at br.gov.sp.planejamento.planejasp.teste.dao.TestaInsertBO.main(TestaInsertBO.java:392)

Caused by: java.lang.NullPointerException
at org.hibernate.cfg.AnnotationConfiguration.processFkSecondPassInOrder(AnnotationConfiguration.java:440)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:304)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1286)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:859)
at br.gov.sp.planejamento.planejasp.hibernate.HibernateUtil.<clinit>(HibernateUtil.java:20)

seu método incluir da classe PspResponsavelBo está soltando um NullPointer, voce tem que ver o que ele esta referenciando… um debug no metodo cairia bem.

Vou dar uma olhada, valeu

Aew pessoal.

Estou com o seguinte erro no momento em que quero criar os Arquivos de mapeamento do Hibernate e POJOS de bancos de dados.
Esse erro ocorre quando clico em finalizar na tela do procedimento acima.

Segue erro:

java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.cfg.JDBCMetaDataConfiguration
at org.netbeans.modules.hibernate.wizards.HibernateCodeGenWizard.generateClasses(HibernateCodeGenWizard.java:308)
at org.netbeans.modules.hibernate.wizards.HibernateCodeGenWizard.instantiate(HibernateCodeGenWizard.java:416)
at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1016)
at org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:588)
at org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:409)
at org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:253)
at org.openide.loaders.TemplateWizardIteratorWrapper.instantiate(TemplateWizardIteratorWrapper.java:165)
at org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1538)
at org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1495)
at org.openide.WizardDescriptor.access$1700(WizardDescriptor.java:127)
at org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:2066)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:602)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1084)

O que está em negrito já pesquisei, mas não consegui nenhuma solução.

Alguém pode me ajudar?
Desde já agradeço…