org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'simpleBean' defined in file [C:\Users\owner\Documents\Java Project\MyWorkSpace\springMVCSecond\WebContent\WEB-INF\classes\com\domain\SimpleBean.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.domain.SimpleBean$$EnhancerByCGLIB$$4bc418be]: No default constructor found; nested exception is java.lang.NoSuchMethodException: com.domain.SimpleBean$$EnhancerByCGLIB$$4bc418be.<init>()

Stack Overflow | Kaushik Lele | 5 years 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

    Constructor injection using Spring annotation @Autowired does not work

    Stack Overflow | 5 years ago | Kaushik Lele
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'simpleBean' defined in file [C:\Users\owner\Documents\Java Project\MyWorkSpace\springMVCSecond\WebContent\WEB-INF\classes\com\domain\SimpleBean.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.domain.SimpleBean$$EnhancerByCGLIB$$4bc418be]: No default constructor found; nested exception is java.lang.NoSuchMethodException: com.domain.SimpleBean$$EnhancerByCGLIB$$4bc418be.<init>()
  2. 0

    AppContext initialization failure when running from shadowJar (built on Linux)

    GitHub | 3 months ago | Nashatyrev
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'netStore': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: org.ethereum.manager.WorldManager org.ethereum.net.swarm.NetStore.worldManager; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'worldManager' defined in URL [jar:file:/D:/ws/work/ethereumj-core-1.5.0-SNAPSHOT-all.jar!/org/ethereum/manager/WorldManager.class]: Unsatisfied dependency expressed through constructor argument with index 1 of type [org.ethereum.core.Repository]: : Error creating bean with name 'repositoryTrack' defined in URL [jar:file:/D:/ws/work/ethereumj-core-1.5.0-SNAPSHOT-all.jar!/org/ethereum/db/RepositoryTrack.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.ethereum.db.RepositoryTrack]: No default constructor found; nested exception is java.lang.NoSuchMethodException: org.ethereum.db.RepositoryTrack.<init>(); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repositoryTrack' defined in URL [jar:file:/D:/ws/work/ethereumj-core-1.5.0-SNAPSHOT-all.jar!/org/ethereum/db/RepositoryTrack.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.ethereum.db.RepositoryTrack]: No default constructor found; nested exception is java.lang.NoSuchMethodException: org.ethereum.db.RepositoryTrack.<init>()
  3. 0

    NoSuchMethodException when using Spring ThreadPoolTaskExecutor

    Stack Overflow | 2 years ago | Omer
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'adSyncTaskPool' defined in URL [jar:file:/C:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/ad-mgmt/WEB-INF/lib/component-stats-sync-impl2-0.0.1-SNAPSHOT.jar!/me/somesome/task/SyncTaskPool.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [me.somesome.task.SyncTaskPool]: No default constructor found; nested exception is java.lang.NoSuchMethodException: me.somesome.task.SyncTaskPool.&lt;init&gt;() at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1076) ~[spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Spring Constructor @Autowired and @Qualifier fails

    Stack Overflow | 4 years ago | Cory Kendall
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'GreatBean' defined in class path resource [config.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [mypackage.MyCoolClass]: No default constructor found; nested exception is java.lang.NoSuchMethodException: mypackage.MyCoolClass.&lt;init&gt;()

  1. batwalrus76 5 times, last 1 month ago
  2. ruifung 1 times, last 8 months ago
  3. serious2monkeys 17 times, last 9 months ago
  4. filpgame 1 times, last 2 months ago
  5. empt-ak 1 times, last 6 months ago
10 more registered users
47 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.NoSuchMethodException

    com.domain.SimpleBean$$EnhancerByCGLIB$$4bc418be.<init>()

    at java.lang.Class.getConstructor0()
  2. Java RT
    Class.getDeclaredConstructor
    1. java.lang.Class.getConstructor0(Unknown Source)
    2. java.lang.Class.getDeclaredConstructor(Unknown Source)
    2 frames
  3. Spring Beans
    DefaultListableBeanFactory.preInstantiateSingletons
    1. org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:65)
    2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:958)
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
    5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    6. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
    7. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    8. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
    9. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
    10. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
    10 frames
  4. Spring Context
    AnnotationConfigApplicationContext.<init>
    1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
    2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
    3. org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:75)
    3 frames
  5. com.test
    SpringAnnotationTest.main
    1. com.test.SpringAnnotationTest.main(SpringAnnotationTest.java:12)
    1 frame