org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#1' defined in ServletContext resource [/WEB-INF/azelea-servlet.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.util.ArrayList' to required type 'java.util.List' for property 'customArgumentResolvers'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.springframework.data.web.PageableArgumentResolver] to required type [org.springframework.web.method.support.HandlerMethodArgumentResolver] for property 'customArgumentResolvers[0]': no matching editors or conversion strategy found

Spring JIRA | deng hui | 5 years ago
  1. 0

    when adding this configuration: {code} <bean class="org.springframework.web.servlet.mvc.method.annotation.AnnotationMethodHandlerAdapter"> <property name="customArgumentResolvers"> <list> <bean class="org.springframework.data.web.PageableArgumentResolver" /> </list> </property> </bean> {code} then: {code} org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.web.servlet.mvc.method.annotation.AnnotationMethodHandlerAdapter] for bean with name 'org.springframework.web.servlet.mvc.method.annotation.AnnotationMethodHandlerAdapter#0' defined in ServletContext resource [/WEB-INF/azelea-servlet.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.web.servlet.mvc.method.annotation.AnnotationMethodHandlerAdapter Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.web.servlet.mvc.method.annotation.AnnotationMethodHandlerAdapter] for bean with name 'org.springframework.web.servlet.mvc.method.annotation.AnnotationMethodHandlerAdapter#0' defined in ServletContext resource [/WEB-INF/azelea-servlet.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.web.servlet.mvc.method.annotation.AnnotationMethodHandlerAdapter at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) ... at java.lang.Thread.run(Thread.java:722) Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.web.servlet.mvc.method.annotation.AnnotationMethodHandlerAdapter] for bean with name 'org.springframework.web.servlet.mvc.method.annotation.AnnotationMethodHandlerAdapter#0' defined in ServletContext resource [/WEB-INF/azelea-servlet.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.web.servlet.mvc.method.annotation.AnnotationMethodHandlerAdapter at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1262) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:576) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1331) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:317) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:298) at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:92) ... at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1448) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) ... 31 more Caused by: java.lang.ClassNotFoundException: org.springframework.web.servlet.mvc.method.annotation.AnnotationMethodHandlerAdapter at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523) at org.springframework.util.ClassUtils.forName(ClassUtils.java:257) at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:417) at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1283) at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1254) ... 46 more {code} if trying: {code} <bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter"> <property name="customArgumentResolvers"> <list> <bean class="org.springframework.data.web.PageableArgumentResolver" /> </list> </property> </bean> {code} then: {code} org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#1' defined in ServletContext resource [/WEB-INF/azelea-servlet.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.util.ArrayList' to required type 'java.util.List' for property 'customArgumentResolvers'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.springframework.data.web.PageableArgumentResolver] to required type [org.springframework.web.method.support.HandlerMethodArgumentResolver] for property 'customArgumentResolvers[0]': no matching editors or conversion strategy found at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464) at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:631) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:588) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:645) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:508) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:449) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:133) at javax.servlet.GenericServlet.init(GenericServlet.java:160) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1228) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1147) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1043) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4957) at org.apache.catalina.core.StandardContext$3.call(StandardContext.java:5284) at org.apache.catalina.core.StandardContext$3.call(StandardContext.java:5279) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) Caused by: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.util.ArrayList' to required type 'java.util.List' for property 'customArgumentResolvers'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.springframework.data.web.PageableArgumentResolver] to required type [org.springframework.web.method.support.HandlerMethodArgumentResolver] for property 'customArgumentResolvers[0]': no matching editors or conversion strategy found at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:485) at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:516) at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:510) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1406) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1365) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) ... 26 more Caused by: java.lang.IllegalStateException: Cannot convert value of type [org.springframework.data.web.PageableArgumentResolver] to required type [org.springframework.web.method.support.HandlerMethodArgumentResolver] for property 'customArgumentResolvers[0]': no matching editors or conversion strategy found at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:241) at org.springframework.beans.TypeConverterDelegate.convertToTypedCollection(TypeConverterDelegate.java:538) at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:179) at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:470) ... 32 more {code}

    Spring JIRA | 5 years ago | deng hui
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#1' defined in ServletContext resource [/WEB-INF/azelea-servlet.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.util.ArrayList' to required type 'java.util.List' for property 'customArgumentResolvers'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.springframework.data.web.PageableArgumentResolver] to required type [org.springframework.web.method.support.HandlerMethodArgumentResolver] for property 'customArgumentResolvers[0]': no matching editors or conversion strategy found
  2. 0

    when adding this configuration: {code} <bean class="org.springframework.web.servlet.mvc.method.annotation.AnnotationMethodHandlerAdapter"> <property name="customArgumentResolvers"> <list> <bean class="org.springframework.data.web.PageableArgumentResolver" /> </list> </property> </bean> {code} then: {code} org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.web.servlet.mvc.method.annotation.AnnotationMethodHandlerAdapter] for bean with name 'org.springframework.web.servlet.mvc.method.annotation.AnnotationMethodHandlerAdapter#0' defined in ServletContext resource [/WEB-INF/azelea-servlet.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.web.servlet.mvc.method.annotation.AnnotationMethodHandlerAdapter Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.web.servlet.mvc.method.annotation.AnnotationMethodHandlerAdapter] for bean with name 'org.springframework.web.servlet.mvc.method.annotation.AnnotationMethodHandlerAdapter#0' defined in ServletContext resource [/WEB-INF/azelea-servlet.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.web.servlet.mvc.method.annotation.AnnotationMethodHandlerAdapter at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) ... at java.lang.Thread.run(Thread.java:722) Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.web.servlet.mvc.method.annotation.AnnotationMethodHandlerAdapter] for bean with name 'org.springframework.web.servlet.mvc.method.annotation.AnnotationMethodHandlerAdapter#0' defined in ServletContext resource [/WEB-INF/azelea-servlet.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.web.servlet.mvc.method.annotation.AnnotationMethodHandlerAdapter at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1262) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:576) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1331) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:317) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:298) at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:92) ... at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1448) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) ... 31 more Caused by: java.lang.ClassNotFoundException: org.springframework.web.servlet.mvc.method.annotation.AnnotationMethodHandlerAdapter at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523) at org.springframework.util.ClassUtils.forName(ClassUtils.java:257) at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:417) at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1283) at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1254) ... 46 more {code} if trying: {code} <bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter"> <property name="customArgumentResolvers"> <list> <bean class="org.springframework.data.web.PageableArgumentResolver" /> </list> </property> </bean> {code} then: {code} org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#1' defined in ServletContext resource [/WEB-INF/azelea-servlet.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.util.ArrayList' to required type 'java.util.List' for property 'customArgumentResolvers'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.springframework.data.web.PageableArgumentResolver] to required type [org.springframework.web.method.support.HandlerMethodArgumentResolver] for property 'customArgumentResolvers[0]': no matching editors or conversion strategy found at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464) at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:631) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:588) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:645) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:508) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:449) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:133) at javax.servlet.GenericServlet.init(GenericServlet.java:160) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1228) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1147) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1043) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4957) at org.apache.catalina.core.StandardContext$3.call(StandardContext.java:5284) at org.apache.catalina.core.StandardContext$3.call(StandardContext.java:5279) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) Caused by: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.util.ArrayList' to required type 'java.util.List' for property 'customArgumentResolvers'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.springframework.data.web.PageableArgumentResolver] to required type [org.springframework.web.method.support.HandlerMethodArgumentResolver] for property 'customArgumentResolvers[0]': no matching editors or conversion strategy found at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:485) at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:516) at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:510) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1406) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1365) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) ... 26 more Caused by: java.lang.IllegalStateException: Cannot convert value of type [org.springframework.data.web.PageableArgumentResolver] to required type [org.springframework.web.method.support.HandlerMethodArgumentResolver] for property 'customArgumentResolvers[0]': no matching editors or conversion strategy found at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:241) at org.springframework.beans.TypeConverterDelegate.convertToTypedCollection(TypeConverterDelegate.java:538) at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:179) at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:470) ... 32 more {code}

    Spring JIRA | 5 years ago | deng hui
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#1' defined in ServletContext resource [/WEB-INF/azelea-servlet.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.util.ArrayList' to required type 'java.util.List' for property 'customArgumentResolvers'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.springframework.data.web.PageableArgumentResolver] to required type [org.springframework.web.method.support.HandlerMethodArgumentResolver] for property 'customArgumentResolvers[0]': no matching editors or conversion strategy found
  3. 0

    How to deal with error applying BeanValidation relational constraints?

    Stack Overflow | 5 years ago | Nabuchodonozor
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'homeController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: pl.rafalo235.encyklopedia.model.dao.UserDAO pl.rafalo235.encyklopedia.controllers.HomeController.userDAO; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDAO': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.orm.hibernate4.LocalSessionFactoryBean pl.rafalo235.encyklopedia.model.dao.UserDAO.sessionFactory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mySessionFactory' defined in ServletContext resource [/WEB-INF/encyklopediaDispatcherServlet-servlet.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Error applying BeanValidation relational constraints
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    java.lang.IllegalStateException

    Stack Overflow | 5 years ago | Junaidaj
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]: Instantiation of bean failed; nested exception is java.lang.IllegalStateException: No bean class specified on bean definition
  6. 0

    @Autowiring not working at Field Level

    Stack Overflow | 5 years ago | Rachel
    org.springframework.beans.factory.BeanCreationException: Could not autowire field: private net.viralpatel.contact.service.ContactService net.viralpatel.contact.controller.ContactController.contactService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contactServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private net.viralpatel.contact.dao.ContactDAO net.viralpatel.contact.service.ContactServiceImpl.contactDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contactDAOImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.hibernate.SessionFactory net.viralpatel.contact.dao.ContactDAOImpl.sessionFactory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/spring-servlet.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool

  1. rlovtangen 1 times, last 2 weeks ago
  2. tvrmsmith 6 times, last 3 weeks ago
  3. kjhdofjosvs 1 times, last 1 month ago
  4. Andreas Häber 2 times, last 1 month ago
  5. Luka 14 times, last 2 months ago
21 more registered users
74 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.IllegalStateException

    Cannot convert value of type [org.springframework.data.web.PageableArgumentResolver] to required type [org.springframework.web.method.support.HandlerMethodArgumentResolver] for property 'customArgumentResolvers[0]': no matching editors or conversion strategy found

    at org.springframework.beans.TypeConverterDelegate.convertIfNecessary()
  2. Spring Beans
    DefaultListableBeanFactory.preInstantiateSingletons
    1. org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:241)
    2. org.springframework.beans.TypeConverterDelegate.convertToTypedCollection(TypeConverterDelegate.java:538)
    3. org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:179)
    4. org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:470)
    5. org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:516)
    6. org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:510)
    7. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1406)
    8. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1365)
    9. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)
    10. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
    11. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    12. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
    13. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
    14. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
    15. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
    16. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
    16 frames
  3. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
    2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
    2 frames
  4. Spring MVC
    HttpServletBean.init
    1. org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:631)
    2. org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:588)
    3. org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:645)
    4. org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:508)
    5. org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:449)
    6. org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:133)
    6 frames
  5. JavaServlet
    GenericServlet.init
    1. javax.servlet.GenericServlet.init(GenericServlet.java:160)
    1 frame
  6. Glassfish Core
    StandardContext$3.call
    1. org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1228)
    2. org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1147)
    3. org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1043)
    4. org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4957)
    5. org.apache.catalina.core.StandardContext$3.call(StandardContext.java:5284)
    6. org.apache.catalina.core.StandardContext$3.call(StandardContext.java:5279)
    6 frames
  7. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    2. java.util.concurrent.FutureTask.run(FutureTask.java:166)
    3. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    5. java.lang.Thread.run(Thread.java:722)
    5 frames