[ome-devel] Sl4j classpath issues in deployed Matlab

Curtis Rueden ctrueden at wisc.edu
Thu Mar 30 13:30:48 BST 2017


Hi Ian,

> SLF4J: Class path contains multiple SLF4J bindings.

Maybe the docs about that are helpful?
https://www.slf4j.org/codes.html#multiple_bindings

> if anyone has any thoughts on a work-around that would be great.

The error message suggests that MATLAB now ships its own SLF4J binding.
This makes sense, since best practice is for apps (like MATLAB and Fiji) to
choose and ship a binding, rather than for libraries to mandate one.
Otherwise, this situation can happen. Bio-Formats embeds an SLF4J binding
into the bioformats_package.jar via its dependency on logback-classic.
(Specifically: metakit and ome-common and bio-formats_plugins and
bio-formats_tools all depend on it.)

Fiji's strategy is to ship logback-classic as its chosen SLF4J binding;
fortunately, Fiji bundles no other libraries with conflicting bindings. But
since MATLAB now ships its own, a different solution is needed. There are a
couple of possibilities:

1) Change Bio-Formats to no longer depend on any JARs which include an
SLF4J binding. This would be a desirable change in general.

2) Change FLIMfit to stop using bioformats_package in favor of the
individual Bio-Formats JARs, and exclude the logback-classic dependency
from its dependency hierarchy.

Regards,
Curtis

--
Curtis Rueden
LOCI software architect - https://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
Did you know ImageJ has a forum? http://forum.imagej.net/


On Thu, Mar 30, 2017 at 5:34 AM, Munro, Ian <i.munro at imperial.ac.uk> wrote:

> Good afternoon
>
> I wondered if anyone has any thoughts on an issue we’re currently having.
> The next release of our FLIMfit application is nearly ready for release.
> However when running the deployed version we get a warning:
>
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in [jar:file:/Applications/MATLAB
> /MATLAB_Runtime/v91/java/jarext/slf4j/slf4j-log4j12.
> jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in [jar:file:/Users/imunro/Librar
> y/Application%20Support/.mcrCache9.1/FLIMfi0/BFMatlab/b
> ioformats_package.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
> explanation.
>
> see also https://github.com/flimfit/FLIMfit/issues/299
>
> Thiis seems to be a warning only but if anyone has any thoughts on a
> work-around that would be great.
> NB this arose with the recent move to Matlab 2016b.
>
> Many Thanks
>
> Ian
>
>
> _______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20170330/c146cf8b/attachment.html>


More information about the ome-devel mailing list