Uploaded image for project: 'iBatis for Java [READ ONLY]'
  1. iBatis for Java [READ ONLY]
  2. IBATIS-517

can not use mappingLocations in org.springframework.orm.ibatis.SqlMapClientFactoryBean

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.2
    • 2.3.5
    • None
    • None
    • windows xp sp2 eng, sun jdk 1.6.0, resin 3.1.4, spring 2.5.4, struts2 2.1.1

    Description

      in spring 2.5.4 we can use mappingLocations in org.springframework.orm.ibatis.SqlMapClientFactoryBean like below:
      spring-ibatis.xml:
      <bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
      <property name="dataSource" ref="dataSource"/>
      <property name="configLocation" value="/WEB-INF/sqlmap-config.xml"/>
      <property name="mappingLocations" value="classpath*:*/.sqlmap.xml"/>
      <!-<property name="lobHandler" ref="lobHandler"/>->
      <!-<property name="useTransactionAwareDataSource" value="true"/>->
      </bean>
      sqlmap-config.xml:
      <sqlMapConfig>
      <settings cacheModelsEnabled="true"
      lazyLoadingEnabled="true"
      enhancementEnabled="true"
      useStatementNamespaces="true"
      />
      </sqlMapConfig>

      but the resin report:
      org.xml.sax.SAXParseException: The content of element type "sqlMapConfig"
      is incomplete, it must match "(properties?,settings?,resultObjectFactory?,typeAlias*,typeHandler*,transactionManager?,sqlMap+)+".

      I suggest that we can change the http://ibatis.apache.org/dtd/sql-map-config-2.dtd from
      <!ELEMENT sqlMapConfig (properties?, settings?, resultObjectFactory?, typeAlias*, typeHandler*, transactionManager?, sqlMap+)+>
      to
      <!ELEMENT sqlMapConfig (properties?, settings?, resultObjectFactory?, typeAlias*, typeHandler*, transactionManager?, sqlMap*)+>

      Attachments

        Activity

          People

            kaig Kai Grabfelder
            sinosaga sinosaga
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: