Error java.lang.ClassCastException
When I try to run my file scraper I get the following error:
Shop: An error occurred while processing the script: File Looper
Shop: The error message was: The application script threw an exception: java.lang.ClassCastException BSF info: null at line: 0 column: columnNo
This is the File Looper script.
// for loop, from 1 to 711
for ( int i = 1; i < 712; i++ )
{
// Set the "FILE" session variable to the current value of i.
session.setVariable( "FILE", i );
// Scrape the scrapeable file (change the name to fit yours).
session.scrapeFile( "Scrape" );
}
Can you please tell me why I am getting an error?
Error java.lang.ClassCastException
Hi,
See if this does the trick:
// for loop, from 1 to 711
for ( int i = 1; i < 712; i++ )
{
// Set the "FILE" session variable to the current value of i.
session.setVariable( "FILE", String.valueOf( i ) );
// Scrape the scrapeable file (change the name to fit yours).
session.scrapeFile( "Scrape" );
}
Kind regards,
Todd Wilson