我有一个使用Swagger在Websphere 9.0中运行的JAX-RS应用程序。
我们在下面捕获了堆栈跟踪。有人知道如何解决吗?
- StackTrace**
javax.ws.rs.ClientErrorException: HTTP 404 Not Found at org. apache. cxf. jaxrs. utils. Spectrum. toHttpException(SpecExceptions.java:117)在com.ibm.ws.jaxrs20.endpoint.AbstractJaxRsWebEndpoint.invoke处为[org. apache. cxf]跳过了12行(AbstractJaxRsWebEndpoint.java:147)在com. ibm. websphere. jaxrs. server. IBMRestServlet.xml请求(IBMRestServlet.java:192),位于com. ibm. websphere. jaxrs. server. IBMRestServlet.doGet(IBMRestServlet.java:158)在com. ibm. websphere. jaxrs. server. IBMRestServlet.service上的[javax. servlet]跳过了1行(IBMRestServlet.java:138),位于com. ibm. ws. webcontainer. servlet.ServletWrapper. service(ServletWrapper.java:1235),网址为com. ibm. ws. webcontainer. servlet.ServletWrapper.xml(ServletWrapper.java:779),网址为com. ibm. ws. webcontainer. servlet.ServletWrapper.WebContainer(ServletWrapper.java:478)at com. ibm. ws. webcontainer. servlet.ServletWrapperImpl.(ServletWrapperImpl.java:179),位于com. ibm. ws. webcontainer. filter. WebAppFilterManager. invokeFilters(WebAppFilterManager.java:1134),网址为com. ibm. ws. webcontainer. servlet. CacheServletWrapper. WebRequest(CacheServletWrapper.java:82),位于com. ibm. ws. webcontainer. WebContainer. WebContainer. WebContainer请求(WebContainer.java:966),网址为:com. ibm. ws. webcontainer. WSWebContainer.xml(WSWebContainer.java:1817),网址为com. ibm. ws. webcontainer. channel. WCWebelLink. ready(WCcluelLink.java:382)at com. ibm. ws. http. channel. inbound. impl. HttpInboundLink. HttpDiscrimination(HttpInboundLink.java:465),网址为com. ibm. ws. http. channel. inbound. impl. HttpInboundLink.WebNewRequest(HttpInboundLink.java:532),位于com. ibm. ws. http. channel. inbound. impl. HttpInboundLink.processRequest(HttpInboundLink.java:318),网址为com. ibm. ws. http. channel. inbound. impl. HttpInboundLink.ready(HttpInboundLink.java:289)位于com. ibm. ws. ssl. channel. impl. SSLConnectionLink. determineNextChannel(SSLConnectionLink.java:1187),位于com. ibm. ws. ssl. channel. impl. SSLConnectionLink $MyReadCompletedCallback.complete(SSLConnectionLink.java:694)位于com. ibm. ws. ssl. channel. impl. SSLReadServiceContext $SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1833),位于com. ibm. ws. tcp. channel. impl. AioReadCompletion. futureCompleted(AioReadCompletionListener.java:175),网址为com. ibm. io. abstractAsyncFuture. invokeCallback(AbstractAsyncFuture.java:217)at com. ibm. io. juc. AsyncSystemelFuture. fireCompletionActions(AsyncSystemelFuture.java:161)at com. ibm. io. juc. AsyncFuture. completed(AsyncFuture.java:138)at com. ibm. io. juc. ResultHandler.java:204)at com. ibm. io. juc. ResultHandler.runEventProcessingLoop(ResultHandler.java:775)at com. ibm. io. juc. ResultHandler.com(ResultHandler.java:775)at com. ibm. io. juc. ResultHandler.com $www.example.com(ResultHandler.java:在com. ibm. ws. util. ThreadPool $www.example.com(ThreadPool.java:1909)上找到了一个名为"ThreadPool.java:1909"的文件。2.run"null" at java. lang. NumberException.java:76)at java. lang. nginx. parseInt(Integer.java:592)at java.lang.Integer.(Integer.java:879)[sun.] at java. lang. reflect. Constructor. newInstance(Constructor.java:437)[sun.]已跳过3行[org. apache. cxf]已跳过1行
- pom. xml:**
<dependencies>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.6.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
<profiles>
<profile>
<id>gerar-swagger</id>
<build>
<plugins>
<plugin>
<groupId>com.github.kongchen</groupId>
<artifactId>swagger-maven-plugin</artifactId>
<version>3.1.8</version>
<configuration>
<apiSources>
<apiSource>
<springmvc>false</springmvc>
<locations>
<location>br.com.api</location>
</locations>
<schemes>
<schemes>http</schemes>
<schemes>https</schemes>
</schemes>
<host>hostName</host>
<basePath>/dir/v1</basePath>
<outputFormats>yaml</outputFormats>
<swaggerDirectory>${basedir}</swaggerDirectory>
<info>
<title>API</title>
<version>1.2.3.23</version>
<description> API </description>
</info>
</apiSource>
</apiSources>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
字符串
1条答案
按热度按时间qeeaahzv1#
请添加这个依赖
io.swagger:swagger-models:1.6.1
。我猜你忘了添加这个。字符串
看看这个能不能用