org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘RequestsService’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private it.stasbranger.dao.RequestsDAO it.stasbranger.service.RequestsServiceImpl.requestsDAO; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘RequestsDAO’: Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘connection_mysql’ defined in class path resource [MyProject-dao-context.xml]: Invocation of init method failed; nested exception is java.lang.IncompatibleClassChangeError: Implementing class: java.lang.IncompatibleClassChangeError: Implementing class

genuitec.com | 3 days ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rp and poroszd . Or join the community to write better ones.
  1. 0

    Injection of autowired dependencies failed - Genuitec

    genuitec.com | 3 days ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘RequestsService’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private it.stasbranger.dao.RequestsDAO it.stasbranger.service.RequestsServiceImpl.requestsDAO; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘RequestsDAO’: Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘connection_mysql’ defined in class path resource [MyProject-dao-context.xml]: Invocation of init method failed; nested exception is java.lang.IncompatibleClassChangeError: Implementing class
  2. 0
    samebug tip
    Check Servers Launch Configuration in Eclipse. See the details below.
  3. 0
    samebug tip
    Add slf4j dependency to your pom.xml
  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
    samebug tip
    Spring expects that the EntityManagerFactory has to be called "entityManagerFactory". It uses convention over configuration to make it easier to use.

    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 ‘RequestsService’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private it.stasbranger.dao.RequestsDAO it.stasbranger.service.RequestsServiceImpl.requestsDAO; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘RequestsDAO’: Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘connection_mysql’ defined in class path resource [MyProject-dao-context.xml]: Invocation of init method failed; nested exception is java.lang.IncompatibleClassChangeError: Implementing class: java.lang.IncompatibleClassChangeError: Implementing class

      at java.lang.ClassLoader.defineClass1()
    2. Java RT
      URLClassLoader.findClass
      1. java.lang.ClassLoader.defineClass1(Native Method)
      2. java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
      3. java.lang.ClassLoader.defineClass(ClassLoader.java:616)
      4. java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
      5. java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
      6. java.net.URLClassLoader.access$000(URLClassLoader.java:58)
      7. java.net.URLClassLoader$1.run(URLClassLoader.java:197)
      8. java.security.AccessController.doPrivileged(Native Method)
      9. java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      9 frames
    3. GWT dev
      JettyLauncher$WebAppContextWithReload$WebAppClassLoaderExtension.findClass
      1. com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload$WebAppClassLoaderExtension.findClass(JettyLauncher.java:367)
      1 frame
    4. Jetty Server
      WebAppClassLoader.loadClass
      1. org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:366)
      2. org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
      2 frames
    5. Hibernate EJB
      HibernatePersistence.createContainerEntityManagerFactory
      1. org.hibernate.ejb.Ejb3Configuration.<clinit>(Ejb3Configuration.java:128)
      2. org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:72)
      2 frames
    6. Spring ORM
      AbstractEntityManagerFactoryBean.afterPropertiesSet
      1. org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:225)
      2. org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:308)
      2 frames
    7. Spring Beans
      AbstractBeanFactory.getBean
      1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
      2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
      3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
      4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
      5. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
      6. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      7. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
      8. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
      8 frames
    8. Spring ORM
      PersistenceAnnotationBeanPostProcessor$PersistenceElement.getResourceToInject
      1. org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findDefaultEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:529)
      2. org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:495)
      3. org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.resolveEntityManager(PersistenceAnnotationBeanPostProcessor.java:656)
      4. org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.getResourceToInject(PersistenceAnnotationBeanPostProcessor.java:629)
      4 frames
    9. Spring Beans
      InjectionMetadata.inject
      1. org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:147)
      2. org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
      2 frames
    10. Spring ORM
      PersistenceAnnotationBeanPostProcessor.postProcessPropertyValues
      1. org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessPropertyValues(PersistenceAnnotationBeanPostProcessor.java:338)
      1 frame
    11. Spring Beans
      DefaultListableBeanFactory.preInstantiateSingletons
      1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)
      2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
      3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
      4. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
      5. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      6. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
      7. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
      8. org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:844)
      9. org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:786)
      10. org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:703)
      11. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:474)
      12. org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
      13. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:282)
      14. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)
      15. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
      16. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
      17. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
      18. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      19. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
      20. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
      21. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
      21 frames
    12. Spring Context
      AbstractApplicationContext.refresh
      1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
      2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
      2 frames
    13. Spring
      ContextLoaderListener.contextInitialized
      1. org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
      2. org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
      3. org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
      3 frames
    14. Jetty Server
      WebAppContext.doStart
      1. org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:543)
      2. org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
      3. org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
      4. org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:513)
      5. org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
      5 frames
    15. GWT dev
      JettyLauncher$WebAppContextWithReload.doStart
      1. com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:463)
      1 frame
    16. Jetty Util
      AbstractLifeCycle.start
      1. org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
      1 frame
    17. Jetty Server
      RequestLogHandler.doStart
      1. org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
      2. org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:115)
      2 frames
    18. Jetty Util
      AbstractLifeCycle.start
      1. org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
      1 frame
    19. Jetty Server
      Server.doStart
      1. org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
      2. org.mortbay.jetty.Server.doStart(Server.java:222)
      2 frames
    20. Jetty Util
      AbstractLifeCycle.start
      1. org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
      1 frame
    21. GWT dev
      DevMode.main
      1. com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:667)
      2. com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:500)
      3. com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1055)
      4. com.google.gwt.dev.DevModeBase.run(DevModeBase.java:804)
      5. com.google.gwt.dev.DevMode.main(DevMode.java:309)
      5 frames