I'm migrating a route that uses a resource file from within the spring configuration. In 6.5.1 this worked fine, but in 7.1.1 it cannot find the resource, despite the fact that it is included in the .jar file. This seems to be something in the way that Spring is now run from within Blueprint, and I read lots of things about OSGi using different ClassLoaders and problems therein.
As an alternative approach, I've tried instantiating a ClassLoader bean in Spring and using the getResourceAsStream method directly, but even this doesn't work - presumably because I'm getting the "wrong" ClassLoader.
If I do this from within the generated java class, as a processor (i.e. this.getClass().getClassLoader().getResourceAsStream("my/resource.txt") ) it can find it, but if I try using the Spring PathMatchingResourcePatternResolver it works fine in Studio but breaks when deployed to runtime, with an error stating that the bundle-resource isn't part of the filesystem. (The resources are found as actual files in the filesystem when run from the studio.
Is this a fault in Spring itself, or in the way Talend is wrapping Spring within Blueprint?
How should I reference a route resource from within the Spring configuration in ESB 7.1.1?
We have redirected your issue to our ESB experts and then come back to you as soon as we can.
Thank you for your time.
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Take a look at this technical overview video of Talend API Designer
Find out how to get started with APIs