You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by João Assunção <jo...@exploitsys.com> on 2018/03/28 08:24:04 UTC

Is it possible to change the URI format of bundles ?

Hello all,

I'm integrating a 3rd party library where there is some code that uses the
codeSource location to find the location on disk of the jar itself. The way
it is done is flawed and only works if the URI maps to a file URI. This
means it will not work when deployed in Karaf where the jar URI is
something like jar:bundle://263.5:0/!/.  The jar location is not an
obligatory condition for the library to work and is more an additional path
to look for native libraries. Unfortunately, the developers didn't take the
precautions to handle a potential NPE while converting from a URI to an
absolute path. Since I don't have the code for the library and the supplier
is not willing to make changes, I'm looking up for a workaround for this
issue.

Is it possible to change the URI format used in Karaf for the bundles,
or some classloader trickery do the job?
Thanks in advance.

Regards,
João Assunção

Email: joao.assuncao@exploitsys.com
Mobile: +351 916968984
Phone: +351 211933149
Web: www.exploitsys.com