Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Unable to create a parser : 80040154

Help
2007-11-26
2013-04-17
  • spiritforever
    spiritforever
    2007-11-26

    Hi! I am trying to use the latest parser (v0.1.7) in a project.     When runing the junit testcase "TestMozillaParser.testSimple1()" in eclipse 3.2, I got the following error message:

        "Operating system : Windows XP
    Loading and initializing XPCOM from D:\workspace\eclipse\MozillaHtmlParser\native\bin\MozillaParser.dll
    done!
    Warning : MozillaParser detected an additional attempt to initialize XPCOM. operation ignored.
    Loading and initializing XPCOM from D:\workspace\eclipse\MozillaHtmlParser\native\bin\MozillaParser.dll
    done!
    Loading and initializing XPCOM from D:\workspace\eclipse\MozillaHtmlParser\native\bin\MozillaParser.dll
    Warning : MozillaParser detected an additional attempt to initialize XPCOM. operation ignored.
    done!
    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.RangeCheck(Unknown Source)
        at java.util.ArrayList.get(Unknown Source)
        at org.dom4j.tree.AbstractBranch.node(AbstractBranch.java:295)
        at org.dom4j.dom.DOMDocument.getFirstChild(DOMDocument.java:118)
        at com.sun.org.apache.xml.internal.serialize.BaseMarkupSerializer.serializeNode(Unknown Source)
        at com.sun.org.apache.xml.internal.serialize.BaseMarkupSerializer.serialize(Unknown Source)
        at com.dappit.Dapper.parser.test.TestMozillaParser.serialize(TestMozillaParser.java:85)
        at com.dappit.Dapper.parser.test.TestMozillaParser$5.run(TestMozillaParser.java:305)
        ....
    free :1667008
    Initializing XPCOM from location : D:\workspace\eclipse\MozillaHtmlParser\mozilla.dist.bin.win...

    Unable to create a parser : 80040154

    Unable to create a parser : 80040154
    ..."

        The error also takes place when I change distBinDirectory int the Configuration.java from "C:\\dapper\\mozilla\\dist\\bin" to my mozilla directory "D:\\workspace\\eclipse\\MozillaHtmlParser\\mozilla.dist.bin.win\\components\\" and "D:\\workspace\\eclipse\\MozillaHtmlParser\\mozilla.dist.bin.win\\"        
     
        Could any one give me some suggestions? Thanks a lot!