ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Gaber <joe.ga...@bankofamerica.com>
Subject org.xml.sax.SAXParseException: Attribute
Date Thu, 21 Jul 2005 14:58:58 GMT
Any ideas about why I'm getting these errors?

Tomcat stdout.log

- Creating shared instance of singleton bean 'dataSource'
- Creating shared instance of singleton bean 'sqlMapClient'
- Destroying singletons in factory

{org.springframework.beans.factory.support.DefaultListableBeanFactory defining
beans

[dataSource,sqlMapClient,repairItemDao,gfeds,gfedsprototypebasicController,
listRepairItemsController,urlMapping,viewResolver];
root of BeanFactory hierarchy}
- Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'sqlMapClient' defined in ServletContext resource
[/WEB-INF/gfedsprototypebasic-servlet.xml]: Initialization of bean failed;
nested exception is com.ibatis.common.exception.NestedRuntimeException: Error
occurred.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. 
Cause: com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath
'/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException: Error
parsing XML.  Cause: org.xml.sax.SAXParseException: Attribute "id" must be
declared for element type "sqlMap".
Caused by: org.xml.sax.SAXParseException: Attribute "id" must be declared for
element type "sqlMap".
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
org.xml.sax.SAXParseException: Attribute "id" must be declared for element type
"sqlMap".


Spring App config xml
    
    <bean id="sqlMapClient"
        class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
        <property name="configLocation">
            <value>WEB-INF/sqlMapConfig.xml</value>
        </property>
    </bean>


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

<sqlMapConfig>

    <properties resource="properties/jdbc.properties" />

    <sqlMap resource="com/bofa/gcib/gfeds/dao/ibatis/maps/RepairItem.xml" />

</sqlMapConfig>





RepairItem.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 id="RepairItem">

    <select id="getRepairItemById" parameterClass="int"
resultClass="com.bofa.gcib.gfeds.domain.RepairItem">
        select * from repairitem where repairitem.repairitemid = #value#
    </select>

    <select id="getRepairItems"
        resultClass="java.util.List">
        select * from repairitem
    </select>

    <insert id="insertRepairItem"
parameterClass="com.bofa.gcib.gfeds.domain.RepairItem">
        insert into repairitem (repairitemid, repairitemdate, account,
        buyccy, buyamt, sellccy, sellamt, status) values
        (#repairItemid#, #repairItemdate#, #account#, #buyccy#,
        #buyamt#, #sellccy#, #sellamt#, #status#)
    </insert>

    <update id="updateRepairItem"
parameterClass="com.bofa.gcib.gfeds.domain.RepairItem">
        update repairitem set repairitemid = #repairItemid#,
        repairitemdate = #repairItemdate#, account = #account#, buyccy =
        #buyccy#, buyamt = #buyamt#, sellccy = #sellccy#, sellamt =
        #sellamt#, status = #status# where repairitemid = #repairItemid#)
    </update>

</sqlMap>




Mime
View raw message