I am encountering the following error when I try to use Ant-contrib's FOR loop:
Invalid type class org.apache.tools.ant.taskdefs.optional.script.ScriptDefBase used in For task, it does not have a public iterator method
My code is as follows:
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="WTemplateNewIshopForm/jar/ant-contrib-1.0b2.jar"/>
</classpath>
</taskdef>
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="WTemplateNewIshopForm/jar/ant-contrib-1.0b2.jar"/>
</classpath>
</taskdef>
<scriptdef language="javascript" name="upstring">
<attribute name="string" />
<attribute name="to" />
<![CDATA[
var the_string = attributes.get( "string" );
project.setProperty(
attributes.get( "to" ),
the_string.toUpperCase() );
]]>
</scriptdef>
<property name="mulSvcTypes" value="TEST01;TEST02;TEST03;" />
<for list="${mulSvcTypes}" delimiter=";" param="mulSvcType">
<upstring string="${mulSvcType}" to="mulSvcTypeuc" />
<sql
driver="com.ibm.db2.jcc.DB2Driver" url="jdbc:db2://test.test" userid="test" password="test">
<classpath>
<pathelement path="WTemplateNewIshopForm/jar/db2jcc.jar:WTemplateNewIshopForm/jar/db2jcc_license_cisuz.jar:WTemplateNewIshopForm/jar/db2jcc_license_cu.jar"/>
</classpath>
<![CDATA[
INSERT INTO TEST.GRP VALUES ('${mulSvcTypeuc}', '${groupdb}', 'Y');
]]>
<![CDATA[
INSERT INTO TEST.APRV VALUES ('${mulSvcTypeuc}', '${approver}');
]]>
</sql>
</for>
What does the error mean? Thank you