These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate issue in netbeans application
PostPosted: Fri Apr 23, 2010 8:01 am 
Newbie

Joined: Fri Apr 23, 2010 7:43 am
Posts: 1
Hi,
I am using hibernate to create mapping between my JPA classes and MYSQL database.
But I always get the following error while instantiating the EntityManager class
Quote:
EntityManager entityManager = Persistence.createEntityManagerFactory("CustomerLibraryPU").createEntityManager();

java.lang.NoSuchMethodError: org.hibernate.cfg.AnnotationConfiguration.getReflectionManager()Lorg/hibernate/reflection/ReflectionManager;

I think it is because of the different versions of the Hibernate jars I am using ,
needed more information related to the compatibility matrix for the different hibernate jars:

just mentioning the hibernate jar versions I am using:
hibernate3.jar -->Implementation-Version: 3.2.5.ga
hibernate-annotations.jar -->Implementation-Version: 3.3.1.GA
hibernate-commons-annotations.jar -->Version: 3.0.0.GA
hibernate-entitymanager.jar --> Version: 3.2.0.GA
hibernate-validator-3.0.0.ga.jar --> Version: 3.0.0.GA
jboss-archive-browsing.jar --> Implementation-Version: 2.0.2.Alpha
I am using netbeans IDE for my application development.

adding the "Stack trace" for full description about the issue
Stack trace:
Caused: java.lang.NoSuchMethodError: org.hibernate.cfg.AnnotationConfiguration.getReflectionManager()Lorg/hibernate/reflection/ReflectionManager;
at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:156)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:847)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:178)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:235)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:120)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
at com.sdx.cps.customerviewer.CustomerTopComponent.callDB(CustomerTopComponent.java:155)
at com.sdx.cps.customerviewer.CustomerTopComponent.<init>(CustomerTopComponent.java:33)
at com.sdx.cps.customerviewer.CustomerTopComponent.getDefault(CustomerTopComponent.java:90)
Caused: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.netbeans.modules.settings.convertors.XMLSettingsSupport$SettingsRecognizer.createFromMethod(XMLSettingsSupport.java:670)
Caused: java.io.IOException: Error reading MultiFileObject@82a13a[Windows2Local/Components/CustomerTopComponent.settings]
at org.netbeans.modules.settings.convertors.XMLSettingsSupport$SettingsRecognizer.createFromMethod(XMLSettingsSupport.java:678)
at org.netbeans.modules.settings.convertors.XMLSettingsSupport$SettingsRecognizer.instanceCreate(XMLSettingsSupport.java:581)
at org.netbeans.modules.settings.convertors.SerialDataConvertor$SettingsInstance.instanceCreate(SerialDataConvertor.java:420)
at org.netbeans.core.windows.persistence.PersistenceManager.getTopComponentPersistentForID(PersistenceManager.java:530)
at org.netbeans.core.windows.persistence.PersistenceManager.getTopComponentForID(PersistenceManager.java:640)
at org.netbeans.core.windows.PersistenceHandler.getTopComponentForID(PersistenceHandler.java:457)
at org.netbeans.core.windows.PersistenceHandler.load(PersistenceHandler.java:160)
at org.netbeans.core.windows.WindowSystemImpl.load(WindowSystemImpl.java:77)
at org.netbeans.core.NonGui$2.run(NonGui.java:177)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:125)
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)
[catch] at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.