gpt4 book ai didi

java - tomcat 日志不显示 com.sun.jersey.api.core.ScanningResourceConfig.logClasses 找到根资源类

转载 作者:行者123 更新时间:2023-11-28 22:16:21 25 4
gpt4 key购买 nike

我正在将 war 部署到两个 instances(containers) 中,其中部署了相同的 tomcat image。当我在第一个实例中部署 war 时,它显示以下 log 并且工作正常

25-Jan-2018 11:06:29.523 INFO [localhost-startStop-2] 
com.sun.jersey.api.core.PackagesResourceConfig.init Scanning for root
resource and provider classes in the packages:
io.swagger.jaxrs.json
io.swagger.jaxrs.listing
com.example.metrics.service
com.example.batch.service
com.example.metrics.rest
25-Jan-2018 11:06:29.599 INFO [localhost-startStop-2]
com.sun.jersey.api.core.ScanningResourceConfig.logClasses Root resource
classes found:
class com.nuovo.streamseer.sentinel.metrics.service.SentinelMetricService
class com.example.batch.service.BatchDataService
class com.example.rest.ProcessorDataRS
class com.example.metrics.rest.DataRS
class io.swagger.jaxrs.listing.ApiListingResource
class com.example.metrics.rest.CombinedRS
class com.example.metrics.rest.AlterRS
25-Jan-2018 11:06:29.599 INFO [localhost-startStop-2]
com.sun.jersey.api.core.ScanningResourceConfig.logClasses Provider classes found:
class io.swagger.jaxrs.listing.SwaggerSerializers
class io.swagger.jaxrs.json.JacksonJsonProvider
25-Jan-2018 11:06:29.719 INFO [localhost-startStop-2]
com.sun.jersey.server.impl.application.WebApplicationImpl._initiate
Initiating Jersey application, version 'Jersey: 1.8-ea03 06/10/2011 03:17 PM'
25-Jan-2018 11:06:31.320 INFO [localhost-startStop-2]
org.apache.catalina.startup.HostConfig.deployWAR Deployment of web
application archive [/usr/local/tomcat/webapps/sat-metrics.war] has finished in [9,964] ms

但是当我尝试将相同的 war(sat-metrics.war) 上传到另一个容器时,我得到以下日志并且它不起作用

25-Jan-2018 11:05:38.056 INFO [localhost-startStop-3] com.sun.jersey.api.core.PackagesResourceConfig.init Scanning for root resource and provider classes in the packages:
io.swagger.jaxrs.json
io.swagger.jaxrs.listing
com.example.metrics.service
com.example.batch.service
com.example.metrics.rest
25-Jan-2018 11:05:38.112 INFO [localhost-startStop-3] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/usr/local/tomcat/webapps/sat-metrics.war] has finished in [7,462] ms

我发现的区别是在第一个 container 日志中它能够找到“根类”,但在第二个 container 日志中没有 root classes信息。

可能是什么问题,我该如何解决

最佳答案

我找到了问题所在,WEB-INF/lib 文件夹中有两个版本的 Jersey JAR 文件。消除冲突后,它起作用了。

关于java - tomcat 日志不显示 com.sun.jersey.api.core.ScanningResourceConfig.logClasses 找到根资源类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48441701/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com