Announcement Announcement Module
Collapse
No announcement yet.
re: how to resolve BeanCreationException in autowiring Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

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

  • #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.

    Comment


    • #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.

      Comment

      Working...
      X