Discussion:
opensaml3 bundle running in OSGi container
clauds
2016-08-16 16:45:51 UTC
Permalink
I'm trying to get the servicemix opensaml3 bundle running on Apache Karaf
(4.0.5):
org.apache.servicemix.bundles:org.apache.servicemix.bundles.opensaml:jar:3.2.0_1
(I also tried using earlier versions of the bundle:
3.1.0._1/3.1.1_1/.../3.1.1_3)

When I deploy my bundle that calls the InitializationService I get a
"resource not found" when it's trying to load default-config.xml.

Does anybody have opensaml3 bundle running on an OSGi container?




--
View this message in context: http://servicemix.396122.n5.nabble.com/opensaml3-bundle-running-in-OSGi-container-tp5723954.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
clauds
2016-08-17 19:05:31 UTC
Permalink
I found a workaround which isn't very nice though...

In brevity I'm changing the TCCL before calling intialization. However, it's
ugly and the SPI config is not loaded which means I have to do more hacks...

// adapt TCCL
Thread thread = Thread.currentThread();
ClassLoader loader = thread.getContextClassLoader();

thread.setContextClassLoader(InitializationService.class.getClassLoader());
try {
InitializationService.initialize();
} finally {
// reset TCCL
thread.setContextClassLoader(loader);
}

See also on SO:
http://stackoverflow.com/questions/37948303/opensaml3-resource-not-found-default-config-xml-in-osgi-container/39004323#39004323





--
View this message in context: http://servicemix.396122.n5.nabble.com/opensaml3-bundle-running-in-OSGi-container-tp5723954p5723955.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Loading...