• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

org.springframework.beans.factory.CannotLoadBeanCl assException:

 
gopal krishnan
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had created the simple spring MVC controller, when i tried to execute i am getting the error.

Error Message:

org.springframework.beans.factory.CannotLoadBeanCl assException: Cannot find class [SpringApp.web.java.HelloController] for bean with name 'Redirect.jsp' defined in ServletContext resource [/WEB-INF/springapp-servlet.xml]; nested exception is java.lang.ClassNotFoundException: SpringApp.web.java.HelloController


This is my application structure.

SpringApp
----Web Pages
----META-INF
----WEB-INF
----springapp-servlet.xml
----web.xml
----Redirect.jsp
----index1.jsp
----Source Packages
----java
----HelloController.java



web.xml
--------


springapp-servlet.xml
----------------------



index1.jsp
---------


Redirect.jsp
------------



HelloController.java
-------------------

 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


does not match the package on your controller



Your application structure looks a little odd. Have a look at this
http://gordondickens.com/wordpress/2012/07/03/enterprise-spring-best-practices-part-1-project-config/


 
gopal krishnan
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your email..

i created the webapplication project using the NETBEANS IDE..

when i tried to create the java file, it creates in the source package.. means (src/java).
 
gopal krishnan
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am closing this, since i got after moving inside the WEB-INF/jsp with redirect.jsp and accessing using the http://localhost:8080/SpringApp/Redirect.htm
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic