[ome-devel] Sl4j classpath issues in deployed Matlab
Sebastien Besson (Staff)
s.besson at dundee.ac.uk
Thu Mar 30 14:32:41 BST 2017
Hi Ian,
I think Curtis summarised the nature of the warning which should be harmless albeit
annoying. For reference, OME was historically using log4j and switched to logback
as the default logging implementation a few years ago [1].
Moving towards individual JARs as Curtis suggests might be the best way to enable full
control of the dependencies and prevent conflict in an environment like MATLAB.
In the short term, a third alternative might be to use the loci_tools.jar rather than
bioformats_package.jar. The only difference between both bundle JARs is effectively the
logging implementation shipped (log4j vs logback).
Best,
Sebastien
[1] https://github.com/openmicroscopy/bioformats/pull/889/
On 30 Mar 2017, at 13:49, Munro, Ian <i.munro at imperial.ac.uk<mailto:i.munro at imperial.ac.uk>> wrote:
Thanks Curtis
Sounds like 2) would be the way to go then.
Ian
On 30 Mar 2017, at 13:30, Curtis Rueden <ctrueden at wisc.edu<mailto:ctrueden at wisc.edu>> wrote:
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<mailto: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/Library/Application%20Support/.mcrCache9.1/FLIMfi0/BFMatlab/bioformats_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<mailto:ome-devel at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
_______________________________________________
ome-devel mailing list
ome-devel at lists.openmicroscopy.org.uk<mailto:ome-devel at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
_______________________________________________
ome-devel mailing list
ome-devel at lists.openmicroscopy.org.uk<mailto:ome-devel at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
The University of Dundee is a registered Scottish Charity, No: SC015096
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20170330/1d08f016/attachment.html>
More information about the ome-devel
mailing list