Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Spring configuration in Talend ESB (SE) cannot reference resources in the runtime environment.

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?

 

Thanks!

Labels (2)
1 Reply
Anonymous
Not applicable
Author

Hello,

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.

Best regards

Sabrina