This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Error Creating bean name sessionFactory

Ranch Hand
Posts: 39
PHP Tomcat Server Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello guys,
I am getting this error while Spring MVC and Hibernate integration

SEVERE: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/spring-servlet.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/hibernate/cache/spi/RegionFactory
at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(
at org.springframework.web.servlet.FrameworkServlet.initServletBean(
at org.springframework.web.servlet.HttpServletBean.init(
at javax.servlet.GenericServlet.init(
at org.apache.catalina.core.StandardWrapper.initServlet(
at org.apache.catalina.core.StandardWrapper.loadServlet(
at org.apache.catalina.core.StandardWrapper.load(
at org.apache.catalina.core.StandardContext.loadOnStartup(
at org.apache.catalina.core.StandardContext.startInternal(
at org.apache.catalina.util.LifecycleBase.start(
at org.apache.catalina.core.ContainerBase$
at org.apache.catalina.core.ContainerBase$
at Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$ Source)
at Source)
Caused by: java.lang.NoClassDefFoundError: org/hibernate/cache/spi/RegionFactory
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.privateGetPublicMethods(Unknown Source)
at java.lang.Class.getMethods(Unknown Source)
at org.springframework.beans.ExtendedBeanInfoFactory.supports(
at org.springframework.beans.ExtendedBeanInfoFactory.getBeanInfo(
at org.springframework.beans.CachedIntrospectionResults.<init>(
at org.springframework.beans.CachedIntrospectionResults.forClass(
at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(
at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptorInternal(
at org.springframework.beans.BeanWrapperImpl.isWritableProperty(
... 27 more

This is my spring-servlet.xml

All this error is because of this class "org/hibernate/cache/spi/RegionFactory" but it is present in library.
Spring version: 4.0.4 and Hibernate version 4.3.7
I don't know what I am doin wrong.
Please guys help me !!
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic