Root element not found error

  • daisy

    daisy - 2007-08-02

    I am a new user of Lius. I want to test the example files that come with Lius. I am trying to run the junit test LiusTestIndexation. I am coming up with this error in all the tests-

    7) testOpenOfficeFactoryIndexing(lius.test.junit.LiusTestIndexation)java.lang.Il
    legalStateException: Root element not set
            at org.jdom.Document.getContent(
            at org.jaxen.jdom.DocumentNavigator.getChildAxisIterator(DocumentNavigat
            at org.jaxen.expr.DefaultStep.evaluate(
            at org.jaxen.expr.DefaultLocationPath.evaluate(
            at org.jaxen.expr.DefaultAbsoluteLocationPath.evaluate(DefaultAbsoluteLo
            at org.jaxen.expr.DefaultXPathExpr.asList(
            at org.jaxen.BaseXPath.selectNodesForContext(
            at org.jaxen.BaseXPath.selectNodes(
            at org.jaxen.BaseXPath.selectSingleNode(
            at org.jdom.xpath.JaxenXPath.selectSingleNode(
            at org.jdom.xpath.XPath.selectSingleNode(
            at lius.config.LiusConfigBuilder.getAnlyzerClassString(LiusConfigBuilder
            at lius.config.LiusConfigBuilder.populateLiusConfig(LiusConfigBuilder.ja
            at lius.config.LiusConfigBuilder.getLiusConfig(
            at lius.test.junit.LiusTestIndexation.setUp(

    I have added all the required jars to the classpath. Am I missing something?

    • Tim Frith

      Tim Frith - 2007-08-03

      Haven't seen much help on this site for months.  So I'll take a shot at this one, even though I'm pretty new to Lius.

      It sounds like a problem with the liusConfig.xml file.

      It's looking for the <analyzer> tag.

      So either:
      -it can't find liusConfig.xml
      -it can't find <analzer> tag
      -it can't find the class listed in <analyzer> tag
      -the liusConfig.xml file is not well-formed xml

      The <analyzer> in my liusConfig.xml looks like this and the class listed is within the Lius jar:

          <analyzer class="org.apache.lucene.analysis.lius.unicode.UTF8AccentRemoverAnalyzer"/>
          <createIndex value="auto"/>
          <indexWriterProperty mergeFactor="10" maxMergeDocs="100" optimize="true"/>

      Hope this helps


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks