Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

spring framework problem

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I've started practicing spring in action 3rd edition by craig walls. I stucked up in spring mvc as we are using it in our project. I tried to run 1st program as described in the book, but I'm facing an exception No default constructor found and Error in creating bean 'homeController'. I verified all the rest of the classes in the project like service, domain, configuration files, database files; they are working but when I want to see the outcome of the application it is throwing exception.

I'm not able to understand where exactly the problem is located and how to resolve. Please, I need a helping hand in resolving this.

One more doubt I'm having is; we have both spring and javaee6 supporting DI. As a developer which one I should support(standards wise). Please clarify me if mistaken.

Thanks and Regards,
sathish.g.
 
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please post the code in order to get the problem figured out.
 
maheedar sand
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I've started practicing spring in action 3rd edition by craig walls. I stucked up in spring mvc as we are using it in our project. I tried to run 1st program as described in the book, but I'm facing an exception No default constructor found and Error in creating bean 'homeController'. I verified all the rest of the classes in the project like service, domain, configuration files, database files; they are working but when I want to see the outcome of the application it is throwing exception.

I'm not able to understand where exactly the problem is located and how to resolve. Please, I need a helping hand in resolving this.

One more doubt I'm having is; we have both spring and javaee6 supporting DI. As a developer which one I should support(standards wise). Please clarify me if mistaken.

Controller - HomeController class


SpitterServiceImpl


spitter-service.xml


spitter-servlet.xml


web.xml


home.jsp

Thanks and Regards,
sathish.g.
 
Ranch Hand
Posts: 138
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have not seen the code in detail so might have missed something.
But what I noticed in your controller class is that you have a customized constructor and so the default constructor will have to be put explicitly.
I guess it is required for the framework to instantiate your controller class.
 
Ranch Hand
Posts: 530
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, you must create a non-argument constructor in the HomeController class besides the current one:

 
maheedar sand
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes
It is working when I placed default constructor.

Thank You for everyone for spending time and giving valuable suggestions.
 
Skool. Stay in. Smartness. Tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic