-
Jun 5th, 2012, 10:25 AM
#1
re: how to resolve BeanCreationException in autowiring
Can anyone please recommend a few things to look for in diagnosing the following error? I believe my controllers
are set up correctly, but Spring is complaining 
Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.De faultAnnotationHandlerMapping#0': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Cannot map handler 'testController1' to URL path [/index]: There is already handler of type [TestController2$$EnhancerByCGLIB$$7e0a1cc4] mapped.
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean
Does anyone know what this above error message means and some things to look for in resolving it?
I am using Spring 3.0.5.
Thanks for any advice on this!
-
Jun 5th, 2012, 10:44 AM
#2
You already have one registered @Controller (TestController2) mapped to the /index URL path. Choose which one of your controller should handle a /index request, either TestController1 OR TestController2 but not both.
-
Jun 5th, 2012, 12:10 PM
#3
Ok, I see -
sub1/index.html
or
sub2/index.html
would be two different URL paths, but /index alone would not work. So, I need to find out where the URLs are not
being differentiated by the subdirectory, in the path. There must be some mistake somewhere causing just /index to be
mapped, which is not correct.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules