org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'studentController': Unsatisfied dependency expressed through field 'studentService': Cannot find class [org.apache.commons.dbcp.BasicDataSource] for bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/SpringMvc-servlet.xml]; nested exception is java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.commons.dbcp.BasicDataSource] for bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/SpringMvc-servlet.xml]; nested exception is java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource

Stack Overflow | Crabime | 3 months ago
  1. 0

    org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.commons.dbcp.BasicDataSource]

    Stack Overflow | 3 months ago | Crabime
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'studentController': Unsatisfied dependency expressed through field 'studentService': Cannot find class [org.apache.commons.dbcp.BasicDataSource] for bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/SpringMvc-servlet.xml]; nested exception is java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.commons.dbcp.BasicDataSource] for bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/SpringMvc-servlet.xml]; nested exception is java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource
  2. 0

    Replacement or workaround for org.hibernate.jmx.statisticsservice in hibernate 5.2.1

    Stack Overflow | 4 months ago | karan
    org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.hibernate.jmx.StatisticsService] for bean with name 'clientRegHibernateStatistics' defined in ServletContext resource [/WEB-INF/classes/hibernate-context.xml]; nested exception is java.lang.ClassNotFoundException: org.hibernate.jmx.StatisticsService
  3. 0

    java.lang.ClassNotFoundException: org.hibernate.envers.event.AuditEventListener

    Stack Overflow | 3 months ago | karan
    org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.hibernate.envers.event.AuditEventListener] for bean with name 'auditEventListener' defined in ServletContext resource [/WEB-INF/classes/hibernate-context.xml]; nested exception is java.lang.ClassNotFoundException: org.hibernate.envers.event.AuditEventListener
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    java.lang.ClassNotFoundException: org.apache.commons.dbcp2.datasources

    Stack Overflow | 2 years ago | Naveen V
    org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.commons.dbcp2.datasources] for bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/spring-servlet.xml]; nested exception is java.lang.ClassNotFoundException: org.apache.commons.dbcp2.datasources
  6. 0

    Getting BeanCreationException on server startup. I am using 3.0.5 version of spring with 3.0.1 version of apache tiles

    Stack Overflow | 1 year ago | user1302763
    org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.web.servlet.view.tiles3.TilesConfigurer] for bean with name 'tilesConfigurer' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.web.servlet.view.tiles3.TilesConfigurer

  1. kjhdofjosvs 1 times, last 1 month ago
  2. serious2monkeys 3 times, last 5 months ago
  3. linxiaolong 1 times, last 2 weeks ago
  4. treefolk 3 times, last 2 weeks ago
  5. DoktorDoener666 5 times, last 3 weeks ago
7 more registered users
86 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ClassNotFoundException

    org.apache.commons.dbcp.BasicDataSource

    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass()
  2. Glassfish Core
    WebappClassLoaderBase.loadClass
    1. org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1284)
    2. org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1118)
    2 frames
  3. Spring Core
    ClassUtils.forName
    1. org.springframework.util.ClassUtils.forName(ClassUtils.java:250)
    1 frame
  4. Spring Beans
    DefaultListableBeanFactory.preInstantiateSingletons
    1. org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:394)
    2. org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1402)
    3. org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1349)
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:628)
    5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:597)
    6. org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1450)
    7. org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:446)
    8. org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:424)
    9. org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors(BeanFactoryUtils.java:220)
    10. org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1198)
    11. org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1053)
    12. org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1018)
    13. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:566)
    14. org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
    15. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:349)
    16. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
    17. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
    18. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    19. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    20. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    21. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    22. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    23. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:775)
    23 frames
  5. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861)
    2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)
    2 frames
  6. Spring
    ContextLoaderListener.contextInitialized
    1. org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444)
    2. org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)
    3. org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
    3 frames
  7. Glassfish Core
    HostConfig.manageApp
    1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4716)
    2. org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5178)
    3. org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
    4. org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
    5. org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
    6. org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
    7. org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1702)
    7 frames
  8. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:498)
    4 frames
  9. Embedded GlassFish Web
    BaseModelMBean.invoke
    1. org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
    1 frame
  10. Java RT
    JmxMBeanServer.invoke
    1. com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    2. com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    2 frames
  11. Embedded GlassFish Web
    MBeanFactory.createStandardContext
    1. org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:482)
    2. org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:431)
    2 frames
  12. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:498)
    4 frames
  13. Embedded GlassFish Web
    BaseModelMBean.invoke
    1. org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
    1 frame
  14. Java RT
    Thread.run
    1. com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    2. com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    3. javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
    4. javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
    5. javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
    6. javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401)
    7. javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
    8. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    9. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    10. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    11. java.lang.reflect.Method.invoke(Method.java:498)
    12. sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:324)
    13. sun.rmi.transport.Transport$1.run(Transport.java:200)
    14. sun.rmi.transport.Transport$1.run(Transport.java:197)
    15. java.security.AccessController.doPrivileged(Native Method)
    16. sun.rmi.transport.Transport.serviceCall(Transport.java:196)
    17. sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
    18. sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
    19. sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
    20. java.security.AccessController.doPrivileged(Native Method)
    21. sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
    22. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    23. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    24. java.lang.Thread.run(Thread.java:745)
    24 frames