This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Object Relational Mapping and the fly likes Issue in hibernate version Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Issue in hibernate version" Watch "Issue in hibernate version" New topic
Author

Issue in hibernate version

manjunath jonna
Greenhorn

Joined: Dec 08, 2009
Posts: 1
I am using spring 2.5.5 and JPA (with hibernate) in my application. I am using 3.3.2 version of hibernate-entitymanager, which has dependency on hibernate 3.2.6. I want to call a stored procedure and return an output value from a stored procedure. There is a method called session.connection() in Session class which can be used to invoke stored procedure. However that method got deprecated.

As an alternative, they have provided a method Session.doWork(), but it is not available in hibernate 3.2.6. So I have updated the hibernate entity manager to 3.4.0, doWork() method is available in this version, but while running the application, I am getting the following error.

>>> 2009-12-07 16:24:24,473+0530 0 main ERROR context.TestContextManager: Caught exception while allowing TestExecutionListener [org.springframework.t
est.context.support.DependencyInjectionTestExecutionListener@1b80e60] to prepare test instance [null(com.aol.microbilling.bulk.domain.ServiceTest)]
java.lang.IllegalStateException: Failed to load ApplicationContext
at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:201)
at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListen
er.java:109)
at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListe
ner.java:75)
at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:255)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:111)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(SpringJUnit4ClassRunner.java:148)
at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:97)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
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.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bulkController': Autowiring of fields failed; neste
d exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: protected com.aol.microbilling.bulk.service.OrderSer
vice com.aol.microbilling.bulk.controller.service.BulkController.orderService; nested exception is org.springframework.beans.factory.BeanCreationExcep
tion: Error creating bean with name 'orderServiceImpl': Autowiring of fields failed; nested exception is org.springframework.beans.factory.BeanCreatio
nException: Could not autowire field: private com.aol.common.persistance.jpa.PersistenceManager com.aol.microbilling.bulk.service.OrderServiceImpl.per
sistenceManager; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'persistenceManager': Inje
ction of persistence methods failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entit
yManagerFactory' defined in URL [file:src/main/webapp/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang
.NoClassDefFoundError: Could not initialize class org.hibernate.ejb.Ejb3Configuration

It is giving an error "Could not initialize class org.hibernate.ejb.Ejb3Configuration".

Any help would be very much appreciated.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Issue in hibernate version