-
May 9th, 2012, 08:30 AM
#1
SessionFactory configuration problem
Hello everyone! How are you?
I'm starting with Spring and got some problems in a project I am doing here. I am using Spring 3.0.6 along with Hibernate 3.2.5 in NetBeans 7.1.
I decided to use annotation-based configuration to work with Hibernate. I find it easier than programming XML files.
During deployment, my application connects to the database and creates the tables just as expected. But when I run a test file to test the DAOs and insert a new object in the database, I receive an error message regarding the Session Factory, that prevents my Application Context of being correctly loaded.
I have sent to pastebin some of the files I think are important. Please click on the links to check their code.
Just as a reference, the code I pasted as App.java (click here to view) is the one I used to load the application context and instantiate the beans in the XML.
And, well... after running the App.java file showed above, the following log/error message appeared: click here to view.
As you can see, the main exception revealed is a bean creation exception due to and unknown method:
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'sessionFactory' defined in URL [file:C:/Users/Isabela/Documents/MuitoBafao/Code/MuitoBafao/web/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(I)V
Problem is, I didn't even change the SessionFactory XML code. I copied it from a book I am following and just changed the annotated packages.
I have also tried using the property "annotatedClasses" and adding all off them from muitobafao.model, one by one, on the list, but had the same result.
Can anyone please enlighten me? :/
Thanks!
Last edited by toffolo; May 9th, 2012 at 08:39 AM.
Reason: grammar correction :P
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules