Hi All,
I have written following java code. It is throwing array index out of range exception
Exceptions: exception_name = java.lang.ArrayIndexOutOfBoundsException
exception_message = Array index out of range: 1
Can some resolve this issue plz
public class UnifiedClus1toNfastfastsamehost extends UnifiedClus1toNfastfastsamehostHelper
{
/**
* Script Name : <b>UnifiedClus1toNfastfastsamehost</b>
* Generated : <b>Aug 3, 2007 1:16:35 AM</b>
* Description : Functional Test Script
* Original Host : WinNT Version 5.1 Build 2600 (S)
*
* @since 2007/08/03
* @author Administrator
*/
String[] dataToPass = new String[1];
public void testMain(Object[] args)
{
String options = "" + args[0];
callScript("Cleanup");
functions.formatall();
dataToPass[0]= "resyncdatagen";
callScript("Clus1toNfastfastsamehost",dataToPass);
dataToPass[0]= "configurepair1";
callScript("Clus1toNfastfastsamehost",dataToPass);
if (options.toLowerCase().contains("Failover"))
{
dataToPass[0]= "failover";
callScript("Clus1toNfastfastsamehost",dataToPass);
}
dataToPass[0]= "WFE1";
callScript("Clus1toNfastfastsamehost",dataToPass);
dataToPass[0]= "configurepair2";
callScript("Clus1toNfastfastsamehost",dataToPass);
dataToPass[0]= "WFE2";
callScript("Clus1toNfastfastsamehost",dataToPass);
sleep(180);
dataToPass[0]= "vsnap1";
callScript("Clus1toNfastfastsamehost",dataToPass);
dataToPass[0]= "dataverf1";
callScript("Clus1toNfastfastsamehost",dataToPass);
/* if (options.toLowerCase().contains("failover"))
{
dataToPass[0]= "diffdatagen1fover";
callScript("Clus1toNfastfastsamehost",dataToPass);
}
else
if (options.toLowerCase().contains("normal"))
{
dataToPass[0]= "diffdatagen1normal";
callScript("Clus1toNfastfastsamehost",dataToPass);
}
dataToPass[0]= "vsnap2";
callScript("Clus1toNfastfastsamehost",dataToPass);
dataToPass[0]= "dataverf2";
callScript("Clus1toNfastfastsamehost",dataToPass);
dataToPass[0]= "clean";
callScript("Clus1toNfastfastsamehost",dataToPass);
dataToPass[0]= "formatallsource";
callScript("Clus1toNfastfastsamehost",dataToPass);
if (options.toLowerCase().contains("failover"))
{
dataToPass[0]= "formatallclusfover";
callScript("Clus1toNfastfastsamehost",dataToPass);
}
else
if (options.toLowerCase().contains("normal"))
{
dataToPass[0]= "formatallclusnormal";
callScript("Clus1toNfastfastsamehost",dataToPass);
}*/
}
}