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 1081985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:14:22+00:00 2026-05-16T22:14:22+00:00

Ok log4j and servlet bugs have been fixed. Now I have the following problem:

  • 0

Ok log4j and servlet bugs have been fixed. Now I have the following problem:

Cannot find class [org.springframework.jdbc.datasource.DriverManagerDataSourc

my current web.xml looks like this:

<?xml version="1.0" encoding="UTF-8"?>

<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
         http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">


 <listener>
  <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
 </listener>

 <!--
  <listener>
  <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
 </listener>
  -->

 <!-- Register and setup my servlet xml files here -->

 <servlet>
  <servlet-name>appStore</servlet-name>
  <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  <init-param>
   <param-name>contextConfigLocation</param-name>
   <param-value></param-value>
  </init-param>
 </servlet>

 <servlet-mapping>
  <servlet-name>appStore</servlet-name>
  <url-pattern>*.htm</url-pattern>
 </servlet-mapping>

 <context-param>
  <param-name>contextConfigLocation</param-name>
  <param-value>
   /WEB-INF/zang-file-service.xml
  </param-value>
 </context-param>

</web-app>

And the zang-file-service.xml is below:

<beans xmlns="ht..p://www.springframework.org/schema/beans"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jee="http://www.springframework.org/schema/jee"
 xsi:schemaLocation="h..p://www.springframework.org/schema/beans
       h..p://www.springframework.org/schema/beans/spring-beans-2.5.xsd
       h..p://www.springframework.org/schema/jee
       h..p://www.springframework.org/schema/jee/spring-jee-2.0.xsd">

 <!-- h..p://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.0.xsd -->

 <!-- Config properties files -->

 <!-- Hibernate database stuff -->

 <bean id="propertyConfigurer"
  class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
  <property name="locations">
   <list>
    <value>properties/jdbc.properties</value>
   </list>
  </property>
 </bean>


 <bean id="dataSource1"
  class="org.springframework.jdbc.datasource.DriverManagerDataSourc">
  <property name="driverClassName" value="${database.driver}" />
  <property name="url" value="${database.url}" />
  <property name="username" value="${database.user}" />
  <property name="password" value="${database.password}" />
  <property name="maxActive" value="${database.maxConnections}" />
 </bean>


 <!-- LocalSessionFactoryBean u need to put the hbm files in the WEB-INF/classes 
  root director -->

 <bean id="sessionFactory"
  class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
  <property name="dataSource" ref="dataSource1"></property>
  <property name="mappingResources">
   <list>
    <value>FileObject.hbm.xml</value>
   </list>
  </property>
  <property name="hibernateProperties">
   <props>
    <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
    <prop key="hibernate.show_sql">true</prop>
    <prop key="hibernate.hbm2ddl.auto">create</prop>
   </props>
  </property>
 </bean>


 <bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
  <property name="sessionsFactory" ref="sessionFactory"></property>
 </bean>

 <bean id="fileDownload" class="com.kc.models.FileManipulator">
  <property name="dbTemplate" ref="hibernateTemplate"></property>
 </bean>

</beans>

edit: here is my jdbc/properties file

# DB properties file

database.url=jdbc:mysql://localhost:3306/zangshop
database.driver=com.mysql.jdbc.Driver
database.user=XXXX
database.password=XXXX
database.maxConnections=25

EDIT: Full error from tomcat

SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.jdbc.datasource.DriverManagerDataSourc] for bean with name 'dataSource1' defined in ServletContext resource [/WEB-INF/zang-file-service.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.jdbc.datasource.DriverManagerDataSourc
    at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1141)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:524)
    at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1177)
    at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:758)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:422)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4323)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4771)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:785)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:763)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:558)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:987)
    at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:540)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1390)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:355)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
    at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:312)
    at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:292)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:998)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:772)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:990)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:275)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:424)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:648)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:576)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415)
Caused by: java.lang.ClassNotFoundException: org.springframework.jdbc.datasource.DriverManagerDataSourc
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1664)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1509)
    at org.springframework.util.ClassUtils.forName(ClassUtils.java:211)
    at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:385)
    at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1138)
    ... 41 more
  • 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-16T22:14:23+00:00Added an answer on May 16, 2026 at 10:14 pm

    You have missed the last letter in the class name. It should be:

    class="org.springframework.jdbc.datasource.DriverManagerDataSource"
    

    In order to get some compile-time validation for spring configuration you can try the SpringSource Tool Suite (STS)

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

Sidebar

Related Questions

I have this log4j configuration in my grails config.groovy log4j = { error 'org.codehaus.groovy.grails.web.servlet',
The log4j logs I have contain timestamps in the following format: 2009-05-10 00:48:41,905 I
I'm trying to use log4j my log4j.propreties: log4j.rootLogger=DEBUG, out log4j.logger.org.springframework=INFO log4j.logger.org.apache.activemq=INFO log4j.logger.org.apache.activemq.spring=WARN log4j.logger.org.apache.servicemix=DEBUG, stdout
My servlet-based web-app sometimes fails to close Log4j log files when redeployed, leaking to
Using log4j, I used to have an appender that logs directly to one of
I'm new to Servlet containers and have created a web application using Tomcat 6.0.26.
I have a Java class which uses Apache POI to generate reports in Excel.
I have Java servlet-based web applications. I would like to implement some operations in
I have a problem with Tomcat 5.5 and Java EE webapp libraries. I'm using
How do I implement and use log4j/logback in my JSP/Servlet project? What is the

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.