Error 110 parsing the xml input file

2,273 views
Skip to first unread message

Kalene Jasso

unread,
Oct 27, 2016, 3:42:03 PM10/27/16
to beast-users
Hi my name is Kalene I am an undergraduate at UW Madison. I am having problems with beast2. I created an xml file and when i go to run it in beast i receive the following error message. Does anyone know what I may be doing wrong? Sorry if this is an obvious thing. 

I have attached my xml file that I created in beauti 


Error 110 parsing the xml input file

nullvalidate and intialize error: empty String

Error detected about here:
  <beast>
      <run id='mcmc' spec='MCMC'>
          <distribution id='posterior' spec='util.CompoundDistribution'>
              <distribution id='prior' spec='util.CompoundDistribution'>
                  <distribution id='rootPrior.Location' spec='beast.math.distributions.MultivariateNormalDistribution'>
                      <arg id='rootTrait.Location' spec='beast.evolution.tree.RootTrait'>
                          <traitmap id='traitmap.s:Location' spec='beast.evolution.tree.TreeTraitMap'>

thank you

kalene
Vandykei_all1.xml

Remco Bouckaert

unread,
Oct 27, 2016, 3:52:50 PM10/27/16
to beast...@googlegroups.com
Hi Kalene,

There are a few taxa that have no location specified: SDS14_347B_ and SDS14_347B_. If you specify locations for these taxa (double click the geography partition in BEAUti, and fill in locations in the table that pops up) the analysis should start.

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.
<Vandykei_all1.xml>

Kalene Jasso

unread,
Oct 31, 2016, 11:45:06 AM10/31/16
to beast-users
THANKS!

Ahmed Aljumaili

unread,
Feb 9, 2018, 1:14:59 PM2/9/18
to beast-users
Dear All,

I have the same error message (see below), and I couldn't figure out how to solve this problem.
I am using BEAST for different populations and the same process for all of them, this is the only one didn't work.

please see my file attached.

Thanks in advance,

Ahmed


 Error 110 parsing the xml input file

validate and intialize error: There are more groups than coalescent nodes in the tree.

Error detected about here:
  <beast>
      <run id='mcmc' spec='MCMC'>
          <distribution id='posterior' spec='util.CompoundDistribution'>
              <distribution id='prior' spec='util.CompoundDistribution'>
                  <distribution id='BayesianSkyline.t:saudi_noReference' spec='BayesianSkyline'>

java.lang.IllegalArgumentException: There are more groups than coalescent nodes in the tree.
at beast.evolution.tree.coalescent.BayesianSkyline.initAndValidate(Unknown Source)
at beast.util.XMLParser.initBEASTObjects(Unknown Source)
at beast.util.XMLParser.parse(Unknown Source)
at beast.util.XMLParser.parseFile(Unknown Source)
at beast.app.BeastMCMC.parseArgs(Unknown Source)
at beast.app.beastapp.BeastMain.main(Unknown Source)
at beast.app.beastapp.BeastLauncher.main(Unknown Source)



saudi.xml

Remco Bouckaert

unread,
Feb 9, 2018, 1:22:58 PM2/9/18
to beast...@googlegroups.com
Hi Ahmed,

There are only 5 sequences in the XML you posted, so the tree has 4 internal nodes. However, the number of groups is 5, so there are 5 intervals for the Bayesian Skyline, but only 4 intervals in the tree. You must reduce the number of groups to at most the number of intervals (4 in the XML), but usually, you would reduce it much more.

You can change the dimension attributes in BEAUti by first choosing “View/Show Initialisation Panel”, go to the Initialisation panel, and set the dimension for the bPopSizes and bGroupSizes  — make sure that the match!
You can also edit the XML and edit the “dimension” attributes of bPopSizes and bGroupSizes.

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.
<saudi.xml>

Ahmed Aljumaili

unread,
Feb 10, 2018, 11:38:54 AM2/10/18
to beast...@googlegroups.com
Thanks Remco for both help and quick reply.

Cheers,

Ahmed

You received this message because you are subscribed to a topic in the Google Groups "beast-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beast-users/6jodiAgFy4o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beast-users...@googlegroups.com.
Message has been deleted

Ahmed Magdy Moustafa

unread,
Feb 12, 2018, 6:29:55 PM2/12/18
to beast-users
Hi Remco,
I tried to edit the xml file to set a starting tree (just constraining two monophyletic major clades). I used the suggestion in this post http://www.beast2.org/2014/07/28/all-about-starting-trees/
I keep getting error and Beast cannot initialize.
The edited part is 
    <init spec="beast.util.TreeParser" id="NewickTree.t:screened_HK_AA_Gm_Rh_names" initial="@Tree.t:screened_HK_AA_Gm_Rh_names" taxa="@screened_HK_AA_Gm_Rh_namesORIGINAL" newick="((DSM_8324,AAS4A,SCC2302,D17P-2,D11S-1,SA2149,SC383s,HK1651 ,SCC4092,SCC1398,SL7472,SL7471,VT1169,ANH9381,S23A,I23C,A160,SA2876,SCC393,SL7474,D18P1,SC29R,H5P1,D17P-3,Y4,D7S-1,624,SA269,SA508,SA3733,NUM_4039,SL7475,IDH781,SA3033,SA2200,I63B),GmAa1104,GmAa1168,SL7469,ANH9776,SA3096,SC936,SC1083,SL7470,SL7468,SL7466,SL7464,SL7465,RhAa3,RhAA1,SL7467)">
    </init>
The xml file is available but it is large to be attached here.
Thanks 
Ahmed

Thanks to:
          Roald Forsberg, Beth Shapiro and Korbinian Strimmer

Random number seed: 1518469869312

Alignment(screened_HK_AA_Gm_Rh_namesORIGINAL)
  51 taxa
  253375 sites
  39096 patterns

Filter -
51 taxa
253375 sites + 1852036 constant sites
39100 patterns
beast.util.TreeParser$TreeParsingException: token recognition error at: ' '
at beast.util.TreeParser$1.syntaxError(Unknown Source)
at org.antlr.v4.runtime.ProxyErrorListener.syntaxError(ProxyErrorListener.java:65)
at org.antlr.v4.runtime.Lexer.notifyListeners(Lexer.java:386)
at org.antlr.v4.runtime.Lexer.nextToken(Lexer.java:168)
at org.antlr.v4.runtime.BufferedTokenStream.fetch(BufferedTokenStream.java:186)
at org.antlr.v4.runtime.BufferedTokenStream.sync(BufferedTokenStream.java:169)
at org.antlr.v4.runtime.BufferedTokenStream.consume(BufferedTokenStream.java:153)
at org.antlr.v4.runtime.Parser.consume(Parser.java:585)
at org.antlr.v4.runtime.Parser.match(Parser.java:218)
at beast.util.treeparser.NewickParser.label(Unknown Source)
at beast.util.treeparser.NewickParser.post(Unknown Source)
at beast.util.treeparser.NewickParser.node(Unknown Source)
at beast.util.treeparser.NewickParser.node(Unknown Source)
at beast.util.treeparser.NewickParser.node(Unknown Source)
at beast.util.treeparser.Newi
Error 110 parsing the xml input file

validate and intialize error: token recognition error at: ' '

Error detected about here:
  <beast>
      <run id='mcmc' spec='MCMC'>
          <init id='NewickTree.t:screened_HK_AA_Gm_Rh_names' spec='beast.util.TreeParser'>

ckParser.tree(Unknown Source)
at beast.util.TreeParser.parseNewick(Unknown Source)
at beast.util.TreeParser.initAndValidate(Unknown Source)

Luka Jovanovic

unread,
Jun 5, 2019, 6:03:52 AM6/5/19
to beast-users
Hello, the same error report occurred to me. So I made xml file for BDSY analysis in BEAST 2.4.2 and the error pooped up:
Error 110 parsing the xml input file

validate and intialize error: Error in expression: Stack size 3 ( != 1 ) at end of expression evaluation

Error detected about here:
  <beast>
      <run id='mcmc' spec='MCMC'>
          <logger id='tracelog'>
              <log id='biFailed to load BEAGLE library: no hmsbeagle-jni in java.library.path
java.lang.RuntimeException: Error in expression: Stack size 3 ( != 1 ) at end of expression evaluation
at beast.math.statistic.RPNcalculator.initAndValidate(Unknown Source)
at beast.util.XMLParser.initBEASTObjects(Unknown Source)
at beast.util.XMLParser.parse(Unknown Source)
at beast.util.XMLParser.parseFile(Unknown Source)
at beast.app.BeastMCMC.parseArgs(Unknown Source)
at beast.app.beastapp.BeastMain.main(Unknown Source)
at beast.app.beastapp.BeastLauncher.main(Unknown Source)
rth.t:Srbijica moja' spec='beast.math.statistic.RPNcalculator'>

Again I am sorry if I do not see the obvious but I am still a beginner and it would be wonderful if someone could help me with my case. I will upload the xml file, the alignment consists of 9 HIV sequences.
Thank you in advance.
Best regards
Luka Jovanovic, MD, Ph.D candidate 
srbijicamojaBDSY.xml

Remco Bouckaert

unread,
Jun 5, 2019, 3:36:46 PM6/5/19
to beast...@googlegroups.com
Hi Luka,

It looks like BEAST got confused due to the space in the partition name. If you replace the space by an underscore (as in the attached) the XML runs without problems.

Cheers,

Remco

srbijicamojaBDSY.xml

Luka Jovanovic

unread,
Jun 5, 2019, 4:27:52 PM6/5/19
to beast...@googlegroups.com
Thank you so much.

--
You received this message because you are subscribed to a topic in the Google Groups "beast-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beast-users/6jodiAgFy4o/unsubscribe.
To unsubscribe from this group and all its topics, 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.
--
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.
<srbijicamojaBDSY.xml>

--
You received this message because you are subscribed to a topic in the Google Groups "beast-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beast-users/6jodiAgFy4o/unsubscribe.
To unsubscribe from this group and all its topics, 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.

Miguel Buitrago

unread,
Aug 15, 2025, 2:10:49 PMAug 15
to beast-users
Hello all, 

I am having the same error message and cannot figure out why—copying the output and attaching the xml file at this link

File: ns_BASE_ATT1.xml seed: 1755245027015 threads: 1

Loading package AlmostDistributions v0.2.1 starbeast3 v1.2.1 Babel v0.4.2 SA v2.1.1 BEAST.base v2.7.8 MultiTypeTree v8.3.0 BDMM v2.0.0 GEO_SPHERE v1.4.2 MASTER v7.0.0 BEASTLabs v2.0.3 BEAST.app v2.7.8 BDSKY v1.5.1 bdtree v0.0.2 ORC v1.2.1 BREAK_AWAY v1.2.0 MODEL_SELECTION v1.6.2    

java.lang.NullPointerException: Cannot invoke "java.util.ArrayList.indexOf(Object)" because "this.codeMapping" is null

at beast.base.evolution.datatype.StandardData.stringToEncoding(Unknown Source)

at beast.base.evolution.alignment.Sequence.getSequence(Unknown Source)

at beast.base.evolution.alignment.Alignment.initializeWithSequenceList(Unknown Source)

at beast.base.evolution.alignment.Alignment.initAndValidate(Unknown Source)

at beast.base.parser.XMLParser.initBEASTObjects(Unknown Source)

at beast.base.parser.XMLParser.parse(Unknown Source)

at beast.base.parser.XMLParser.parseFile(Unknown Source)

at beastfx.app.beast.BeastMCMC.parseArgs(Unknown Source)

at beastfx.app.beast.BeastMain.main(Unknown Source)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.base/java.lang.reflect.Method.invoke(Unknown Source)

at beast.pkgmgmt.launcher.BeastLauncher.run(Unknown Source)

at beast.pkgmgmt.launcher.BeastLauncher.main(Unknown Source)

java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke "java.util.ArrayList.indexOf(Object)" because "this.codeMapping" is null

at beast.base.evolution.alignment.Alignment.initializeWithSequenceList(Unknown Source)

at beast.base.evolution.alignment.Alignment.initAndValidate(Unknown Source)

at beast.base.parser.XMLParser.initBEASTObjects(Unknown Source)

at beast.base.parser.XMLParser.parse(Unknown Source)

at beast.base.parser.XMLParser.parseFile(Unknown Source)

at beastfx.app.beast.BeastMCMC.parseArgs(Unknown Source)

at beastfx.app.beast.BeastMain.main(Unknown Source)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.base/java.lang.reflect.Method.invoke(Unknown Source)

at beast.pkgmgmt.launcher.BeastLauncher.run(Unknown Source)

at beast.pkgmgmt.launcher.BeastLauncher.main(Unknown Source)

Caused by: java.lang.NullPointerException: Cannot invoke "java.util.ArrayList.indexOf(Object)" because "this.codeMapping" is null

at beast.base.evolution.datatype.StandardData.stringToEncoding(Unknown Source)

at beast.base.evolution.alignment.Sequence.getSequence(Unknown Source)

... 13 more


Error 110 parsing the xml input file


validate and intialize error: java.lang.NullPointerException: Cannot invoke "java.util.ArrayList.indexOf(Object)" because "this.codeMapping" is null


Error detected about here:

  <beast>

      <data id='ns' spec='Alignment'>


Thank you in advance :)

Miguel

Timothy Vaughan

unread,
Aug 18, 2025, 3:24:47 PMAug 18
to beast-users
Hi Miguel,

This error ("110 parsing the xml input file") is actually extremely general: a variety of problems beast 2 encounters while processing the XML will produce this same error.  So it's unlikely that the problem you're seeing is directly related to those earlier in the thread.

Briefly looking at your XML file though, it seems there's some issue with how the datatype is being set up for the binary covarion model.  How did you set this up? The Babel beauti template usually includes an additional  <userDataType> element which yours appears to be missing.

Cheers,
Tim

Miguel Buitrago

unread,
Aug 22, 2025, 11:21:21 PM (13 days ago) Aug 22
to beast-users
Hi Timothy, 

Thank you for your response. Indeed there was a <userDataType> line missing after all the data. I used BEAUti to set it up, but I must have accidentally deleted that line at some point because all my other similarly-generated xml files have that line. 

Best,
Miguel

Reply all
Reply to author
Forward
0 new messages