From: Tom Pantelis Date: Thu, 31 May 2018 19:35:06 +0000 (-0400) Subject: Fix jersey 2 WARNs in RestconfApplication X-Git-Tag: release/fluorine~69 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=40b712983f3f6496e68d9056c2ba7ecf15c76449;p=netconf.git Fix jersey 2 WARNs in RestconfApplication 16:11:13 2018-05-31T16:08:28,928 | WARN | Blueprint Extender: 2 | Providers | 197 - org.glassfish.jersey.core.jersey-common - 2.25.1 | A provider org.opendaylight.netconf.sal.restconf.impl.ControllerContext registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime. Due to constraint configuration problems the provider org.opendaylight.netconf.sal.restconf.impl.ControllerContext will be ignored. 16:11:13 2018-05-31T16:08:28,929 | WARN | Blueprint Extender: 2 | Providers | 197 - org.glassfish.jersey.core.jersey-common - 2.25.1 | A provider org.opendaylight.netconf.sal.restconf.impl.BrokerFacade registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime. Due to constraint configuration problems the provider org.opendaylight.netconf.sal.restconf.impl.BrokerFacade will be ignored. We shouldn't return ControllerContext and BrokerFacade as singletons. Change-Id: I64aa7c6da97fa12f0203b8664d07c1af04f93c6b Signed-off-by: Tom Pantelis --- diff --git a/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/rest/impl/RestconfApplication.java b/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/rest/impl/RestconfApplication.java index 54a81d6b98..4a49edf691 100644 --- a/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/rest/impl/RestconfApplication.java +++ b/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/rest/impl/RestconfApplication.java @@ -14,19 +14,16 @@ import javax.ws.rs.core.Application; import org.opendaylight.netconf.md.sal.rest.schema.SchemaExportContentYangBodyWriter; import org.opendaylight.netconf.md.sal.rest.schema.SchemaExportContentYinBodyWriter; import org.opendaylight.netconf.md.sal.rest.schema.SchemaRetrievalServiceImpl; -import org.opendaylight.netconf.sal.restconf.impl.BrokerFacade; import org.opendaylight.netconf.sal.restconf.impl.ControllerContext; import org.opendaylight.netconf.sal.restconf.impl.StatisticsRestconfServiceWrapper; public class RestconfApplication extends Application { private final ControllerContext controllerContext; - private final BrokerFacade brokerFacade; private final StatisticsRestconfServiceWrapper statsServiceWrapper; - public RestconfApplication(ControllerContext controllerContext, BrokerFacade brokerFacade, + public RestconfApplication(ControllerContext controllerContext, StatisticsRestconfServiceWrapper statsServiceWrapper) { this.controllerContext = controllerContext; - this.brokerFacade = brokerFacade; this.statsServiceWrapper = statsServiceWrapper; } @@ -46,8 +43,6 @@ public class RestconfApplication extends Application { public Set getSingletons() { final Set singletons = new HashSet<>(); final SchemaRetrievalServiceImpl schemaRetrieval = new SchemaRetrievalServiceImpl(controllerContext); - singletons.add(controllerContext); - singletons.add(brokerFacade); singletons.add(schemaRetrieval); singletons.add(new RestconfCompositeWrapper(statsServiceWrapper, schemaRetrieval)); singletons.add(new RestconfDocumentedExceptionMapper(controllerContext)); diff --git a/restconf/restconf-nb-bierman02/src/main/resources/org/opendaylight/blueprint/restconf-config.xml b/restconf/restconf-nb-bierman02/src/main/resources/org/opendaylight/blueprint/restconf-config.xml index 75163a821c..61201af0f3 100644 --- a/restconf/restconf-nb-bierman02/src/main/resources/org/opendaylight/blueprint/restconf-config.xml +++ b/restconf/restconf-nb-bierman02/src/main/resources/org/opendaylight/blueprint/restconf-config.xml @@ -85,7 +85,6 @@ -