Win a copy of Svelte and Sapper in Action this week in the JavaScript 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

org.springframework.beans.factory.CannotLoadBeanCl assException:

 
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
-------------------

 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • 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
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic