restlet_client调试接口异常

IT教程 2年前 (2020) http://www.hebbaijiu.com/
612

restlet

HTTP Status 500 - Servlet.init() for servlet dispatcher threw exception

type Exception report message Servlet.init() for servlet dispatcher threw exception

description The server encountered an internal error that prevented it from fulfilling this request.exception

javax.servlet.ServletException: Servlet.init() for servlet dispatcher threw exception

org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)

org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)

org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132)

org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)

org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2521)

org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2510)

java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

java.lang.Thread.run(Thread.java:748)

root cause

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping found. Cannot map 'userController' bean method 

public com.mmall.common.ServerResponse<com.mmall.pojo.User> com.mmall.controller.portal.UserController.getUserInfo(javax.servlet.http.HttpSession)

to {[/user//getUserInfo.do],methods=[POST],params=[],headers=[],consumes=[],produces=[],custom=[]}: There is already 'userController' bean method

public com.mmall.common.ServerResponse<com.mmall.pojo.User> com.mmall.controller.portal.UserController.getUserInfo(javax.servlet.http.HttpSession,com.mmall.pojo.User) mapped.

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1553)

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)

org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)

org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)

org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)

org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)

org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:700)

org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)

org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)

org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:643)

org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:606)

org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:657)

org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:525)

org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:466)

org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)

javax.servlet.GenericServlet.init(GenericServlet.java:158)

org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)

org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)

org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132)

org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)

org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2521)

org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2510)

java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

java.lang.Thread.run(Thread.java:748)

root cause

java.lang.IllegalStateException: Ambiguous mapping found. Cannot map 'userController' bean method 

public com.mmall.common.ServerResponse<com.mmall.pojo.User> com.mmall.controller.portal.UserController.getUserInfo(javax.servlet.http.HttpSession)

to {[/user//getUserInfo.do],methods=[POST],params=[],headers=[],consumes=[],produces=[],custom=[]}: There is already 'userController' bean method

public com.mmall.common.ServerResponse<com.mmall.pojo.User> com.mmall.controller.portal.UserController.getUserInfo(javax.servlet.http.HttpSession,com.mmall.pojo.User) mapped.

org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.registerHandlerMethod(AbstractHandlerMethodMapping.java:176)

org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.detectHandlerMethods(AbstractHandlerMethodMapping.java:148)

org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.initHandlerMethods(AbstractHandlerMethodMapping.java:109)

org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.afterPropertiesSet(AbstractHandlerMethodMapping.java:89)

org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.afterPropertiesSet(RequestMappingHandlerMapping.java:163)

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612)

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)

org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)

org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)

org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)

org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)

org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:700)

org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)

org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)

org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:643)

org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:606)

org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:657)

org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:525)

org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:466)

org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)

javax.servlet.GenericServlet.init(GenericServlet.java:158)

org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)

org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)

org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132)

org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)

org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2521)

org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2510)

java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

java.lang.Thread.run(Thread.java:748)

note The full stack trace of the root cause is available in the Apache Tomcat/8.0.44 logs.

Apache Tomcat/8.0.44

问题原因:RequestMapping中有两个相同的value,保持唯一即可

文章回顾

大家看了本文restlet_client调试接口异常的精彩教程资源内容,是不是对restlet_client调试接口异常了解更多,真心希望restlet_client调试接口异常能帮助到你, 小编会一直给你带来更多教程资源文章信息。

版权声明:937a91e587e65498 发表于 2020-01-11 10:30:33。

本文由第三方用户分享仅代表作者观点,不代表本网站立场,秉承互联网开放分享的精神,目的在于传递更多信息,加强各行业互通交流,但对内容不作任何保证或承诺,请读者自行参考斟酌。网站发布的信息(包含但不限于版式、图片、字体、文章等素材)由第三方用户分享,版权归原作者所有,本站不承担任何相关的版权纠纷等相关责任。如您认为本篇内容侵犯了您的权益,请与我们联系,我们会及时处理。

禾百网专注于全网资源大全

转载请注明:
本文标题:restlet_client调试接口异常
本文地址:http://www.hebbaijiu.com/72693.html