1. EJB3 CMP + programmatic configuration of Hibernate AnnotationConfiguration stackoverflow.comI use EJB3 container managed persistence i.e an EntityManager is injected via @PersistenceContext annotation. The persistent context then may be propagated to nested EJBs. Transactions are also managed by the contaner ... |
2. Hibernate - AnnotationConfiguration deprecated stackoverflow.comI am using Hibernate in version 3.6.0 and the AnnotationConfiguration is marked as deprecated. Here is the the line in my HibernateUtil.java class:
What's the replacement for AnnotationConfiguration?
Best Regards Tim.
... |
3. Where should I put the call to the Hibernate annotationConfiguration() to this be called only once? stackoverflow.comI have in my web application some java beans (EJB 3.1) that make use of Hibernate SessionFactory and therefore I need to centralize the creation of this object since I just ... |
4. Unknown entity problem in Hibernate with AnnotationConfiguration stackoverflow.comI've been googling for this problem from last 2 days but havent found any proper solution. I am developing a desktop application with Hibernate. I am using AnnotationConfiguration for registering entities ... |
5. Hibernate: An AnnotationConfiguration instance is required to use ... error stackoverflow.comI build my HibernateUtil this way :
|
6. NoSuchMethodError: AnnotationConfiguration.setProperty forum.hibernate.orgI added a testNG test very similar to EJB3IntegrationTest CaveatEmptor-JPA Hibernate sample to my current project. It's not a smooth ride. Finally, I still get the following error (ANT testng task output). Hibernate version are as the followings: Hibernate-core: 3.2 Hibernate-annotation: 3.3 Hibernate-entitymanager: 3.3.2 Hibernate-validator: 3.0.0. I do see org.hibernate.cfg.AnnotationConfiguration.setProperty(Ljava/lang/String;Ljava/lang/String;) in the Javadoc. Appreciate if somebody can help. Code: [testng] 13:11:42,634 ... |
7. AnnotationConfiguration Null pointer Exception forum.hibernate.orgHi, Its looks simple but strange and not able to find why this null pointer exception when making AnnotationConfiguration object. FirstExample.java ============= package roseindia.tutorial.hibernate; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import org.hibernate.cfg.AnnotationConfiguration; public class FirstExample { public static void main(String[] args) { Session session = null; try{ System.out.println("before annotation"); AnnotationConfiguration cfg=new AnnotationConfiguration(); System.out.println("after annotation"); SessionFactory sessionFactory =cfg.configure().buildSessionFactory(); session =sessionFactory.openSession(); //Create new ... |
8. [SOLVED] AnnotationConfiguration to use persistence.xml forum.hibernate.orgHello ... I was wondering if anyone knows a way to use the AnnotationConfiguration class in a manner that makes it use the persistence.xml file instead of the hibernate.cfg.xml file. I'm doing an app that does not use JBoss Seam or Struts or Spring or anything. I'm just using a servlet (pretty bare bones I know) to do this: Code: ... |
9. AnnotationConfiguration, could not save/update data forum.hibernate.orgpublic class UserDAO { private Session sess; public UserDAO() { AnnotationConfiguration ac = new AnnotationConfiguration(); ac.addAnnotatedClass(User.class); sess = ac.configure().openSession(); } public void saveOrUpdate(User user, String name) { user.setName(name); sess.saveOrUpdate(user); ... |
10. Error while initting AnnotationConfiguration forum.hibernate.orgNewbie Joined: Tue Jul 27, 2010 11:48 am Posts: 1 Hi all :) I'm having some issues getting Hibernate Annotations to work with my Vaadin project. I have the feeling it has something to do with my use of maven, as the error I get seems to come from the bytecode inserter used by Hibernate Annotations. If I try to setup ... |
11. Auxillary database-object & AnnotationConfiguration forum.hibernate.org |
12. AnnotationConfiguration.setProperties() method broken? forum.hibernate.orgHibernate version: hibernate-3.0beta1, hibernate-annotations-3.0alpha1 I am trying to programmatically configure the properties of my AnnotationConfiguration like the following. AnnotationConfiguration ac = new AnnotationConfiguration(); Properties p = new Properties(); p.put("hibernate.dialect", "org.hibernate.dialect.SQLServerDialect"); p.put("hibernate.connection.driver_class", "com.inet.tds.TdsDriver"); p.put("hibernate.connection.url", "jdbc:inetdae7:...?database=..."); p.put("hibernate.connection.username", "..."); p.put("hibernate.connection.password", "..."); p.put("hibernate.show_sql", "true"); ac.setProperties(p); ac.addAnnotatedClass(Item.class); ac.addAnnotatedClass(Person.class); ac.addAnnotatedClass(Reservation.class); ac.addAnnotatedClass(User.class); SessionFactory sf = ac.buildSessionFactory(); However, I'm receiving a stack trace like the following. It appears to ... |
13. AnnotationConfiguration forum.hibernate.orgHello, as far as i know you have to add your hbm.xml for each of your files, one by one, exactly the same way as when you where using the org.cfg.Configuration class, but also with the AnnotationConfiguration you could add Classes configuration, those Classes must contain the EJB3-Hibernate annotations to be processed. Also if you're using Spring with hibernate you could ... |
14. @PrePersist is not fired when using AnnotationConfiguration forum.hibernate.orgHello, I have a question about AnnotationConfiguration. I want to configure hiberante through annotations and use @PrePersist and @PreMerge callbacks for entities. I declares class MyEntity: Code: @Entity @Table(name="OBJECTS") public class MyEntity { private Integer objectID; @Id @Column(name="OBJECT_ID") @SequenceGenerator(name="OBJECT_SEQ", sequenceName="OBJECT_SEQ", allocationSize=1) @GeneratedValue(strategy=GenerationType.SEQUENCE, ... |
15. NoSuchMethodError: AnnotationConfiguration.getReflectionMana forum.hibernate.orgHi, I'm trying to use Hibernate throught the JPA standard (EntityManager). It's a very basic example - using Java SE , default mapping, no relationships. I get the following exception: Code: Exception in thread "main" java.lang.NoSuchMethodError: org.hibernate.cfg.AnnotationConfiguration.getReflectionManager()Lorg/hibernate/annotations/common/reflection/ReflectionManager; at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:152) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:888) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:186) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:246) at ... |
16. AnnotationConfiguration().addPackage(packageName) forum.hibernate.orgFile configFile = new File(hibernateConfigurationFile); SessionFactory sessionFactory = null; if(packageName != null) { System.out.println("Package name: " + packageName); System.out.println("Hibernate configuration file: " + hibernateConfigurationFile); sessionFactory = new AnnotationConfiguration().addPackage(packageName).configure(configFile) .buildSessionFactory(); } else { sessionFactory ... |
17. An AnnotationConfiguration instance is required to use (...) forum.hibernate.org |
18. Problem with hibernate AnnotationConfiguration forum.hibernate.orgHi all, I have the following in hibernation.cfg.xml file ?xml version='1.0' encoding='utf-8'?> |
19. AnnotationConfiguration does not throw exceptions forum.hibernate.org |
20. AnnotationConfiguration/Configuration problem forum.hibernate.orgHi, When running the app on OSX 10.5.4 all works great and combining xml mappings and Annotated mappings is no problem. When deployed on FEDORA 2 i686 the below exception occurs however. It seems to point to wrong versioning but I tried a number of combinations that all worked locally and none on fedora. Does anyone have more pointers for us? ... |
21. An AnnotationConfiguration instance is required to use<.. forum.hibernate.orgFull stack trace of any exception that occurs: log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment). log4j:WARN Please initialize the log4j system properly. Initial SessionFactory creation failed.org.hibernate.MappingException: An AnnotationConfiguration instance is required to use |
22. Hibernate 3 with annotationConfiguration export xml data ? forum.hibernate.orgHello, I am using Hibernate 3 with a annotation configuration and I wonder if there exists a solution to export the database in xml format that is automatic ? I see the following method : generateSchemaUpdateScript(...) But the data are not contained in this sql line ... How to do ? Do I need a mapping file or other because annotation ... |
23. OutOfMemory exception initializing AnnotationConfiguration forum.hibernate.orgHi I am new to hibernate, I wrote a simple application to store some objects into the backend mysql database. I used eclipse on windows to test this sample and it was working fine with that. Then in order to make the build/run simpler I wrote the ant file so that I can invoke it from command prompt as well. And ... |
24. org.hibernate.MappingException: An AnnotationConfiguration.. forum.hibernate.orgWhile trying to configure a new project using hibernate I get the following error: Caused by: org.hibernate.MappingException: An AnnotationConfiguration instance is required to use |
25. AnnotationConfiguration method not found forum.hibernate.org |
26. Hanging at AnnotationConfiguration:401 - processing fk mappi forum.hibernate.orgHibernate Details : 14:11:19,390 INFO Version:15 - Hibernate Annotations 3.4.0.GA 14:11:19,416 INFO Environment:543 - Hibernate 3.3.1.GA 14:11:19,539 INFO Version:14 - Hibernate Commons Annotations 3.1.0.GA During the call to configuration.buildMappings() i am seeing the following in the log : AnnotationConfiguration:401 - processing fk mappings (*ToOne and JoinedSubclass) and it just hangs ? It looks like some sort of infinite loop is being ... |
27. Problem with hibernate AnnotationConfiguration forums.oracle.com |