Menu

StackOverflow when setting link for LinkTag

Help
le_tmp
2010-01-13
2013-04-27
  • le_tmp

    le_tmp - 2010-01-13

    hey!

    the code is the following:
    http://pastebin.com/m3065834e

    this works good for many pages. ( replaces relative with absolute urls )
    but if I try to visit www.ard.de I get the following exception:

    Caused by: java.lang.StackOverflowError
    at org.htmlparser.lexer.Page.getText(Page.java:1088)
    at org.htmlparser.lexer.PageAttribute.getRawValue(PageAttribute.java:383)
    at org.htmlparser.Attribute.toString(Attribute.java:749)
    at org.htmlparser.nodes.TagNode.toTagHtml(TagNode.java:596)
    at org.htmlparser.nodes.TagNode.toHtml(TagNode.java:565)
    at org.htmlparser.tags.CompositeTag.toHtml(CompositeTag.java:185)
    at org.htmlparser.nodes.AbstractNode.toHtml(AbstractNode.java:129)
    at org.htmlparser.tags.CompositeTag.putEndTagInto(CompositeTag.java:170)
    at org.htmlparser.tags.CompositeTag.toHtml(CompositeTag.java:190)

    What could be wrong?

     
  • Derrick Oswald

    Derrick Oswald - 2010-01-13

    It may be you've inserted some parent of X as a child of X. It would then loop on itself recursively to compute the toHtml() text.
    Carefully review your code and see where your nodes are coming from - or create new ones as a test case.

     
  • le_tmp

    le_tmp - 2010-01-13

    the pasted code is the only one I use. nothing more.
    the error only appears when loading the url www.ard.de

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.