Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Read and search text in HTML - ArrIndOutOfBoundsException: 88  RSS feed

 
Seema Sharma
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am searching text from HTML and finding file names. Placing those names to JList. Searching is taking place properly. but java.lang.ArrayIndexOutOfBoundsException: 88 is thrown.

Find the code below:


Please let me know why this exception occurs:


Thanks in advance,
Seema
 
Campbell Ritchie
Sheriff
Posts: 53773
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which line in that quoted code is throwing the Exception? I can't see any [] in your code.
 
Seema Sharma
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It show exception at line editorPane.read(reader, htmlDoc);
Please find the stack trace below:


Do i need to use HTMLEditorKit.Parser for reading. I tried using the parser.read() method, but shows errors. Tried the bow code:

when above code is used for reading HTML, search logic itself doesn't work and same java.lang.ArrayIndexOutOfBoundsException: 88 exception as above occurs, this time at parser.parse(reader, callback, true);

Thanks for reading. Any help is highly appreciated.

Regards,
Seema
 
Campbell Ritchie
Sheriff
Posts: 53773
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That doesn't help a lot; you haven't shown us which line is causing the Exception.
 
Seema Sharma
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Exception is shown at line editorPane.read(reader, htmlDoc);

Thanks in advace,
Seema
 
Campbell Ritchie
Sheriff
Posts: 53773
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
None of your code appears to contain any arrays in the first place. What are you passing to the editorPane?
 
Seema Sharma
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell,
I am reading large number of HTML files, so exception may be because of that.
Same exception i found in the below link, but did not understand the solution.
Check URL

Please help in uderstanding it.

Thanks in advance,
Seema
 
Campbell Ritchie
Sheriff
Posts: 53773
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't know. Sorry. I couldn't understand the other thread either.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!