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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Import Package into Talend Medation Route

I'm currently trying to import another package that I have exported within my karaf runtime.
I want to make a method call from the other package that will return some data.
I know the package has been exported because when I use 'packages:exports' in karaf I can see the package, but when I try to import it into my bean I get an error saying "the import com.sample cannot be resolved" from within my bean.
Any ideas would be greatly appreciated.
Labels (2)
3 Replies
Anonymous
Not applicable
Author

Hi,
Could you please indicate the talend esb product build version you're using?
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi Sabrina,
I'm using Talend 5.4.1 Open Studio
Anonymous
Not applicable
Author

I found the solution to this if anyone is interested.
What I had to do was edit the route Manifest file to import the package that was being exported in the OSGi container.
After that I had to reference the service through the Spring DM editor within the Studio.
I changed the namespace to look as follows.
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:camel="http://camel.apache.org/schema/spring"
xmlns:context="http://www.springframework.org/schema/context"
xmlns 0683p000009MA5A.pngsgi="http://www.springframework.org/schema/osgi"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring- beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd">
After that I could reference the service through the tag
<osgi:reference id="myUDPService" interface="com.myosgi.UDPService"/>
Once I had done this I just dropped a cBean, and referenced the bean through the Id "myUDPService", selected the method and was set to go!