Announcement Announcement Module

Spring Dynamic Modules forum decommissioned in favor of Eclipse Gemini Blueprint

With the official first release of Eclipse Gemini Blueprint shipped, the migration of the Spring Dynamic Modules code base to the Eclipse Foundation, as part of the Gemini project, has been completed.

As such, this forum has been decommissioned in favour of the Eclipse Gemini forums.
See more
See less
Could not instantiate bean class: No default constructor found Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Could not instantiate bean class: No default constructor found

    I am having a weird issue and would appreciate if someone can help me. When I start a bundle I am getting the following exception:

    Caused by: org.springframework.beans.BeanInstantiationExcepti on: Could not instantiate bean class [accountcreator.AccountCreator]: No default constructor found;
    nested exception is java.lang.NoSuchMethodException: accountcreator.AccountCreator.<init>()
    at stantiationStrategy
    at AutowireCapableBean
    ... 15 more
    Caused by: java.lang.NoSuchMethodException: accountcreator.AccountCreator.<init>
    at java.lang.Class.getConstructor0(
    at java.lang.Class.getDeclaredConstructor( 1985)
    at stantiationStrategy
    ... 16 more

    The AccountCreator infact does have a default constructor and is:

    package accountcreator;

    import dao.IPut;
    import java.util.UUID;

    public class AccountCreator {

    public AccountCreator() {
    System.out.println("Account Creator Initialized...");

    public IPut getPut() {
    return put;

    public void setPut(IPut put) {
    this.put = put;

    public void start() throws Exception {
    System.out.println("Hello World");
    put.putAccount("Account", UUID.randomUUID().toString(), "New");

    public void stop() throws Exception {

    IPut put;

    The spring configuration is:

    <beans xmlns=""
    <bean name="accountcreator" class="accountcreator.AccountCreator"
    init-method="start" destroy-method="stop">
    <property name="put" ref="accountDAOService"/>

    The weird part is:
    1. I had a jar file that was working before and I redeployed it and it works when it is the exact same code (+spring configurations).
    2. I unjar'd the working jar and decompiled the classes and re-bundle them together and the new jar throws this exception when I start it.


  • #2
    No worries, I was deploying a wrong bundle.