-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with the class org.apache.commons.math3.random.JDKRandomGenerator #5
Comments
The problem is that
From the user perspective, you can try to delete |
Hi Apologies for the late reply. Just back from vacations. We did a lot of tests with Fiji on different architectures to ensure there were no problems with the Apache library and they did work. The only problem that can arrise is that we have the Apache library included in our jar and you might have the apache library alread with Fiji. We do not overwrite classes of the Apache library. The class names definition during execution (i.e. the ones that comes with our jar and the one present in Fiji) should generate a Warning but no Exception should be generated. The class defined in the library provided by us is used since it is that one that is specifically included in our code. I will have a look on again on the error trace. |
Would it be possible for you to attach the image that generates the error above ? |
@erexhepa wrote:
The issue is not with overwriting, but with shipping the library in an Uber-JAR, as it can lead to version skew, see: |
yes sorry misunderstood what you meant above. |
i'm also getting an exception in addition to a warning. Full trace below.
|
Hi, happy to help you figure out what the problem is. Can you attach the image you used to get this error ? What version of Fiji you're using and what operating system you're running ? Elton |
@tlambert03 wrote:
It seems you have multiple conflicting plugins installed that all ship different (and possibly incompatible) versions of In an up-to-date Fiji installation (running on Java 8, not Java 6), you should have version
I would expect that updating Fiji would already help in your case, as currently the old version As a longer term solution, the developers of both |
thank you both! (particularly for helping with something that is only tangentially related to SME). I'm on OS X 10.12.6, using images from the sample dataset (dendrites.tif for example). I generally do try to run Fiji update on a regular basis, and in this case running Fiji update and/or ImageJ update didn't solve anything. Yes, it does work to simply remove all of the conflicting Anyway, it's simple enough for me to just use the freshly-downloaded version of Fiji. If it's obvious to you what was wrong with my older version, I'd be curious to know. But thank you both for your time, and thanks a lot for the cool method and plugin. |
no worries. We are happy to help you run the plugin. Both the working and non-working version of Fiji you have seem to be the same release (1.51r but this refers to ImageJ not FIJI), maybe different builds but they should very very similar with regard to ImageJ so I don't know how the old apache library
ended up in the Fiji folder for the non-working version but my guess is that you installed Fiji a long time ago. The FIJI update should update all libraries and plugin that are registered for update and this probematic library is not updated because it was not registered for updates. You maybe have a very old Fiji installation and should install (as imagejan suggested) an uptodate version of Fiji (which you have done and seems to solve the problem for running the plugin). Anyway imagejan is right for longterm management/compatibility we should use maven for managing all compatibility issues. |
Error message when running plugin:
Padding Done !
There was a problem with the class org.apache.commons.math3.random.JDKRandomGenerator which can be found here:
/Applications/Fiji.app/jars/commons-math3-3.4.1.jar
/Applications/Fiji.app/plugins/SME_stacking.jar
WARNING: multiple locations found!
java.lang.NoSuchMethodError: org.apache.commons.math3.random.JDKRandomGenerator.(I)V
at SME_PROJECTION_SRC.SME_ENS_Kmean_Control.Kmeans_(SME_ENS_Kmean_Control.java:351)
at SME_PROJECTION_SRC.SME_ENS_Kmean_Control.applyKmeans(SME_ENS_Kmean_Control.java:47)
at SME_PROJECTION_SRC.SME_Plugin_Get_Manifold.runKmeans(SME_Plugin_Get_Manifold.java:180)
at SME_PROJECTION_SRC.SME_Plugin_Simple_CONF.runKmeansStep(SME_Plugin_Simple_CONF.java:92)
at SME_PROJECTION_SRC.SME_Plugin_Simple_CONF.getManifold(SME_Plugin_Simple_CONF.java:78)
at SME_PROJECTION_SRC.SME_Plugin_Simple_CONF.runConfColour(SME_Plugin_Simple_CONF.java:329)
at SME_PROJECTION_SRC.SME_Plugin_Simple.run(SME_Plugin_Simple.java:249)
at ij.IJ.runUserPlugIn(IJ.java:217)
at ij.IJ.runPlugIn(IJ.java:181)
at ij.Executer.runCommand(Executer.java:137)
at ij.Executer.run(Executer.java:66)
at java.lang.Thread.run(Thread.java:748)
java.lang.NoSuchMethodException: Could not find method org.apache.commons.math3.random.JDKRandomGenerator.(I)V
There was a problem with the class org.apache.commons.math3.random.JDKRandomGenerator which can be found here:
/Applications/Fiji.app/jars/commons-math3-3.4.1.jar
/Applications/Fiji.app/plugins/SME_stacking.jar
WARNING: multiple locations found!
java.lang.NoSuchMethodError: org.apache.commons.math3.random.JDKRandomGenerator.(I)V
at SME_PROJECTION_SRC.SME_ENS_Kmean_Control.Kmeans_(SME_ENS_Kmean_Control.java:351)
at SME_PROJECTION_SRC.SME_ENS_Kmean_Control.applyKmeans(SME_ENS_Kmean_Control.java:47)
at SME_PROJECTION_SRC.SME_Plugin_Get_Manifold.runKmeans(SME_Plugin_Get_Manifold.java:180)
at SME_PROJECTION_SRC.SME_Plugin_Simple_CONF.runKmeansStep(SME_Plugin_Simple_CONF.java:92)
at SME_PROJECTION_SRC.SME_Plugin_Simple_CONF.getManifold(SME_Plugin_Simple_CONF.java:78)
at SME_PROJECTION_SRC.SME_Plugin_Simple_CONF.runConfColour(SME_Plugin_Simple_CONF.java:329)
at SME_PROJECTION_SRC.SME_Plugin_Simple.run(SME_Plugin_Simple.java:249)
at ij.IJ.runUserPlugIn(IJ.java:217)
at ij.IJ.runPlugIn(IJ.java:181)
at ij.Executer.runCommand(Executer.java:137)
at ij.Executer.run(Executer.java:66)
at java.lang.Thread.run(Thread.java:748)
The text was updated successfully, but these errors were encountered: