I'd guess because the sql not properly ended, but without some more
troubleshooting it will be almost impossible to solve. :-)
Write a unit test to reproduce the failure. Then start cutting stuff
out until it works. The last thing you remove will be the one that is
broken. Odds are that you'll look at it, smack your forehead and know
the problem. If not, post what you find, and maybe we can help.
Larry
On 9/15/05, RenZenggang <[EMAIL PROTECTED]> wrote:
> Hi all, i hava a sqlMap :
>
> <select id="queryEntCollectionQueue"
> resultMap="entCollectionQueue_resultMap"
> parameterClass="HashMap">
> <![CDATA[
> select
> t.collect_handledate as handledate,
> t.collect_batchno as batchno,
> t.collect_customerno as customerno,
> t.collect_handleno as handleno,
> t.collect_relatedjnlno as relatedjnlno,
> t.collect_companyid as companyid,
> t.collect_amount as amount,
> t.collect_mode as collectMode,
> t.collect_currency as currency,
> t.collect_acno as acno, t.collect_status as status,
> t.collect_direct as direct,
> t.collect_executetimestamp as executetimestamp,
> t.collect_cusrefno as cusrefno,
> t.collect_submittimestamp as submittimestamp,
> t.collect_usagetext as usagetext,
> t.collect_responsecode as responsecode,
> t.collect_authctrl as authctrl,
> t.collect_filialecompanyid as filialecompanyid,
> t.collect_filialeacno as filialeacno,
> t1.ac_name as CollectedAccountName,
> t.collect_voucherno as voucherno,
> t.collect_id as id,
> t.collect_voucherorgid as voucherorgid,
> t.collect_seqauth,
> t.collect_checkflag,
> t.collect_appendeddata
> from bocsh_collection_jnl t,bocsh_companyac t1
> where (t.collect_filialecompanyid = t1.company_id
> and t.collect_filialeacno = t1.ac_no)
> ]]>
> <include refid="dynamicQueryEntCollectionQueueConditions"
> />
> </select>
>
>
> <sql id="dynamicQueryEntCollectionQueueConditions">
> <dynamic>
> <isNotEmpty prepend="and" property="BatchNo">(t.collect_batchno =
> #BatchNo#)</isNotEmpty>
> <isNotEmpty prepend="and" property="HandleNo">(t.collect_handleno =
> #HandleNo#)</isNotEmpty>
> <isNotEmpty prepend="and" property="HandleNoList">
> <iterate property="HandleNoList" open=" (t.collect_id in("
> conjunction="," close="))">#HandleNoList[]#</iterate>
> </isNotEmpty>
> <isNotEmpty prepend="and" property="HandleDate">( t.collect_handledate =
> #HandleDate#)</isNotEmpty>
>
> <isNotEmpty prepend="and" property="AccountNoList">
> <iterate property="AccountNoList" open=" (t.collect_acno in("
> conjunction="," close=")) ">#AccountNoList[]#</iterate>
> </isNotEmpty>
> <isNotEmpty prepend="and" property="AccountNo">(t.collect_acno =
> #AccountNo#)</isNotEmpty>
>
> <isNotEmpty prepend="and" property="CompanyID">(t.collect_companyid =
> #CompanyID#)</isNotEmpty>
> <isNotEmpty prepend="and" property="Currency">( t.collect_currency =
> #Currency#)</isNotEmpty>
>
> <isNotEmpty prepend="and" property="CollectId">(t.collect_id =
> #CollectId#)</isNotEmpty>
> <isNotEmpty prepend="and" property="CollectIdList">
> <iterate property="CollectIdList" open=" (t.collect_id in("
> conjunction="," close="))">#CollectIdList[]#</iterate>
> </isNotEmpty>
>
> <isNotEmpty prepend="and" property="Status">(t.collect_status =
> #Status#)</isNotEmpty>
> <isNotEmpty property="StatusList">
> <iterate property="StatusList" prepend="and" open="( t.collect_status
> in(" conjunction="," close="))">#StatusList[]#</iterate>
> </isNotEmpty>
>
> <isNotEmpty prepend="and" property="BeginDate">
> <![CDATA[(t.collect_handledate >= #BeginDate#)]]>
> </isNotEmpty>
> <isNotEmpty prepend="and" property="EndDate">
> <![CDATA[(t.collect_handledate <= #EndDate#)]]>
> </isNotEmpty>
>
> <isNotEmpty prepend="and" property="HandleDateList">
> <iterate property="HandleDateList" open=" (t.collect_id in("
> conjunction="," close="))">#HandleDateList[]#</iterate>
> </isNotEmpty>
>
> <isNotEmpty prepend="and" property="CollectMode">(t.collect_mode =
> #Mode#)</isNotEmpty>
> <isNotEmpty prepend="and"
> property="CollectCompanyID">(t.collect_filialecompanyid =
> #CollectCompanyID#)</isNotEmpty>
> <isNotEmpty prepend="and" property="CollectAccountNo">(
> t.collect_filialeacno = #CollectAccountNo#)</isNotEmpty>
> <isNotEmpty prepend="and" property="CollectDirect">(t.collect_direct =
> #CollectDirection#)</isNotEmpty>
> </dynamic>
> </sql>
> i call queryForOject(),the db error accured:"sql not properly ended!"
> but after i added "(" and ")" for every sub dynamic clause,is ok!
> the database is Ora8i.
> why?
>
> --
> RenZenggang
> [EMAIL PROTECTED]
> MSN:[EMAIL PROTECTED]
>