aspose file tools
The moose likes Spring and the fly likes Error in Spring 3 application Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Spring
Reply Bookmark "Error in Spring 3 application" Watch "Error in Spring 3 application" New topic
Author

Error in Spring 3 application

Mark Butcher
Ranch Hand

Joined: Jun 28, 2012
Posts: 41
Hi guys,

I have the following error when I run my Spring 3 application :

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: 'configurationClass' must be assignable to [org.hibernate.cfg.Configuration]



Thanks,
Mark
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1282

I don't see a problem with your config (assuming you are using hibernate 3.x)

However the error you are seeing is usually a classpath issue. Your application server may be loading the annotations jar with a different class loader. Try to explicitly add the hibernate annotations jar to your applications classpath.


[How To Ask Questions][Read before you PM me]
Mark Butcher
Ranch Hand

Joined: Jun 28, 2012
Posts: 41
Thanks Bill Gorder, it was a classpath issue, resolved it.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Error in Spring 3 application
 
Similar Threads
login form with database and spring security
spring mvc annotation error
Dependency injection problem
Not able to load properties from file system using spring
Initialization of bean failed;