org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.cihangir.service.BookServiceImpl com.cihangir.controller.BookController.bookServiceImpl; nested exception is java.lang.IllegalArgumentException: Can not set com.cihangir.service.BookServiceImpl field com.cihangir.controller.BookController.bookServiceImpl to com.sun.proxy.$Proxy22

Stack Overflow | john | 2 months ago
  1. 0

    Spring mvc, hibernate, crud

    Stack Overflow | 2 months ago | john
    org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.cihangir.service.BookServiceImpl com.cihangir.controller.BookController.bookServiceImpl; nested exception is java.lang.IllegalArgumentException: Can not set com.cihangir.service.BookServiceImpl field com.cihangir.controller.BookController.bookServiceImpl to com.sun.proxy.$Proxy22
  2. 0

    启动项目报错

    GitHub | 2 years ago | huguangju
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.danielli.xultimate.web.servlet.view.httl.HttlViewResolver#0' defined in class path resource [applicationContext-servlet.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Failed to init property value. key: engine, value: httl.spi.engines.DefaultEngine, cause: Failed to init properties of bean class httl.spi.engines.DefaultEngine, cause: Failed to init property value. key: map.converter, value: httl.spi.converters.MultiMapConverter, cause: Failed to init properties of bean class httl.spi.converters.MultiMapConverter, cause: Failed to init property value. key: map.converters, value: httl.spi.converters.StringMapConverter, cause: Failed to init properties of bean class httl.spi.converters.StringMapConverter, cause: Failed to init property value. key: codecs, value: httl.spi.codecs.JsonCodec, cause: Failed to init properties of bean class httl.spi.codecs.JsonCodec, cause: Failed to init property value. key: compiler, value: httl.spi.compilers.AdaptiveCompiler, cause: Failed to init properties of bean class httl.spi.compilers.AdaptiveCompiler, cause: Can not get system java compiler. Please run with JDK (NOT JVM), or configure the httl.properties: compiler=httl.spi.compilers.JavassistCompiler, and add javassist.jar.
  3. 0

    Issue with @ComponentScan, filters since migrating to javaconfig

    Stack Overflow | 3 years ago | balteo
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'searchEngineController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.bignibou.service.searchEngine.SearchEngineService com.bignibou.controller.searchEngine.SearchEngineController.searchEngineService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.bignibou.service.searchEngine.SearchEngineService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Spring Hibernate Maven build Rest Service

    Stack Overflow | 2 years ago | Carlos Pedroso
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'personController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.journaldev.spring.service.PersonService com.journaldev.spring.PersonController.personService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'personService' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]: Cannot resolve reference to bean 'personDAO' while setting bean property 'personDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'personDAO' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]: Cannot resolve reference to bean 'hibernate4AnnotatedSessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernate4AnnotatedSessionFactory' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: javax.persistence.Table.indexes()[Ljavax/persistence/Index;
  6. 0

    Spring Autowire error expected at least 1 bean which qualifies as autowire candidate for this dependency

    Stack Overflow | 4 years ago | amzi
    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: private com.app.r.Personrepo com.app.a.HomeController.personRepo; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [com.app.r.Personrepo] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

  1. rlovtangen 2 times, last 2 weeks ago
  2. tvrmsmith 6 times, last 2 weeks ago
  3. kjhdofjosvs 1 times, last 4 weeks ago
  4. Andreas Häber 2 times, last 4 weeks 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. org.springframework.beans.factory.BeanCreationException

    Could not autowire field: private com.cihangir.service.BookServiceImpl com.cihangir.controller.BookController.bookServiceImpl; nested exception is java.lang.IllegalArgumentException: Can not set com.cihangir.service.BookServiceImpl field com.cihangir.controller.BookController.bookServiceImpl to com.sun.proxy.$Proxy22

    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject()
  2. Spring Beans
    DefaultListableBeanFactory.preInstantiateSingletons
    1. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573)
    2. org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
    3. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
    5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
    6. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    7. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    8. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    9. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    10. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    11. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
    11 frames
  3. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:838)
    2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537)
    2 frames
  4. Spring MVC
    HttpServletBean.init
    1. org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:667)
    2. org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:633)
    3. org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:681)
    4. org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:552)
    5. org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:493)
    6. org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
    6 frames
  5. JavaServlet
    GenericServlet.init
    1. javax.servlet.GenericServlet.init(GenericServlet.java:158)
    1 frame
  6. Glassfish Core
    ContainerBase$StartChild.call
    1. org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1238)
    2. org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1151)
    3. org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1038)
    4. org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5027)
    5. org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5337)
    6. org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
    7. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
    8. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
    8 frames
  7. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask.run(FutureTask.java:266)
    2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    4. java.lang.Thread.run(Thread.java:745)
    4 frames