• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

org.springframework.beans.factory.CannotLoadBeanCl assException:

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
-------------------

 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic