Joe123
unread,Nov 17, 2011, 2:44:04 AM11/17/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mybatis-user
Hello
I am getting the following exception when trying to exectue an
iterator in ibatis:
Cause: com.ibatis.common.beans.ProbeException: Error getting ordinal
list from JavaBean. Cause java.lang.NumberFormatException: For input
string: ""
at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:
110)
at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:
457)
at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.update(SqlMapSessionImpl.java:
90)
at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.update(SqlMapClientImpl.java:
66)
Below is the query in ibatis:
BEGIN
<iterate property="listRegions">
INSERT INTO Regions (REGION_REF,REGION)
values
(#listRegions[].regionRef#,#listRegions[].region#);
<iterate property="listRegions[].cirlesList">
INSERT INTO Circles
(CIRCLE_REF,CIRCLE,REGION_REF)
values
(#listRegions[].cirlesList[].circleRef#,
#listRegions[].cirlesList[].circle#,#listRegions[].regionRef#);
<iterate
property="listRegions[].cirlesList[].communesList">
INSERT INTO Communes
(COMMUNE_REF,COMMUNE,CIRCLE_REF)
values
(#listRegions[].cirlesList[].communesList[].communeRef#,
#listRegions[].cirlesList[].communesList[].commune#,#listRegions[].cirlesList[].circleRef#);
<iterate
property="listRegions[].cirlesList[].communesList[].villagesList">
INSERT INTO Villages
(VILLAGE_REF,VILLAGE,COMMUNE_REF)
values
($listRegions[].cirlesList[].communesList[].villagesList[].villageRef
$, $listRegions[].cirlesList[].communesList[].villagesList[].village$,
$listRegions[].cirlesList[].communesList[].communeRef$);
</iterate>
</iterate>
</iterate>
</iterate>
END;
The problem is on the last iterate ( <iterate
property="listRegions[].cirlesList[].communesList[].villagesList">) as
when removed than no problem occurs
I am sending an array list of object (String, string,
arraylist<object(string, string, Arraylist)>.....)
Why the error is only for the last iteration?
Any help would be appreciated.
Thanks