Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 551755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:25:40+00:00 2026-05-13T11:25:40+00:00

<bean id=sessionFactory class=org.springframework.orm.hibernate3.LocalSessionFactoryBean> <property name=dataSource ref=dataSource/> <property name=mappingResources> <list> <value>product.hbm.xml</value> </list> </property> <property name=hibernateProperties>

  • 0
  <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="mappingResources">
  <list>
    <value>product.hbm.xml</value>
  </list>
</property>
<property name="hibernateProperties">
  <value>
    hibernate.dialect=org.hibernate.dialect.HSQLDialect
  </value>
</property>

I have this configuration in my applicationContext.xml file

However I get this error when I try to run my application:

Caused by: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name ‘sessionFactory’ defined in
ServletContext resource [/WEB-INF/applicationContext.xml]
Instantiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not
instantiate bean class
[org.springframework.orm.hibernate3.LocalSessionFactoryBean]:
Constructor threw exception; nested exception is
java.lang.NoClassDefFoundError: org/dom4j/DocumentException

So it seems like it’s not recognizing the class LocalSessionFactoryBean. However I when type, import org.springframework.orm.hibernate3.LocalSessionFactoryBean;, eclipse doesn’t complain.

Does anybody have an idea why this is happening?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:25:40+00:00Added an answer on May 13, 2026 at 11:25 am

    I believe the key is this line:

    nested exception is java.lang.NoClassDefFoundError:
    

    org/dom4j/DocumentException

    I would check the classpath to ensure that dom4j is there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok, I have this spring hibernate xml configuration. <bean id=sessionFactory class=org.springframework.orm.hibernate3.LocalSessionFactoryBean> <property name=dataSource ref=dataSource
PersistenceHelper-context.xml <bean id=dataSource class=org.springframework.jdbc.datasource.DriverManagerDataSource> <!----> <property name=driverClassName value=org.hsqldb.jdbc.JDBCDriver/> <property name=url value=jdbc:hsqldb:mem:mydb/> <property name=username value=sa/>
This was working: <bean id=sessionFactory class=org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean> ... but upgrading to the aforementioned versions breaks
We have a Hibernate/Spring application that have the following Spring beans: <bean id=transactionManager class=org.springframework.orm.hibernate3.HibernateTransactionManager
Here is my hibernate config <bean id=datasource class=org.apache.commons.dbcp.BasicDataSource destroy-method=close> <property name=driverClassName value=org.h2.Driver/> <property name=url
Error creating bean with name 'sessionFactory' defined in class path resource [ApplicationContext.xml]: Invocation of
I have Hibernate Transaction manager configured inside Spring MVC controller. <bean id=dataSource class=org.apache.commons.dbcp.BasicDataSource destroy-method=close>
I have a bean mongoService which looks like as <?xml version=1.0 encoding=UTF-8?> <beans xmlns=http://www.springframework.org/schema/beans
How to set a bean property from jsf page before executing this f:event listener:
in common, hibernate sessionfactory is created in spring configuration file (eg spring-dao.xml) like; <bean

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.