Hibernate class not found problem

Hello!
I am new to vaadin. I have been worked a lot with GWT. At the moment I try to insert a record to the database. After I haved filled the form and pressed the submit button I get the following error:


com.vaadin.event.ListenerMethod$MethodException
Cause: java.lang.NoClassDefFoundError: javax/persistence/EntityListeners
	at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:507)
	at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:161)
	at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1154)
	at com.vaadin.ui.Button.fireClick(Button.java:371)
	at com.vaadin.ui.Button.changeVariables(Button.java:193)
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1094)
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:590)
	at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:266)
	at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:476)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:163)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:556)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:401)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:242)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:267)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:245)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:260)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: javax/persistence/EntityListeners
	at org.hibernate.cfg.annotations.reflection.JPAMetadataProvider.getDefaults(JPAMetadataProvider.java:96)
	at org.hibernate.annotations.common.reflection.java.JavaReflectionManager.getDefaults(JavaReflectionManager.java:226)
	at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1355)
	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1826)
	at at.nettania.dev.admanager.hibernate.SessionFactoryUtil.<clinit>(SessionFactoryUtil.java:20)
	at at.nettania.dev.admanager.hibernate.PowershellCommandHibernate.storePowershellCommand(PowershellCommandHibernate.java:22)
	at at.nettania.dev.admanager.core.PowershellCommand.storePowershellCommand(PowershellCommand.java:39)
	at at.nettania.dev.admanager.vi.PowershellCommandForm$1.buttonClick(PowershellCommandForm.java:49)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:487)
	... 25 more
Caused by: java.lang.ClassNotFoundException: javax.persistence.EntityListeners
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1666)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1511)
	... 38 more

The application does not find the javax.persistence class. But however if I create a class with a main method and try to add a record manually it is working. Therefor the problem only occurs if I try to add a record by a form in the webapplication.

I hope someone can help me, what am I doing from. I am using hibernate 3.5.

Thanks for your help

Hello!
It is working now. I have restartet my computer and as well Eclipse and now it is working. I think there must be an error with the loading of the jar files into the tomcat instance.

Solution:
Restart the computer and the tomcat server including eclipse.

Florian