beast2
beast2 copied to clipboard
Solving ambiguous assertion in InputForAnnotatedConstructorTest
Hello,
I am the Debian maintainer of beast2. When I run InputForAnnotatedConstructorTest, I get error messages like
error: reference to assertEquals is ambiguous
[...]
both method assertEquals(Object,Object) in Assertions and method
assertEquals(double,double) in Assertions match
as an explicit conversion is needed in some assertions. I applied the attached patch and it solved the error.
Best,
Pierre
Hi Pierre,
Thanks for the patch!
Just curious why it won't run for Debian: beast2 is now released together with BeastFX, which contains all applications like BEAST, BEAUti, TreeAnnotator, etc. Since BeastFX relies on JavaFX, and some distributions of JavaFX are a bit temperamental, BEAST 2 is now released with a jre that includes JavaFX. The recommended one is from Azul since it seems to have the fewest problems.
Are you running tests with this JRE, or do you use a different one that is causing the error for InputForAnnotatedConstructorTest?
Hi Remco,
Thanks for looking at my patch and for your message!
I have indeed added the BeastFX source tarball to the beast2 Debian package to build it and have all the applications. Also I had the package depend on openjfx. However I trust the Azul JRE is not packaged for Debian and thus I cannot have beast2 depend on it: as a consequence beast2 runs against the JRE of OpenJDK17. I guess this is the reason for the error we are discussing.
Thanks again!
Best, Pierre
Hi Pierre,
Great to see that BeastFX is part of the beast2 package!
Thanks for the clarification regarding the jre. The reason BEAST 2 is now released only with a jre included is because it turned out to be quite hard to configure GUI applications for the OpenJDK, and we did not want to burden users with this. I trust you got it all sorted and BEAUti and other GUIs run without issues, but let me know if it does.
While we migrate more packages from v2.6 to v2.7, we keep finding small fixes are required, so plan a new release of at least BeastFX shortly. Hope it does not cause you too much work keeping things up to date.
Cheers,
Remco
Hi Remco,
You're welcome!
I had a bit of a difficult time handling the version.xml files. In the end I think I did it well since all tests are passing and small attempts to run the software as-installed did not end up with problems.
However I have just tried to launch bease2-mcmc with no argument and I got
java.lang.NullPointerException: Cannot invoke "java.io.InputStream.close()" because "
Does it mean something to you? I am getting the same issue with an invocation of beauti2 with no argument. The scripts I am talking about are in https://sources.debian.org/src/beast2-mcmc/2.7.2%2Bdfsg-1/debian/bin/ if you want to see them.
Exact lines are hidden because debug symbols are not shipped into the built jars but I can try to have them if this might help you.
Thanks for your attention and help,
Cheers, Pierre
Hi Pierre,
Sorry for the slow reply -- at startup, BEAST checks whether the BEAST.base and BEAST.app packages are up-to-date, and if not, creates these packages in the BEAST user package directory (~/.beast/2.7 for Linux and BEAST v2.7.x) by copying files from the beast folder to ~/.beast/2.7/BEAST.base and ~/.beast/2.7/BEAST.app.
The error message indicates copying one of the files failed. Since the jar files caused a bit of trouble being located in beast/lib they will be located in beast/lib/packages from v2.7.3 onward.
Starting BEAST with beast -loglevel debug potentially shows more information than the error message you posted.
I don't know much of the way Debian packages work, so I wonder whether it would be an option to create a Debian package that installs files, like the BEAST.base and BEAST.app packages directly in the user's directory?
Cheers,
Remco
Hi Remco,
Just dropping a quick note here: sorry also for the slow reply from me. I have started investigating a few days ago, got caught up by dayjob... looking at beast2 is high on my priority list and you should hear from me soon here!
Cheers, Pierre
Hi Remco,
Here I am; thanks a lot for your explanations, they helped me to understand what is going on quite a lot.
It turns out there is (in my opinion) no serious issue here, as the BEAST.app and BEAST.base are shipped into /usr/share/beast2-mcmc in the Debian package, and upgrading of beast is handled through apt. So I removed the installBEASTPackage invocations as everything should be correctly settled.
Indeed, some invocations of beast.pkgmgmt.launcher.BeastLauncher show up to be successful, although I met some OpenCL errors... I still wonder if I should handle them.
Yet I met another issue: when launching beauti2 with
java -Xms64m -Xmx3072m -Djava.library.path="/usr/lib/$archString/jni:/usr/lib/$archString:/usr/lib/jni:/usr/share/beast2-mcmc" ${SOME_PROXY_INFO}
-classpath "${CLASSPATH}::/usr/share/java/beagle.jar:/usr/share/beast2-mcmc/BEAST.app.jar:/usr/share/beast2-mcmc/BEAST.base.jar:/usr/share/java/colt.jar:/usr/share/java/javafx-base.jar:/usr/share/java/javafx-controls.jar:/usr/share/java/javafx-fxml.jar:/usr/share/java/javafx-graphics.jar:/usr/share/java/javafx-swing.jar:/usr/share/java/javafx-web.jar:/usr/share/beast2-mcmc/launcher.jar"
beast.pkgmgmt.launcher.BeautiLauncher
/usr/share/beast2-mcmc/fxtemplates/Standard.xml
I get the window with "Initialising BEAUti..." and nothing happens (I waited 15 minutes), no message in the console... Have you already met this situation? Does it evoke something to you? Is there a way I can get debug information when launching beauti2?
Many thanks!
Pierre
Hi Pierre,
Thanks for the update -- I am already very happy you take care of the Debian distribution in you spare time! No need to apologise at all.
The behaviour you describe I have seen before when some files are not in the expected place, but also when a JDK is not configured as BEAUti expects it. I have not seen a clear pattern yet, so I cannot advise exactly where to look for.
It is possible to set the log level by starting with java -Dbeast.log.level=trace ..., which should result in a lot more messages on the terminal. Hope it will produce something useful in the terminal output.
Cheers, Remco
Hi Remco,
Thanks :)
I added -Dbeast.log.level=trace but unfortunately this did not add anything in the log before the freeze of the Initializing window. I will try to examine the code further to hopefully understand what is going on. I will keep you informed!
Cheers, Pierre
Hi Pierre,
Perhaps you could try the following: remove the user package directory (rm -r ~/.beast/2.7) completely and then start BEAUti. The package directory should be reconstructed, and any wrongly placed files should be fixed.
Hope this helps, Remco
Hi Remco,
Thanks again for being supportive of my work on the package.
Unfortunately I have been unable to investigate enough. I feel like some window should appear, so that I could do something, but I only see the "Initialisin BEAUti..." GUI and nothing else.
I tried to remove the user package dir. Afterwards it got successfully created and populated with beauti.properties, but nothing more. I should say I did a few changes in beast/pkgmgmt/launcher/BeastLauncher.java so that no jar gets installed in ~/.beast and one does not look for updates at startup, as everything is handled through the Debian packaging tools. Maybe I removed something necessary, this way.
Could you please show me the typical contents of (for instance) your ~/.beast/2.7 folder?
Thanks, Pierre
Hi Pierre,
Below my ~/.beast/2.7 directory when no packages are installed. What should happen at startup of BEAST or BEAUti is that the BEAST.base and BEAST.app packages are installed programmatically through the BEAST launcher, which lives in the /path/to/beast/lib/launcher.jar file.
One of the things the launcher also does is create the beauti.properties files, which contains the class path (and some other use information, like the default directory to look for files, GUI theme). Every time a BEAST package is installed, the class path needs to be recalculated, which is something to take in account if you do this through Debian packaging tools.
Perhaps the tweaking of the BeastLauncher class caused it not to install BEAST.base and BEAST.app any more?
By the way, for the v2.7.3 release, the location of the BEAST.base and BEAST.app jar file has changed, since it caused problems when loading a large number of packages. Anyway, I hope that it was just an accidental deletion of some things in the launcher that may solve the problem.
Cheers,
Remco
.beast
.beast/2.7
.beast/2.7/beauti.properties
.beast/2.7/BEAST.base
.beast/2.7/BEAST.base/BEAST.base.zip
.beast/2.7/BEAST.base/BEAST.base.src.jar
.beast/2.7/BEAST.base/META-INF
.beast/2.7/BEAST.base/META-INF/MANIFEST.MF
.beast/2.7/BEAST.base/version.xml
.beast/2.7/BEAST.base/lib
.beast/2.7/BEAST.base/lib/BEAST.base.jar
.beast/2.7/BEAST.app
.beast/2.7/BEAST.app/META-INF
.beast/2.7/BEAST.app/META-INF/MANIFEST.MF
.beast/2.7/BEAST.app/BEAST.app.src.jar
.beast/2.7/BEAST.app/version.xml
.beast/2.7/BEAST.app/examples
.beast/2.7/BEAST.app/examples/testJukesCantorShortUncertain2.xml
.beast/2.7/BEAST.app/examples/testExponentialGrowth.xml
.beast/2.7/BEAST.app/examples/testMultipleAlignments_randomTaxaOrder.xml
.beast/2.7/BEAST.app/examples/testCoalescent.xml
.beast/2.7/BEAST.app/examples/testGTR.xml
.beast/2.7/BEAST.app/examples/testOpSubSchedule.xml
.beast/2.7/BEAST.app/examples/testBSP.xml
.beast/2.7/BEAST.app/examples/testPlates.xml
.beast/2.7/BEAST.app/examples/testJukesCantorShortUncertain.xml
.beast/2.7/BEAST.app/examples/testSRD06.xml
.beast/2.7/BEAST.app/examples/testHKY.xml
.beast/2.7/BEAST.app/examples/testJukesCantorShortUncertain2MLE.xml
.beast/2.7/BEAST.app/examples/testRestrictedGTR.xml
.beast/2.7/BEAST.app/examples/testRNA.xml
.beast/2.7/BEAST.app/examples/testYuleOneSite.xml
.beast/2.7/BEAST.app/examples/testSimulatedAlignment.xml
.beast/2.7/BEAST.app/examples/testSYM.xml
.beast/2.7/BEAST.app/examples/testStarBeast.xml
.beast/2.7/BEAST.app/examples/testJukesCantorShort.xml
.beast/2.7/BEAST.app/examples/bitflip.xml
.beast/2.7/BEAST.app/examples/testClassicRootCalibrationPrior.xml
.beast/2.7/BEAST.app/examples/testDirectSimulator2.xml
.beast/2.7/BEAST.app/examples/testTN93.xml
.beast/2.7/BEAST.app/examples/testStarBeastFBD.xml
.beast/2.7/BEAST.app/examples/testJukesCantor.xml
.beast/2.7/BEAST.app/examples/testTIM.xml
.beast/2.7/BEAST.app/examples/testConditionalRootCalibrationPrior.xml
.beast/2.7/BEAST.app/examples/testDirectSimulator.xml
.beast/2.7/BEAST.app/examples/testCalibration.xml
.beast/2.7/BEAST.app/examples/testTipDates.xml
.beast/2.7/BEAST.app/examples/testTipDates2.xml
.beast/2.7/BEAST.app/examples/testTVM.xml
.beast/2.7/BEAST.app/examples/testCalYule_5t_2c.xml
.beast/2.7/BEAST.app/examples/testDirectSimulatorHierarchical.xml
.beast/2.7/BEAST.app/examples/testRelaxedClock.xml
.beast/2.7/BEAST.app/examples/testTwoCalibrationsPrior.xml
.beast/2.7/BEAST.app/examples/testSliceHKY.xml
.beast/2.7/BEAST.app/examples/testEBSP.xml
.beast/2.7/BEAST.app/examples/testRandomLocalClock.xml
.beast/2.7/BEAST.app/examples/testYuleUncalibrated.xml
.beast/2.7/BEAST.app/examples/testSeqGen.xml
.beast/2.7/BEAST.app/examples/testYuleCalibrated.xml
.beast/2.7/BEAST.app/lib
.beast/2.7/BEAST.app/lib/BEAST.app.jar
.beast/2.7/BEAST.app/BEAST.app.zip
.beast/2.7/BEAST.app/fxtemplates
.beast/2.7/BEAST.app/fxtemplates/methods.csv
.beast/2.7/BEAST.app/fxtemplates/ClockModels.xml
.beast/2.7/BEAST.app/fxtemplates/Standard.xml
.beast/2.7/BEAST.app/fxtemplates/ParametricDistributions.xml
.beast/2.7/BEAST.app/fxtemplates/TreePriors.xml
.beast/2.7/BEAST.app/fxtemplates/SubstModels.xml