title: OpenSAML3 resource not found 'default-config.xml' in OSGi container
body: <p>I'm trying to upgrade to OpenSAML 3 in an OSGi bundle running on Apache Karaf (4.0.5) using opensaml servicemix bundle (<code>org.apache.servicemix.bundles:org.apache.servicemix.bundles.opensaml:jar:3.2.0_1</code>).</p>
  
  <p>A test that parses the SAML is working so I think I'm on the right track. However, if I install the bundle on Karaf I get a <strong>"resource not found"</strong> error when it's trying to load <code>default-config.xml</code>.</p>
  
  <pre><code>2016-06-21 16:29:10,477 | INFO  | ool-120-thread-1 | InitializationService            | 388 - org.apache.servicemix.bundles.opensaml - 3.2.0.1 | Initializing OpenSAML using the Java Services API
  2016-06-21 16:29:10,478 | DEBUG | ool-120-thread-1 | InitializationService            | 388 - org.apache.servicemix.bundles.opensaml - 3.2.0.1 | Initializing module initializer implementation: org.opensaml.core.xml.config.XMLObjectProviderInitializer
  2016-06-21 16:29:10,487 | DEBUG | ool-120-thread-1 | XMLConfigurator                  | 388 - org.apache.servicemix.bundles.opensaml - 3.2.0.1 | XMLObjectProviderRegistry did not exist in ConfigurationService, will be created
  2016-06-21 16:29:10,488 | DEBUG | ool-120-thread-1 | ractXMLObjectProviderInitializer | 388 - org.apache.servicemix.bundles.opensaml - 3.2.0.1 | Loading XMLObject provider configuration from resource 'default-config.xml'
  2016-06-21 16:29:10,489 | ERROR | ool-120-thread-1 | ractXMLObjectProviderInitializer | 388 - org.apache.servicemix.bundles.opensaml - 3.2.0.1 | Problem loading configuration resource
  org.opensaml.core.xml.config.XMLConfigurationException: Resource not found
      at org.opensaml.core.xml.config.AbstractXMLObjectProviderInitializer.init(AbstractXMLObjectProviderInitializer.java:54)[388:org.apache.servicemix.bundles.opensaml:3.2.0.1]
      at org.opensaml.core.xml.config.XMLObjectProviderInitializer.init(XMLObjectProviderInitializer.java:45)[388:org.apache.servicemix.bundles.opensaml:3.2.0.1]
      at org.opensaml.core.config.InitializationService.initialize(InitializationService.java:56)[388:org.apache.servicemix.bundles.opensaml:3.2.0.1]
  </code></pre>
  
  <p><code>AbstractXMLObjectProviderInitializer</code> is loading the resource as follows (<code>resource</code> is <code>default-config.xml</code>):</p>
  
  <pre><code>Thread.currentThread().getContextClassLoader().getResourceAsStream(resource)
  </code></pre>
  
  <p><code>default-config.xml</code> is located in the root of the (opensaml) jar which makes me wonder if that's the reason it cannot be found.</p>
  
  <p>I'm using the <code>maven-bundle-plugin</code> in my project and on top of the dependency and various uses of opensaml classes I provided explicit imports (<code>Import-Package</code>) for the following packages:</p>
  
  <pre><code>org.opensaml.core.xml.config,
  org.opensaml.saml.config,
  org.opensaml.xmlsec.config,
  </code></pre>
  
  <p>Is there anything I am missing in my bundle's manifest or elsewhere to make this work? I presume the opensaml bundle released by servicemix itself should be working as is...</p>