org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'multipartResolver' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.multipart.commons.CommonsMultipartResolver]: No default constructor found; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItemFactory

Stack Overflow | Scientific.RAT | 3 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to poroszd and rafael . 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

    Fail to configure CommonsMultipartResolver in Spring4

    Stack Overflow | 3 months ago | Scientific.RAT
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'multipartResolver' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.multipart.commons.CommonsMultipartResolver]: No default constructor found; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItemFactory
  3. 0
    samebug tip
    If you want to keep using @EnableWebMvc annotation, you have to add the code on the first answer of this page: https://goo.gl/JoHTKU to your code
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    Springboot auto-configuration is disabled when you try to use WebMvcConfigurerAdapter and @EnableWebMvc. If WebConfig is not of the essence, remove it and use SpringBoot auto-configuration.
  6. 0

    CAS (7) —— Mac下配置CAS 4.x的JPATicketRegistry(服务端) - Richaaaard - 博客园

    cnblogs.com | 1 year ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ticketRegistryCleaner' defined in ServletContext resource [/WEB-INF/spring-configuration/ticketRegistry.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.jasig.cas.ticket.registry.support.DefaultTicketRegistryCleaner]: No default constructor found; nested exception is java.lang.NoSuchMethodException: org.jasig.cas.ticket.registry.support.DefaultTicketRegistryCleaner.<init>()

  1. ivanszkypeter 3 times, last 6 days ago
  2. musketyr 2 times, last 3 weeks ago
  3. Andreas Häber 1 times, last 3 months ago
  4. treefolk 1 times, last 5 months ago
  5. kjhdofjosvs 3 times, last 6 months ago
16 more registered users
79 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. org.springframework.beans.factory.BeanCreationException

    Error creating bean with name 'multipartResolver' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.multipart.commons.CommonsMultipartResolver]: No default constructor found; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItemFactory

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean()
  2. Spring Beans
    AbstractBeanFactory.getBean
    1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1155)
    2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1099)
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
    5. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    6. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    7. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    8. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    8 frames