ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From biao....@jpmorgan.com
Subject SqlMap xml parsing exception
Date Wed, 06 Jul 2005 20:11:24 GMT

Hi,

I'm running with 2.0.0 BETA 2 (104), and getting the following exception.
Any advise?

com.ibatis.sqlmap.client.SqlMapException: There was an error while building
the SqlMap instance.
--- The error occurred in
com/jpmorgan/pb/nacore/testers/ibatis/TransactionSqlMap.xml.
--- The error occurred while loading the SQL Map resource.
--- Cause: com.ibatis.sqlmap.client.SqlMapException: XML Parser Error.
Cause: org.xml.sax.SAXException: Error: URI=null Line=7: Attribute "mode"
must be declared for element type "parameter".
Caused by: org.xml.sax.SAXException: Error: URI=null Line=7: Attribute
"mode" must be declared for element type "parameter".
Caused by: com.ibatis.sqlmap.client.SqlMapException: XML Parser Error.
Cause: org.xml.sax.SAXException: Error: URI=null Line=7: Attribute "mode"
must be declared for element type "parameter".
Caused by: org.xml.sax.SAXException: Error: URI=null Line=7: Attribute
"mode" must be declared for element type "parameter".
      at
com.ibatis.sqlmap.engine.builder.xml.XmlSqlMapClientBuilder.buildSqlMap(XmlSqlMapClientBuilder.java:176)
      at
com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapClientBuilder.java:49)
      at
com.jpmorgan.pb.nacore.testers.ibatis.IbatisTester.main(IbatisTester.java:31)

Here is my sql map xml:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
"http://www.ibatis.com/dtd/sql-map-2.dtd">

<sqlMap namespace="Transaction">

Thanks,
Biao Xue

      <parameterMap id="txnReportParameter" class=
"com.jpmorgan.pb.nacore.testers.ibatis.TxnReportParameter" >
            <parameter property="type" jdbcType="VARCHAR" javaType=
"java.lang.String" mode="IN"/>
            <parameter property="id_acc" jdbcType="NUMERIC" javaType="int"
mode="IN"/>
            <parameter property="dateFrom" jdbcType="DATE" javaType=
"java.util.Date" mode="IN"/>
            <parameter property="dateTo" jdbcType="DATE" javaType=
"java.util.Date" mode="IN"/>
            <parameter property="acctype" jdbcType="VARCHAR" javaType=
"java.lang.String" mode="IN"/>
      </parameterMap>

      <!-- Result Map for getInstrumentAltId  -->
      <resultMap id="transactionResult" class=
"com.jpmorgan.pb.nacore.testers.ibatis.Transaction">
            <!--result property="id_imnt_std" column="ID_IMNT_STD"/-->
            <result property="txnid" column="ID_ALT_TRAN"/>
      </resultMap>

      <procedure id="SP_GetTransactionReportOMN" parameterMap=
"txnReportParameter" resultMap="transactionResult">
            {call SP_GetTransactionReportOMN_v2 (?, ?, ?, ?, ?)}
      </procedure>

      <statement id="test" resultClass="int">
            select count(*) from VAR_NYC..acc_alt_id
      </statement>

      <statement id="chainedOff">
            SET CHAINED OFF
      </statement>

</sqlMap>


This communication is for informational purposes only. It is not intended
as an offer or solicitation for the purchase or sale of any financial
instrument or as an official confirmation of any transaction. All market prices,
data and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein 
do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries 
and affiliates.


Mime
View raw message