Problem using Proxy Server Pool

When I try to test the following program accordinmg to your examples (V 6.0.69a):

============================================
import com.screenscraper.util.*;

// Create a new ProxyServerPool object. This object will
// control how screen-scraper interacts with proxy servers.

Pool = new ProxyServerPool();
// session.log("after new Pool ");

Pool.populateFromFile( "proxy_list.txt" );
session.log("after populate: " + Pool.getNumProxyServers());

// Validate proxies up to 25 proxies at a time.
Pool.setNumProxiesToValidateConcurrently( 1 );
session.log("after set");
session.log(Pool.getNumProxyServers());

// Set timout interval
Pool.filter( 7 );
session.log("after filter");

session.log(Pool.getNumProxyServers());

================================================
I get:

Starting scraper.
Running scraping session: _TEST
Processing scripts before scraping session begins.
Scraping file: "test"
test: Processing scripts before a file is scraped.
Processing script: "X_TestProxy"
after populate: 74
after set
74
ERROR--_TEST: An error occurred while processing the script: X_TestProxy
_TEST: The error message was: NullPointerException (line 18): Pool .filter ( 7 ) --Sourced file: inline evaluation of: `` import com.screenscraper.util.*; // Create a new ProxyServerPool object. This . . . '' : Method Invocation Pool.filter
test: Requesting URL: http://www.bazar.at/
test: Processing scripts after a file is scraped.
Processing scripts after scraping session has ended.
Skipping the following script because it's disabled: "X_TestProxy"
Processing scripts always to be run at the end.
Scraping session "_TEST" finished.

================================================

It seems that most methods of the ServerPool object fail in a similar fashion.

regards
Christian Pieler

Documentation Error

It looks like we had an error in the documentation which has now been fixed.

Thanks for pointing that out.

The change you need to make is to set the proxy pool on the session.

Pool = new ProxyServerPool();

// Add this line
session.setProxyServerPool(Pool);
// session.log("after new Pool ");

The issue came down to some additional logging calls which also made those other methods fail when trying to log to the session (which hadn't been set yet).