Erro em tempo de execução

E ai pessaol, toh com um erro maluco quando executo o programa, e ñ sei o que eh.

extension-library-variants:
init:
deps-jar:
project-extension-init:
xdoclet-hibernate:
Generating mapping file for data.apsest.
data.apsest
xdoclet-hibernate-build:
Compiling 1 source file to /home/ambrozio/gineco/build/classes
hibernate-resources:
compile:
run:
Exception in thread “AWT-EventQueue-0” java.lang.NoClassDefFoundError: org/hibernate/cfg/AnnotationConfiguration
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:119)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
at forms.apsestf.(apsestf.java:33)
at gineco.jestadosActionPerformed(gineco.java:89)
at gineco.access$000(gineco.java:12)
at gineco$1.actionPerformed(gineco.java:49)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1216)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1257)
at java.awt.Component.processMouseEvent(Component.java:6038)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
at java.awt.Component.processEvent(Component.java:5803)
at java.awt.Container.processEvent(Container.java:2058)
at java.awt.Component.dispatchEventImpl(Component.java:4410)
at java.awt.Container.dispatchEventImpl(Container.java:2116)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
at java.awt.Container.dispatchEventImpl(Container.java:2102)
at java.awt.Window.dispatchEventImpl(Window.java:2429)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

Bom dia ambrozio,

Sua aplicação não está achando a classe org/hibernate/cfg/AnnotationConfiguration. Você adicionou o .jar do hibernate no classpath da máquina ou da sua aplicação?

[]´s

Olá, segue alguns passos pra te ajudar na jornada:

1 - Identificar a origem do problema! Do stack trace acima, o que importa é a linha:
java.lang.NoClassDefFoundError: org/hibernate/cfg/AnnotationConfiguration

2 - Buscar por soluções! Jogue a linha acima (o que está em negrito) no grande mestre google:
http://www.google.com.br/search?q=java.lang.NoClassDefFoundError%3A+org%2Fhibernate%2Fcfg%2FAnnotationConfiguration&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:official&client=firefox-a

3 - Logo no primeiro resultado já temos uma possível solução que aponta pra nada menos que o GUJ !
(isso prova que geralmente buscar antes de postar trazem respostas mais rapidas ! 8) )
http://www.guj.com.br/posts/list/15/32225.java

4 - Na segunda página do post, temos um link interessante, postado por Matheus Tardivo.
Chapter 1. Setting up an annotations project

Bom, resumindo, acho que isso te ajudará !

[code]1.2. Configuration

First, set up your classpath (after you have created a new project in your favorite IDE):

*

  Copy all Hibernate3 core and required 3rd party library files (see lib/README.txt in Hibernate).
*

  Copy hibernate-annotations.jar, lib/hibernate-comons-annotations.jar and lib/ejb3-persistence.jar from the Hibernate Annotations distribution to your classpath as well.[/code]

Acho que está faltando Jar no seu classpath. Não esqueça que annotation é usado com java 5 ou superior.

sucesso!
Roger Leite