• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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.
 
An elephant? An actual elephant. Into the apartment. How is the floor still here. Hold this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic