org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productcontroller': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.niit.service.productservice fionazcosmetics.productcontroller.productDAOservice; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.mail.javamail.JavaMailSenderImpl] for bean with name 'mailSender' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.mail.javamail.JavaMailSenderImpl

Stack Overflow | user6756404 | 6 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Writing an email from Spring MVC Maven project (Eclipse) to gmail

    Stack Overflow | 6 months ago | user6756404
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productcontroller': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.niit.service.productservice fionazcosmetics.productcontroller.productDAOservice; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.mail.javamail.JavaMailSenderImpl] for bean with name 'mailSender' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.mail.javamail.JavaMailSenderImpl
  2. 0

    Beans Unfound while they are in the package

    Stack Overflow | 1 year ago | Chaibi Alaa
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'manageUserDAO': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.hibernate.SessionFactory school.dao.ManageUserDAO.sessionFactory; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [managedBeans.UserLoginBean] for bean with name 'userLoginBean' defined in ServletContext resource [/WEB-INF/security-context.xml]; nested exception is java.lang.ClassNotFoundException: managedBeans.UserLoginBean
  3. 0

    Error launching Tomcat with DriverManagerDataSource

    Stack Overflow | 1 year ago | Krzysztof Majewski
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'catsController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private javax.sql.DataSource ninja.majewski.newcats.webapp.controllers.CatsController.dataSource; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.jdbc.datasource.DriverManagerDataSource] for bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.jdbc.datasource.DriverManagerDataSource
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    java - 【异常】org.apache.commons.dbcp2.BasicDataSource 找不到 - SegmentFault

    segmentfault.com | 6 months ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.ucmed.rubik.web.dao.UserMapper com.ucmed.rubik.web.service.impl.UserServiceImpl.userMapper; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.commons.dbcp2.BasicDataSource] for bean with name 'dataSource' defined in class path resource [springConfig.xml]; nested exception is java.lang.ClassNotFoundException: org.apache.commons.dbcp2.BasicDataSource
  6. 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
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.springframework.mail.javamail.JavaMailSenderImpl

    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass()
  2. Glassfish Core
    WebappClassLoaderBase.loadClass
    1. org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1305)
    2. org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1139)
    2 frames
  3. Spring Core
    ClassUtils.forName
    1. org.springframework.util.ClassUtils.forName(ClassUtils.java:249)
    1 frame
  4. Spring Beans
    DefaultListableBeanFactory.preInstantiateSingletons
    1. org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:395)
    2. org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1349)
    3. org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1320)
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:622)
    5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:591)
    6. org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1397)
    7. org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:434)
    8. org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:412)
    9. org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors(BeanFactoryUtils.java:186)
    10. org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1105)
    11. org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1044)
    12. org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:942)
    13. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:533)
    14. org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
    15. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
    16. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1210)
    17. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
    18. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
    19. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
    20. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    21. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
    22. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
    23. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)
    23 frames
  5. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
    2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
    2 frames
  6. Spring
    ContextLoaderListener.contextInitialized
    1. org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
    2. org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
    3. org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
    3 frames
  7. Glassfish Core
    ContainerBase$StartChild.call
    1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4811)
    2. org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5251)
    3. org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
    4. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
    5. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
    5 frames
  8. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask.run(Unknown Source)
    2. java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    3. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    4. java.lang.Thread.run(Unknown Source)
    4 frames