org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.commons.dbcp.BasicDataSource] for bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource

Stack Overflow | Bierbatovsky | 6 years ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to poroszd . Or join the community to write better ones.
  1. 0
    samebug tip
    You need to deploy aspectJ (aspectjweaver.jar) together with your application. Add it to your pom.xml
  2. 0

    spring - 为什么用oracle 改成用mysql修改了些东东就不能了 - 好问 - www.welp.cn

    welp.cn | 2 years ago
    org.springframework.beans.factory.beancreationexception: error creating bean with name 'guestbook' defined in servletcontext resource [/web-inf/action-servlet.xml]: cannot resolve reference to bean 'guestbookmanager' while setting bean property 'guestbookmanager'; nested exception is org.springframework.beans.factory.nosuchbeandefinitionexception: no bean named 'guestbookmanager' is defined
  3. 0

    为什么用oracle 改成用mysql修改了些东东就不能了 - 好问 - www.welp.cn

    welp.cn | 2 years ago
    org.springframework.beans.factory.beancreationexception: error creating bean with name 'guestbook' defined in servletcontext resource [/web-inf/action-servlet.xml]: cannot resolve reference to bean 'guestbookmanager' while setting bean property 'guestbookmanager'; nested exception is org.springframework.beans.factory.nosuchbeandefinitionexception: no bean named 'guestbookmanager' is defined
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    Mixed JpaTransactionManager with JTA transaction type in the beans.xml and persistence.xml
    via spring.io
  6. 0

    Problema levantando Spring Security - Login Customizado

    Google Groups | 5 years ago | Igor Thiago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userAuthorityDao' defined in ServletContext resource [/WEB-INF/config/web-security-config.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required

  1. Kawada 28 times, last 9 months ago
  2. treefolk 2 times, last 1 month ago
  3. Tahir 2 times, last 4 months ago
  4. Piz 2027 times, last 7 months ago
  5. jedcua 1 times, last 7 months ago
5 more registered users
90 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.WebappClassLoader.loadClass()
  2. Glassfish Core
    WebappClassLoader.loadClass
    1. org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
    2. org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
    2 frames
  3. Spring Core
    ClassUtils.forName
    1. org.springframework.util.ClassUtils.forName(ClassUtils.java:230)
    1 frame
  4. Spring Beans
    AbstractAutowireCapableBeanFactory$1.run
    1. org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:371)
    2. org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1157)
    3. org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1133)
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:462)
    4 frames
  5. Java RT
    AccessController.doPrivileged
    1. java.security.AccessController.doPrivileged(Native Method)
    1 frame
  6. Spring Beans
    AbstractAutowireCapableBeanFactory$1.run
    1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
    2. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
    3. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
    4. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
    5. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:170)
    6. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:268)
    7. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
    8. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1274)
    9. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1042)
    10. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
    11. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:485)
    11 frames
  7. Java RT
    AccessController.doPrivileged
    1. java.security.AccessController.doPrivileged(Native Method)
    1 frame
  8. Spring Beans
    AbstractAutowireCapableBeanFactory$1.run
    1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
    2. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
    3. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
    4. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
    5. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:170)
    6. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:268)
    7. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
    8. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1274)
    9. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1042)
    10. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
    11. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:485)
    11 frames
  9. Java RT
    AccessController.doPrivileged
    1. java.security.AccessController.doPrivileged(Native Method)
    1 frame
  10. Spring Beans
    DefaultListableBeanFactory.preInstantiateSingletons
    1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
    2. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
    3. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
    4. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
    5. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:170)
    6. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:413)
    6 frames
  11. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:735)
    2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:369)
    2 frames
  12. Spring
    ContextLoaderListener.contextInitialized
    1. org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:251)
    2. org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:190)
    3. org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
    3 frames
  13. Glassfish Core
    Catalina.start
    1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)
    2. org.apache.catalina.core.StandardContext.start(StandardContext.java:4704)
    3. org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
    4. org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
    5. org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
    6. org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)
    7. org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)
    8. org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
    9. org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315)
    10. org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
    11. org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
    12. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
    13. org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
    14. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    15. org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
    16. org.apache.catalina.core.StandardService.start(StandardService.java:525)
    17. org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
    18. org.apache.catalina.startup.Catalina.start(Catalina.java:595)
    18 frames
  14. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    4. java.lang.reflect.Method.invoke(Unknown Source)
    4 frames
  15. Glassfish Core
    Bootstrap.main
    1. org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    2. org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
    2 frames