Hi all,

 

I am writing my own HTML parser and replace the original parser with it.
When the parser is running, it needs to access to some local files and
databases. When I downloaded a single HTML page like http://www.apache.org
to local drive and parse it, I got no problem. But when I parsed the web
page on the fly, there are exceptions thrown out.

 

The log file shows the following:

 

2011-04-30 03:23:31,004 INFO  html.MyHtmlParser - Inside MyHtmlParser!

2011-04-30 03:23:31,035 WARN  parse.ParseUtil - Unable to successfully parse
content http://www.apache.org/ of type text/html

 

When I debugged it, my debug process was brought to the FutureTask.class,
and the source of the .class file begins with the following:

 

/*

* @(#)FutureTask.java  1.14 06/07/13

*

* Copyright 2006 Sun Microsystems, Inc. All rights reserved.

* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.

*/

 

package java.util.concurrent;

import java.util.concurrent.locks.*;

 

Therefore, I suspect that concurrency is the reason. How can I solve this
problem? Will singleton be the answer? If so, then how?

 

Much appreciated if you could lend me a hand.

 

Jeff

 

 

 


 

Reply via email to