0

私は 5 か月間 web-harvest を使用し、次の構文で web のコンテンツを取得しようとしました。

<var-def name="raw">
<html-to-xml outputtype="pretty" usecdata="false">
    <http url="${URL.toString()}" />           
    </html-to-xml>      
</var-def>

コンテンツを取得しましたが、最近、次のエラーが発生します。

ERROR - IO error during HTTP execution for URL: http://google.com
org.webharvest.exception.HttpException: IO error during HTTP execution for URL:    http://google.com
at org.webharvest.runtime.web.HttpClientManager.execute(Unknown Source)
at org.webharvest.runtime.processors.HttpProcessor.execute(Unknown Source)
at org.webharvest.runtime.processors.BaseProcessor.run(Unknown Source)
at org.webharvest.runtime.processors.BodyProcessor.execute(Unknown Source)
at org.webharvest.runtime.processors.BaseProcessor.getBodyTextContent(Unknown  Source)
at org.webharvest.runtime.processors.BaseProcessor.getBodyTextContent(Unknown  Source)
at org.webharvest.runtime.processors.BaseProcessor.getBodyTextContent(Unknown Source)
at org.webharvest.runtime.processors.HtmlToXmlProcessor.execute(Unknown Source)
at org.webharvest.runtime.processors.BaseProcessor.run(Unknown Source)
at org.webharvest.runtime.processors.BodyProcessor.execute(Unknown Source)
at org.webharvest.runtime.processors.VarDefProcessor.execute(Unknown Source)
at org.webharvest.runtime.processors.BaseProcessor.run(Unknown Source)
at org.webharvest.runtime.Scraper.execute(Unknown Source)
at org.webharvest.runtime.Scraper.execute(Unknown Source)
at org.webharvest.gui.ScraperExecutionThread.run(Unknown Source)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at  org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocke tFactory.java:140)
at  org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:125)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at  org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at  org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
... 15 more

私はそれを別のPCに接続し、正しく動作しましたが、私のPCではこのエラーが発生しました.

4

2 に答える 2

0

同じことが私にも起こりました.JavaバージョンをJava 8に更新すると、問題が解決するはずです.

http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html

于 2016-10-05T15:23:06.570 に答える
-2

ファイアウォールまたはインターネット接続の問題である可能性があります。最初にサイトにアクセスするか、アプリケーションを管理者として実行してみてください。

于 2013-07-24T07:56:37.530 に答える