java - ResteasyHandlerMapping Resource Not Found for Swagger base url -


i trying integrate swagger project api documentation. resteasy unable map swagger base url inspite of config being provided.

i not sure if missing part of or not. have been doing research regarding few days , following documentation swagger integration documentation.

my web.xml

<context-param>     <param-name>contextconfiglocation</param-name>     <param-value>classpath:applicationcontext.xml</param-value> </context-param> <listener>     <listener-class>org.jboss.resteasy.plugins.spring.springcontextloaderlistener</listener-class> </listener>  <servlet>     <servlet-name>spring</servlet-name>     <servlet-class>org.springframework.web.servlet.dispatcherservlet</servlet-class>     <init-param>         <param-name>contextconfiglocation</param-name>         <param-value>/web-inf/spring/spring-servlet.xml</param-value>     </init-param>     <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping>     <servlet-name>spring</servlet-name>     <url-pattern>/</url-pattern> </servlet-mapping> 

my spring-servlet.xml

<annotation-driven /> <beans:import resource="classpath:springmvc-resteasy.xml" />  <beans:bean class="org.springframework.web.servlet.view.internalresourceviewresolver">     <beans:property name="prefix" value="/views/" />     <beans:property name="suffix" value=".jsp" /> </beans:bean>  <context:component-scan base-package="com.sample.web.controller" /> <context:component-scan base-package="com.*.web">     <context:include-filter type="annotation" expression="javax.ws.rs.ext.provider" /> </context:component-scan> 

my applicationcontext.xml

<context:component-scan base-package="com.sample" />  <bean class="com.wordnik.swagger.jaxrs.listing.apilistingresourcejson" /> <bean class="com.wordnik.swagger.jaxrs.listing.apideclarationprovider" /> <bean class="com.wordnik.swagger.jaxrs.listing.resourcelistingprovider" />  <bean id="beanconfig" class="com.wordnik.swagger.jaxrs.config.beanconfig">     <property name="title" value="swagger sample app"/>     <property name="version" value="1.0.0" />     <property name="basepath" value="http://localhost:8100/rest"/>     <property name="resourcepackage" value="com.sample.web.controller"/>     <property name="scan" value="true"/> </bean> 

on running project , checking url "localhost:8100/rest/api-docs/" receive following stack trace

error resteasyhandlermapping resource not found: not find resource relative : /rest/api-docs of full path: http://localhost:8100/rest/api-docs/ org.jboss.resteasy.spi.notfoundexception: no 

t find resource relative : /rest/api-docs of full path: localhost:8100/rest/api-docs/ @ org.jboss.resteasy.core.registry.rootsegment.matchchildren(rootsegment.java:360) @ org.jboss.resteasy.core.registry.rootsegment.matchroot(rootsegment.java:374) @ org.jboss.resteasy.core.registry.rootsegment.matchroot(rootsegment.java:367) @ org.jboss.resteasy.core.resourcemethodregistry.getresourceinvoker(resourcemethodregistry.java:297) @ org.jboss.resteasy.core.synchronousdispatcher.getinvoker(synchronousdispatcher.java:173) @ org.jboss.resteasy.springmvc.resteasyhandlermapping.getinvoker(resteasyhandlermapping.java:99) @ org.jboss.resteasy.springmvc.resteasyhandlermapping.gethandler(resteasyhandlermapping.java:76) @ org.springframework.web.servlet.dispatcherservlet.gethandler(dispatcherservlet.java:1104) @ org.springframework.web.servlet.dispatcherservlet.dodispatch(dispatcherservlet.java:916) @ org.springframework.web.servlet.dispatcherservlet.doservice(dispatcherservlet.java:877) @ org.springframework.web.servlet.frameworkservlet.processrequest(frameworkservlet.java:966) @ org.springframework.web.servlet.frameworkservlet.doget(frameworkservlet.java:857) @ javax.servlet.http.httpservlet.service(httpservlet.java:618) @ org.springframework.web.servlet.frameworkservlet.service(frameworkservlet.java:842) @ javax.servlet.http.httpservlet.service(httpservlet.java:725) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:291) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:206) @ org.apache.tomcat.websocket.server.wsfilter.dofilter(wsfilter.java:52) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:239) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:206) @ org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:219) @ org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:106) @ org.apache.catalina.authenticator.authenticatorbase.invoke(authenticatorbase.java:501) @ org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:142) @ org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve.java:79) @ org.apache.catalina.valves.abstractaccesslogvalve.invoke(abstractaccesslogvalve.java:610) @ org.apache.catalina.valves.remoteipvalve.invoke(remoteipvalve.java:673) @ org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve.java:88) @ org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:537) @ org.apache.coyote.http11.abstracthttp11processor.process(abstracthttp11processor.java:1085) @ org.apache.coyote.abstractprotocol$abstractconnectionhandler.process(abstractprotocol.java:658) @ org.apache.coyote.http11.http11nioprotocol$http11connectionhandler.process(http11nioprotocol.java:222) @ org.apache.tomcat.util.net.nioendpoint$socketprocessor.dorun(nioendpoint.java:1556) @ org.apache.tomcat.util.net.nioendpoint$socketprocessor.run(nioendpoint.java:1513) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615) @ org.apache.tomcat.util.threads.taskthread$wrappingrunnable.run(taskthread.java:61) @ java.lang.thread.run(thread.java:745)


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -