From: Robert Varga Date: Wed, 24 Oct 2018 21:01:25 +0000 (+0200) Subject: Force UntrustedXML to be initialized from activator X-Git-Tag: release/neon~75 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=b2a5ec266ccdfca559cfb6c2ea0cac652f5f52cd Force UntrustedXML to be initialized from activator Touching UntrustedXML during bundle activator should cause it to bind to the JRE XML provider rather than discovering other members via a TCCL. Change-Id: I9c6625be7873ed96d5e292a3165e7f319ac68b56 JIRA: CONTROLLER-1867 Signed-off-by: Robert Varga (cherry picked from commit 978ef9d2ccbbaf4e54aa43109f7af21603226516) --- diff --git a/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/BlueprintBundleTracker.java b/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/BlueprintBundleTracker.java index d3db327742..3f821ba731 100644 --- a/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/BlueprintBundleTracker.java +++ b/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/BlueprintBundleTracker.java @@ -22,6 +22,7 @@ import org.apache.aries.blueprint.services.BlueprintExtenderService; import org.apache.aries.quiesce.participant.QuiesceParticipant; import org.apache.aries.util.AriesFrameworkUtil; import org.opendaylight.controller.blueprint.ext.OpendaylightNamespaceHandler; +import org.opendaylight.yangtools.util.xml.UntrustedXML; import org.osgi.framework.Bundle; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; @@ -73,6 +74,9 @@ public class BlueprintBundleTracker implements BundleActivator, BundleTrackerCus public void start(final BundleContext context) { LOG.info("Starting {}", getClass().getSimpleName()); + // CONTROLLER-1867: force UntrustedXML initialization, so that it uses our TCCL to initialize + UntrustedXML.newDocumentBuilder(); + restartService = new BlueprintContainerRestartServiceImpl(); bundleContext = context; @@ -231,7 +235,7 @@ public class BlueprintBundleTracker implements BundleActivator, BundleTrackerCus * @param event the event to handle */ @Override - public void blueprintEvent(BlueprintEvent event) { + public void blueprintEvent(final BlueprintEvent event) { if (event.getType() == BlueprintEvent.CREATED) { LOG.info("Blueprint container for bundle {} was successfully created", event.getBundle()); return;