org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping. Cannot map 'accessTokenController' method protected org.springframework.web.servlet.ModelAndView org.apereo.cas.support.oauth.web.OAuth20AccessTokenController.handleRequestInternal(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.lang.Exception to {[/oauth2.0/accessToken],methods=[POST]}: There is already 'oauth20AccessTokenController' bean method protected org.springframework.web.servlet.ModelAndView org.apereo.cas.support.oauth.web.OAuth20AccessTokenController.handleRequestInternal(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.lang.Exception mapped.

GitHub | yisiqi | 5 months ago
  1. 0

    GitHub comment 1886#232291813

    GitHub | 5 months ago | yisiqi
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping. Cannot map 'accessTokenController' method protected org.springframework.web.servlet.ModelAndView org.apereo.cas.support.oauth.web.OAuth20AccessTokenController.handleRequestInternal(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.lang.Exception to {[/oauth2.0/accessToken],methods=[POST]}: There is already 'oauth20AccessTokenController' bean method protected org.springframework.web.servlet.ModelAndView org.apereo.cas.support.oauth.web.OAuth20AccessTokenController.handleRequestInternal(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.lang.Exception mapped.
  2. 0

    DataSourceInitializer does not get called

    Stack Overflow | 1 year ago | Sergei Ledvanov
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [com/myapp/conf/DatabaseConfig.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: CustomersPU] Unable to build Hibernate SessionFactory
  3. 0

    GitHub comment 37#180982141

    GitHub | 10 months ago | MarcGiffing
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverEndpointExporter' defined in class path resource [com/giffing/wicket/spring/boot/starter/web/config/WicketWebInitializerAutoConfig$WebSocketWicketWebInitializerAutoConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: javax.websocket.server.ServerContainer not available
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Could not autowire field + Injection of autowired dependencies failed

    Stack Overflow | 3 years ago | Mario
    org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.hibernate.Ses sionFactory net.viralpatel.spring3.dao.ContactDAOImpl.sessionFactory; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionExcept ion: No matching bean of type [org.hibernate.SessionFactory] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
  6. 0

    I am getting "org.springframework.beans.BeanInstantiationException" due to "unresolved compilation problems"

    Stack Overflow | 2 years ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'urlMapping' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'registerProfileController' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [default.controller.RegisterProfileController]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems: The import org.springframework cannot be resolved The import org.springframework cannot be resolved The import org.springframework cannot be resolved The import org.springframework cannot be resolved SimpleFormController cannot be resolved to a type Errors cannot be resolved to a type ModelAndView cannot be resolved to a type BindException cannot be resolved to a type ModelAndView cannot be resolved to a type ModelAndView cannot be resolved to a type The method getFormView() is undefined for the type RegisterProfileController ...

  1. tfr 2 times, last 4 months ago
  2. linxiaolong 3 times, last 2 months ago
  3. qavid 24 times, last 5 months ago
7 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.springframework.beans.factory.BeanCreationException

    Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping. Cannot map 'accessTokenController' method protected org.springframework.web.servlet.ModelAndView org.apereo.cas.support.oauth.web.OAuth20AccessTokenController.handleRequestInternal(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.lang.Exception to {[/oauth2.0/accessToken],methods=[POST]}: There is already 'oauth20AccessTokenController' bean method protected org.springframework.web.servlet.ModelAndView org.apereo.cas.support.oauth.web.OAuth20AccessTokenController.handleRequestInternal(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.lang.Exception mapped.

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean()
  2. Spring Beans
    AbstractAutowireCapableBeanFactory.createBean
    1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578)[spring-beans-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)[spring-beans-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)[spring-beans-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    3 frames