Now I have changed the code
<core:choose><core:choose> <!-- If there is an exception log it --> <core:when test="${dbException != null}"> <gel:log level="ERROR">Database Error while querying data : ${dbException}</gel:log> </core:when> <core:otherwise> <!-- set variables based upon query results --> <core:forEach indexVar="i" items="${on_hold.rows}" var="on_hold"> <core:set value="${on_hold.get('project_code')}" var="v_proj_code"/> <gel:log level="DEBUG">${on_hold.get('project_code')}</gel:log> <core:set value="${on_hold.get('project_name')}" var="v_proj_name"/> <gel:log level="DEBUG">${on_hold.get('project_name')}</gel:log> <gel:parse var="v_child_xml"> <Project name="${v_proj_name}" projectID="${v_proj_code}" > <CustomInformation> <ColumnValue name="prj_sumt_aop_yr"> <core:forEach items="${data_class.rowsByIndex}" trim="true" var="data_class"> <Value>${data_class.rows[i].value}</Value> </core:forEach> <!--<core:forEach items="${data_class.rows}" var="row" > <core:invokeStatic var="rowString" className="org.apache.commons.lang.ArrayUtils" method="toString" > <core:arg type="java.lang.Object" value="${row}" /> </core:invokeStatic> <gel:log level="DEBUG">${rowString}</gel:log> </core:forEach>--> </ColumnValue> </CustomInformation> </Project> </gel:parse> <gel:set insert="true" select="$v_xog/NikuDataBus/Projects" value="${v_child_xml}"/> </core:forEach> </core:otherwise> </core:choose>
Now XOG is getting generated
XOG_INPUT = <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_project.xsd"> <Header action="write" externalSource="NIKU" objectType="project" version="15.6"/> <Projects> <Project name="AOP Test 1.2" projectID="PRJ00880"> <CustomInformation> <ColumnValue name="cmi_prj_sumt_aop_yr"> <Value/> </ColumnValue> </CustomInformation> </Project> </Projects> </NikuDataBus>
I am getting this error message now
XOG_OUTPUT = <XOGOutput xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/status.xsd"> <Object type="project"/> <Status elapsedTime="4.336 seconds" state="FAILURE"/> <Statistics failureRecords="1" insertedRecords="0" totalNumberOfRecords="1" updatedRecords="0"/> <Records> <Record> <KeyInformation> <column name="ID">5070096</column> <column name="name">AOP Test 1.2</column> <column name="UNIQUE_NAME">PRJ00880</column> </KeyInformation> <ErrorInformation> <Severity>FATAL</Severity> <Description>Project Object update failed</Description> <Exception><
So when you get to line 102, you no longer have a arraylist of rows but just a single row.

So data_class.rows[i].value returns a null / empty string.
V/r,
Gene