Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Spring Project is not running  RSS feed

 
jigyasu garg
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Team,

I'm trying to run the following project for which i have shared the link below:-

http://www.roseindia.net/spring/spring4/login-form-using-spring-mvc-and-hibernate.shtml

I have tried installing it on my eclipse but it is not working for me following error is coming...

 
Liutauras Vilda
Marshal
Posts: 4640
316
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have bean 'LoginController' configured in applicationContext.xml ?
 
jigyasu garg
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no how to do that...?
 
Liutauras Vilda
Marshal
Posts: 4640
316
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jigyasu garg wrote:no how to do that...?

Please show us your applicationContext.xml config file first.
 
jigyasu garg
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please find attached...

applicationContext.xml
 
Liutauras Vilda
Marshal
Posts: 4640
316
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I missed 'LoginService' initially.

Do you have somewhere in any other xml defined LoginService bean like?
 
jigyasu garg
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no even after adding it is not working...
 
Stephan van Hulst
Saloon Keeper
Posts: 7808
142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You declared a bean with class name "net.roseindia.controllers". I'm assuming that's just the package where the actual class is located. You should change it so it reads the complete class name.

Just as an FYI, Rose India is an absolutely horrible site with bad tutorials and code examples, and I recommend you use different sites for tutorials.
 
jigyasu garg
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please recommend me any site...
 
jigyasu garg
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have mentioned

<context:component-scan base-package="net.roseindia"></context:component-scan>

as Base-Package...

I have tried many tutorials but not getting proper path to create a real project can you please be my guide me?
 
Liutauras Vilda
Marshal
Posts: 4640
316
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you fixed what Stephan pointed out? You need to specify full path to the class as:
and you need

After you fixed those, what has happened?
 
jigyasu garg
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have just added this bean in my file but still same result...

<bean id="loginController" class="net.roseindia.controllers.LoginController" />
 
jigyasu garg
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please find attached image of my structure of project... you can tell me if you find any file in wrong place....
structure.png
[Thumbnail for structure.png]
Structure of my project
 
Liutauras Vilda
Marshal
Posts: 4640
316
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to follow native spring documentation and see if you can make it work
http://docs.spring.io/spring/docs/current/spring-framework-reference/html/orm.html
 
Prasad Krishnegowda
Ranch Hand
Posts: 672
4
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post the server logs after adding the beans..
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!