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

  • SEARCH
  • Home
  • 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 6731271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:30:31+00:00 2026-05-26T10:30:31+00:00

this is my ApplicationContext.xml. I can’t run my program because of this error: Exception

  • 0

this is my ApplicationContext.xml. I can’t run my program because of this error:

Exception in thread “main” org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sessionFactory’ defined in class path resource [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

I must say that HibernateVoc extends HibernateDaoSupport. I’ve looked at several web pages in search of how to use HibernateDaoSupport, wether these are the correct properties to initialize sessionFactory… I’ve not managed how to work out the problem.

Thanks y’all!

<bean id="datasource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="org.gjt.mm.mysql.Driver" />
<property name="url" value="jdbc:mysql://localhost/voc" />
<property name="username" value="root" />
<property name="password" value="" />
</bean>
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="datasource" />
<property name="mappingResources">
    <list>
        <value>com/ju/voc/domain/words/Word.hbm.xml</value>
        <value>com/ju/voc/domain/categroies/Category.hbm.xml</value>
    </list>
</property>
<property name="hibernateProperties">
    <props>
        <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
    </props>
</property>
</bean>
<bean id="hibernateVoc" class="com.ju.voc.data.HibernateVoc">
<property name="sessionFactory" ref="sessionFactory" />
</bean>

P.S. I’m using Maven, so I download libraries from there.

  • 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-26T10:30:31+00:00Added an answer on May 26, 2026 at 10:30 am

    You are missing the dependency to hibernate.

    Because the spring-orm artifact handles ORM using plain Hibernate, JPA, JDO and iBatis (and it hardly ever makes sense to use them all), all of these depenencies are marked as optional, which means that you have to reference the dependencies in your pom.xml. Here’s how to reference the latest stable version of hibernate core:

    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>3.6.7.Final</version>
    </dependency>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this in my applicationContext.xml <bean class=org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter /> <mvc:annotation-driven conversion-service=conversionService/> <bean id=conversionService class=org.springframework.context.support.ConversionServiceFactoryBean>
I am running NTLM using Spring Security, I am getting the following error org.springframework.beans.factory.NoSuchBeanDefinitionException:
When starting WebSphere, I get this exception: Could not instantiate bean class [org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter]: Constructor
in my applicationContext.xml, this is how I map xml to POJO. how to map
I've got a question regarding the difference between PropertyPlaceholderConfigurer (org.springframework.beans.factory.config.PropertyPlaceholderConfigurer) and normal filters defined
I recently asked this question regarding pulling beans out of an applicationContext. The answer
I find myself using two identical beans in my applicationContext.xml and my applicationContext-test.xml. I'd
in my applicationContext.xml, i put this <bean id=something class=com.to.theController/> in com.to.theController i have this
I am defining a freemarker bean in my applicationContext.xml and this bean needs a
This is a bit of a long shot, but if anyone can figure it

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.