One Star

Reload/unload native libraries without restarting Talend ESB container

Hi, I have question,
Is it possible somehow to reload/unload native libraries (for example dll files) without restarting whole Talend ESB container, only restarting bundle and how it can be done.
6 REPLIES
Moderator

Re: Reload/unload native libraries without restarting Talend ESB container

Hi,
What's your job requirement? Do you want to use your own configuration or change some default setting in Talend ESB container? Could you please share more information about your current scenario with us in forum?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Reload/unload native libraries without restarting Talend ESB container

Hi,
We are using default Talend ESB container settings and we haven't changed anything.
We have requirement to be able to re-deploy (update to new version) bundle without restarting container. The mentioned dll is inside bundle, which shall be able to be re-deployed.
The problem is, that we are we are unable to unload loaded dll during bundle stop procedure. We found only one solution to unload dll - restarting whole Talend ESB container and this solution doesn't implement mentioned requirement.
So, we are looking for solution how to unload dll library, which is included in the bundle, without restarting whole Talend ESB container.
Employee

Re: Reload/unload native libraries without restarting Talend ESB container

Hi,
Just want to check with you , did you already try "karaf@trun>refresh bundle#" command in the container console? instead of "stop/start" command.
Regards.
One Star

Re: Reload/unload native libraries without restarting Talend ESB container

This not working for us, because when you re-deploy bundle (overwrite older bundle, which is running, with the never), Talend ESB automatically stops and starts bundle. We receive an error during the start of bundle "", that dll is loaded by other classloader and when we try access functionality of dll, we get an error that loaded libraries cannot be found, but after Talend is restarted, everything works perfectly.
Received error:
Caused by: java.lang.UnsatisfiedLinkError: Native Library D:\Programs\Talend\Talend-ESB-V5.3.1\container\lib\native\avutil-52.dll already loaded in another classloader
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1923)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1882)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1843)
at java.lang.Runtime.load0(Runtime.java:795)
at java.lang.System.load(System.java:1061)
Employee

Re: Reload/unload native libraries without restarting Talend ESB container

Seems your dll is in another place than be packaged into bundle itself. could you please try to package it into bundle and add Bundle-NativeCode header in the manifest like this:
Bundle-NativeCode: /lib/avutil-52.dll; osname=win32; osname=win64; processor=x86; processor=x86_64
(osname and processor should match what OS you're using)
Regards.
One Star

Re: Reload/unload native libraries without restarting Talend ESB container

Thx Xldai for your response.
Actually we tried adding dll inside of jar, but we didnt try adding mentioned information to manifest. So we will try and we will let you know if it worked.