Beast 2.5 problems loading package

296 views
Skip to first unread message

Gereon Kaiping

unread,
Jul 20, 2018, 8:55:33 AM7/20/18
to beast...@googlegroups.com
Hi,

SUMMARY
I want to run an analysis with a Pseudo-Dollo Covarion model. It works
fine in Eclipse, but cannot find the class when running Beast from the
command line. How do I debug Beast's package loading?

DETAILED DESCRIPTION
I have created an XML file to run cognate inference on a tree using
the new Pseudo-Dollo Covarion model from the Babel package. Because I
wasn't sure how well Beast 2.5 support for some packages had come (and
because Babel is not in CBAN yet anyway), I cloned beast2, BEASTLabs
and Babel from their repositories on Github and loaded them as Eclipse
projects. After fixing the Java library paths in the obvious manner,
Eclipse runs the beast for my pDC analysis without issues.
I then tried to build and install the packages. Compilation using ant
went fine without issues (apart from some JUnit tests running the
Beauti GUI on my ideosyncratic X setup, which failed) and produced
dist directories or zip files of the packages, which I unpacked or
copied to ~/.beast/2.5
Initially, I built BEASTLabs in version 1.7, and Babel complained that
it needed BEASTLabs at least version 1.8, which I take as indication
that the installation in this way worked in principle.
When I run
java -jar ~/.beast/2.5/beast2/lib/beast2.jar

on a file without a pDC model, it works fine. However, when I run it
on my pDC.xml, Beast dies with the message "Class not found, did you
mean ...BinaryCovarionModel?"

OTHER THINGS I HAVE TRIED
I have tried passing any of the Babel ja files (addon and source) to
the `java` call as `-classpath` argument.
I have checked the spec= attribute for typos and copied it from a
Beauti template and added the dotted package name before the class
name and verified that all of this runs out of Eclipse.
I have copied the .jar file to various folders and variant file names
in ~/.beast/2.5/
I have checked that both Babel jar files contain a file for the class,
a .class file for Babel.addon.jar and a .java file for
Babel.source.jar.
The error persists. What should I do?

WHAT I HAVE NOT TRIED
I haven't tried using classes from BEASTLabs (which I installed
manually, as desribed above), or any other package (including anything
could install using packagemanager), because I did not have XML files
that should work out of the box.

I have not tried running Beauti to see whether BEASTLabs or Babel
options appear.
--
Gereon

Remco Bouckaert

unread,
Jul 20, 2018, 4:15:54 PM7/20/18
to beast...@googlegroups.com
Hi Gereon,

With v2.5.0, the package loading has been changed: instead of discovering packages on the fly, it does this once and stores the class path in ~/.beast/2.5/beauti.properties (http://www.beast2.org/managing-packages/ under “Install by hand"). 

Discovering packages only happens when the package.path entry is missing from beaut.properties, so deleting this entry will make sure the package is discovered next time you start BEAST. Easiest is to use BEAUti: click the menu "File/Clear class path”.

To get the pre-v2.5.0 dynamically loading behaviour back, use -Dbeast.load.jars=true with beast.jar.

Cheers,

Remco


--
You received this message because you are subscribed to the Google Groups "beast-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beast-users...@googlegroups.com.
To post to this group, send email to beast...@googlegroups.com.
Visit this group at https://groups.google.com/group/beast-users.
For more options, visit https://groups.google.com/d/optout.

Remco Bouckaert

unread,
Jul 22, 2018, 3:52:06 PM7/22/18
to beast...@googlegroups.com

On 21/07/2018, at 8:15 AM, Remco Bouckaert <higg...@gmail.com> wrote:

To get the pre-v2.5.0 dynamically loading behaviour back, use -Dbeast.load.jars=true with beast.jar.

By the way, this only works with java 8, but will with java 9 and higher, because of the module loading functionality introduced in java 9.

Remco
Reply all
Reply to author
Forward
0 new messages