camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rsteppac2 <r...@steppacher.name>
Subject getResourceAsStream in OSGi bundle not working with Camel 2.19
Date Fri, 14 Jul 2017 14:01:33 GMT
Hello all,

I am trying to migrate to Camel 2.19 and came across an in issue where
loading resources from an OSGi bundle stopped working. The issue is not
reproducible with versions 2.18.4 and lower. I tried Karaf 4.0.9 and 4.1.1;
the Karaf version does not appear to matter.

In my case the resource is at the root of the bundle that has the code
trying to load it as a stream. The calling code is in a library embed in the
bundle JAR. Whether I inline the library or not does not seem to matter. The
call that now returns null instead of a stream instance is: 

Thread.currentThread().getContextClassLoader().getResourceAsStream("httl.properties");

The resource is loaded as part of the factory triggered via Blueprint: 

<bean id="httlEngine" class="httl.Engine" factory-method="getEngine" />

Am I possibly hitting https://issues.apache.org/jira/browse/CAMEL-5223? 
Is there a known workaround?


Thanks!
Ralf



--
View this message in context: http://camel.465427.n5.nabble.com/getResourceAsStream-in-OSGi-bundle-not-working-with-Camel-2-19-tp5807017.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message