java.lang.NullPointerException

612 views
Skip to first unread message

Luke Campillo

unread,
Apr 7, 2015, 6:10:08 AM4/7/15
to beast...@googlegroups.com
Hey all,

Trying to get SNAPP to run on our cluster and I keep bumping into the same problem. Java. The cluster uses java 7 by default, but users are allowed to specify if they elect to use Java 8 instead, which I did. And that got Beast2 to load and I have enabled the SNAPP package. However once the MCMCs are about to start Java objects... And as you see, I am using Java 8, so I am not sure what the issue is. Any help would be greatly appreciated!!

Cheers,
Luke


Writing file Eury_1PP_A.1428339016313.log
         Sample      posterior ESS(posterior)     likelihood          prior
Writing file Eury_1PP_A.1428339016313.trees
Start state:
(((((0:0.10123383894843536,1:0.10123383894843536)6:0.021423240748593225,2:0.12265707969702859)7:0.027483926198352757,4:0.15014100589538135)8:0.030908067374153664,3:0.181049073269535)9:0.22538639724281878,5:0.4064354705123538)10:0.0
coalescenceRate[11 1] (-Infinity,Infinity): 10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0
beta[1 1] (0.0,Infinity): 10.0
alpha[1 1] (0.0,Infinity): 2.0

Start likelihood: = -25149.085013082808
java.lang.NullPointerException
    at beast.core.MCMC.log(Unknown Source)
    at snap.MCMC.run(Unknown Source)
    at beast.app.BeastMCMC.run(Unknown Source)
    at beast.app.beastapp.BeastMain.<init>(Unknown Source)
    at beast.app.beastapp.BeastMain.main(Unknown Source)
    at beast.app.beastapp.BeastLauncher.main(Unknown Source)

Mon Apr 06 11:50:19 l133c586@n293:/scratch/l133c586/eury_SNAPP $ java -version
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
Mon Apr 06 11:50:36 l133c586@n293:/scratch/l133c586/eury_SNAPP $


Remco Bouckaert

unread,
Apr 7, 2015, 2:35:02 PM4/7/15
to beast...@googlegroups.com
Hi Luke,

Is it possible you set up the analysis with an older version of SNAPP? 
This problem is an issue that should be fixed in the current version of SNAPP (1.1.10).

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 http://groups.google.com/group/beast-users.
For more options, visit https://groups.google.com/d/optout.

Luke Campillo

unread,
Apr 8, 2015, 11:16:32 AM4/8/15
to beast...@googlegroups.com
Remco,

I have SNAPP v1.1.10 installed... Any other ideas?

Cheers,
Luke

Wed Apr 08 10:14:34 l133c586@n099:/ $ addonmanager -list
Packages user path : /users/l133c586/.beast/2.2
Access URL : https://raw.githubusercontent.com/CompEvol/CBAN/master/packages2.2.0.xml
Getting list of packages ...Done!

Name : status : Description
BDSKY         (un-installed) : latest version 1.2.1 : birth death skyline - handles serially sampled tips, piecewise constant rate changes through time and sampled ancestors
BEAST_CLASSIC (un-installed) : latest version 1.1.8 : depends on BEASTlabs : BEAST classes ported from BEAST 1 in wrappers
BEASTlabs     (un-installed) : latest version 1.2.2 : BEAST utilities, such as multi threaded treeliklihood, Script
BEASTShell    (un-installed) : latest version 1.1.1 : BEAST Shell -- BeanShell scripting for BEAST
CA            (un-installed) : latest version 1.0.4 : CladeAge aPackage for fossil calibrations
DISSECT       (un-installed) : latest version 1.2.0 : Species delimitation with *BEAST
GEO_SPHERE    (un-installed) : latest version 0.0.5 : Whole world phylogeography
MASTER        (un-installed) : latest version 4.1.1 : Stochastic population dynamics simulation.
MGSM          (un-installed) : latest version 0.0.2 : Multi-gamma and relaxed gamma site models
MODEL_SELECTION (un-installed) : latest version 1.0.3 : Select models through path sampling/stepping stone analysis
morph-models (un-installed) : latest version 1.0.0 : Enables models of morphological chatacter evolution
MultiTypeTree (un-installed) : latest version 5.2.1 : Structured coalescent inference.
phylodynamics (un-installed) : latest version 1.1.0 : depends on BDSKY : birth death skyline model
RBS           (un-installed) : latest version 1.1.1 : Reversible-jump Based substitution model
SA            (un-installed) : latest version 1.1.2 : Sampled ancestor trees
SNAPP         (v1.1.10) : latest version 1.1.10 : SNP and AFLP Phylogenies
STACEY        (un-installed) : latest version 1.0.1 : Species delimitation and species tree estimation
SubstBMA      (un-installed) : latest version 1.1.2 : Substitution Bayesian Model Averaging
Wed Apr 08 10:14:43 l133c586@n099:/ $
Message has been deleted

Remco Bouckaert

unread,
Apr 8, 2015, 4:21:10 PM4/8/15
to beast...@googlegroups.com
Hi Luke,

Perhaps the XML file was created with an older version of SNAPP. You can simply edit the XML file in a text editor and replace

spec="snap.MCMC"

with

spec="beast.core.MCMC"

You may need to remove the stateBurnin attribute as well.

Cheers,

Remco

Remco Bouckaert

unread,
Apr 8, 2015, 4:25:41 PM4/8/15
to beast...@googlegroups.com
Hi Luke,

When BEAST is started without arguments, it indeed tries to open a window, which fails with the message you posted if there is no display.

Starting with the -help argument shows the list of arguments you can use — there is no argument for not using a display though.

What do you expect to happen if there is no display, and no arguments are given?

Cheers, Remco


On 9/04/2015, at 3:45 am, Luke Campillo <luke.ca...@gmail.com> wrote:

Remco,

Just another thought on what could be causing the problem (I am no expert haha just looking for anomalies). So if I just try to start BEAST without giving it an xml file, then I get an error about X11 DISPLAY not being set. As far as I can tell, the X11 enables the program to have a graphical interface. Which isn't really important to me at this stage in the analysis. I just want to use the badass computers on our cluster to get the data. When I want to see the output I can SCP to my desktop computer and open densitree on here.

So is there a way to tell BEAST I don't need to see any graphical output at this point? Like bypass the need for X11 to be set? Like I said, I am not an expert at all so I don't know if this is the problem... But it might be ;)

THANKS!
-Luke

####Error when loading BEAST w/o any xml input####

                           BEAST developers:
   Alex Alekseyenko, Trevor Bedford, Erik Bloomquist, Joseph Heled,
 Sebastian Hoehna, Denise Kuehnert, Philippe Lemey, Wai Lok Sibon Li,
Gerton Lunter, Sidney Markowitz, Vladimir Minin, Michael Defoin Platel,
                 Oliver Pybus, Chieh-Hsi Wu, Walter Xie
                                   
                               Thanks to:
          Roald Forsberg, Beth Shapiro and Korbinian Strimmer

Exception in thread "main" java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
    at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
    at java.awt.Window.<init>(Window.java:536)
    at java.awt.Frame.<init>(Frame.java:420)
    at java.awt.Frame.<init>(Frame.java:385)
    at javax.swing.SwingUtilities$SharedOwnerFrame.<init>(SwingUtilities.java:1758)
    at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1833)
    at javax.swing.JOptionPane.getRootFrame(JOptionPane.java:1696)
    at javax.swing.JOptionPane.getWindowForComponent(JOptionPane.java:1637)
    at javax.swing.JFileChooser.createDialog(JFileChooser.java:802)
    at javax.swing.JFileChooser.showDialog(JFileChooser.java:749)
    at javax.swing.JFileChooser.showOpenDialog(JFileChooser.java:656)
    at beast.app.beastapp.BeastMain.getFileNameByDialog(Unknown Source)

    at beast.app.beastapp.BeastMain.main(Unknown Source)
    at beast.app.beastapp.BeastLauncher.main(Unknown Source)
Wed Apr 08 10:28:35 l133c586@n099:~ $


On Tuesday, April 7, 2015 at 1:35:02 PM UTC-5, Remco Bouckaert wrote:
Reply all
Reply to author
Forward
0 new messages