-->
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: Error in named queries while using Hibernate as Persistence
PostPosted: Tue Mar 02, 2010 5:51 pm 
Newbie

Joined: Fri Feb 26, 2010 3:56 pm
Posts: 2
When i configured Hibernate as persitence provider in JPA using IBM RSA, and i try to test entities using JUnit , hibernate complains saying "error in Named queries". When i used Openjpa as persistence provider, i dont see any issues. Below is error log.

javax.persistence.PersistenceException: Provider error. Provider: org.hibernate.ejb.HibernatePersistence
at javax.persistence.Persistence.createFactory(Persistence.java:176)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:112)
at mshp.fin.model.jpa.entity.manager.BaseManager.getEntityManager(BaseManager.java:19)
at mshp.fin.model.jpa.util.EntityManagerUtil.getEntityManager(EntityManagerUtil.java:90)
at mshp.fin.model.jpa.entity.controller.test.InvoiceBilledItemManagerTest.testCreateInvoiceBilledItem(InvoiceBilledItemManagerTest.java:65)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at
at javax.persistence.PersistenceException: Provider error. Provider: org.hibernate.ejb.HibernatePersistence
at javax.persistence.Persistence.createFactory(Persistence.java:176)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:112)
at mshp.fin.model.jpa.entity.manager.BaseManager.getEntityManager(BaseManager.java:19)
at mshp.fin.model.jpa.util.EntityManagerUtil.getEntityManager(EntityManagerUtil.java:90)
at mshp.fin.model.jpa.entity.controller.test.InvoiceBilledItemManagerTest.testCreateInvoiceBilledItem(InvoiceBilledItemManagerTest.java:65)


….
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: testPU] Unable to build EntityManagerFactory
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:677)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:126)
at javax.persistence.Persistence.createFactory(Persistence.java:172)
... 23 more
Caused by: org.hibernate.HibernateException: Errors in named queries: getInvoiceRefundByPk_invId2, getInvoiceReconItemByPk_invId2, getInvoiceRefund_ATByInvoiceRefund, getInvoiceBilledItemReconByReconInvoiceBilledItem, getInvoicePABilledItemReconByReconInvoicePABilledItem, getInvoicePABilledItem_ATByInvoicePABilledItem, getInvoiceRefundByPk_rfndId2, getInvoiceBilledItemReconByInvoiceBilledItem, getInvoicePABilledItemReconByInvoicePABilledItem, getInvoicePABilledItemByPk_invId2, getInvoicePayment_ATByInvoicePayment, getInvoiceReconItem_ATByInvoiceReconItem, getInvoiceReconItemByReconInvoiceBilledItem, getInvoiceBilledItemByOrigInvoiceReconItem, getInvoicePABilledItemReconByEgrcInvoicePABilledItem
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:397)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1327)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:859)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
... 25 more

Caused by: javax.persistence.PersistenceException: [PersistenceUnit: testPU] Unable to build EntityManagerFactory
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:677)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:126)
at javax.persistence.Persistence.createFactory(Persistence.java:172)


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.