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.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via GitHub by yisiqi
, 1 year ago
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
via Stack Overflow by Carlos Ivan Rangel
, 1 month ago
Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is
via GitHub by MarcGiffing
, 1 year ago
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
via youtube.com by Unknown author, 2 years ago
Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/spring-servlet.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: Unable to load class declared as <mapping class="com.joseph.model.Student"/> in the configuration:
via sencide.com by Unknown author, 1 year ago
Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/hibernate/InvalidMappingException
via Google Groups by Adam Franco, 3 months ago
Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]: Invocation of init method failed; nested exception is java.lang.IncompatibleClassChangeError: Implementing class
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(AbstractAutowireCapableBeanFactory.java:1578)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
24 times, 1 year ago
3 times, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.