não consigo usar o hibernate no eclipse

0 respostas
Fabaum
Galera que manja de JAVA mais do que eu… faz três longos dias que to tentando usar o hibernate no eclipse, já li muuuuuito material disponivel na net mas nada… já fiz boa parte (coloquei o plugin no eclipse, já setei o classpath no eclipse com os jars do hibernate, criei os arquivos .hbm.xml e cfg.xml)…MAS NA HORA DE RODAR A APLICAÇÃO DÁ O SEGUINTE ERRO NO CONSOLE DO ECLIPSE:

Exception in thread “AWT-EventQueue-0” java.lang.ExceptionInInitializerError

at org.hibernate.cfg.Configuration.reset(Configuration.java:168 )

at org.hibernate.cfg.Configuration.(Configuration.java:187)

at org.hibernate.cfg.Configuration.(Configuration.java:191)

at persistencia.SaudeFactory.(SaudeFactory.java:13)

at visao.Login$3.run(Login.java:206)

at java.awt.event.InvocationEvent.dispatch(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.run(Unknown Source)

Caused by: java.lang.NullPointerException

at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:144)

at org.hibernate.cfg.Environment.(Environment.java:515)

… 13 more

PEGUEI UM EXEMPLO PRONTO DE UMA APLICAÇÃO QUE USA HIBERNATE E TÁ DANDO O MESMO ERRO NA HORA DE EXECUTAR.

OBS: ESSE nullPointerException ocorre quando tento instanciar o objecto da classe Configuration() do Hibernate.

Se alguém souber o que está acontencendo e puder me dar uma força ficaria grato!

Criado 20 de agosto de 2007
Respostas 0
Participantes 1