Announcement Announcement Module
No announcement yet.
ibatis connection and configuration Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • ibatis connection and configuration

    Hi Gurus,
    I am very new to ibatis. I know the concept that sql-map-config for sql statement and object. So that

    1) qlMapClient.startTransaction();

    2) sqlMapClient.startBatch();

    3) sqlMapClient.update("action_id_in_map-sql-confix.xml", pojo);

    4) sqlMapClient.executeBatch();

    5) sqlMapClient.commitTransaction();

    But I don't know how to configure to get the data source or whatever for sqlMapClient. I don't what to use pojoDAO because I don't know how to use it. Can someone show me step by step how to configure and code to obtain sqlMapClient. Thank you very much.


  • #2
    The post seems more appropriate for Ibatis forum rather than Spring Batch. If you want to use Ibatis with Spring Batch, check the sample ibatisJob.xml


    • #3
      I agree with Robert, this probably belongs in another forum. However, I just wanted to add that iBatis can be used as an ItemReader, but that a different class than the SqlMapClient will need to be used. It is essentially a DrivingQueryItemReader with an iBatisKeyGenerator.

      For output, you should be able to follow standard spring patterns:


      • #4
        "Optional features not implemented" Error in Spring-Ibatis-MS Access application

        I am developing an application using Spring Framework with Ibatis for ORM and MS Access as Database. The application starts by displaying a login screen and after verifying the correct user name and password, the user is directed toward another JSP. The following error is encountered when the user enters Name and Password :" Optional features not Implemented".
        My web.xml has the code
        <?xml version="1.0" encoding="UTF-8"?>
        <web-app version="2.4"


        My action-servlet has the code:
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "">

        <bean id="urlMapping" class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">
        <property name="mappings">
        <!-- keys for my work view -->
        <prop key="/hewitt.html">hewittController</prop>

        <bean id="hewittAssociateDao" class="com.hello.connectivity.hewittAssociate.Hewi ttAssociateDaoIbatis">
        <property name="sqlMapClient" ref="sqlMapConfig" />
        <property name="dataSource"><ref local="testDataSource"/></property>

        <bean id="loginManager" class="com.hello.service.LoginManagerImpl">
        <property name="hewittAssociateDao" ref="hewittAssociateDao" />
        <bean id="hewittController" class="com.hello.web.associateController.HewittAss ociateController">
        <property name="loginManager" ref="loginManager" />
        <bean id="testDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
        <property name="driverClassName">
        <property name="url">
        <property name="username">
        <property name="password">

        <bean id="sqlMapConfig" class="org.springframework.orm.ibatis.SqlMapClient FactoryBean">
        <property name="configLocation">


        Please guide me through where the error can be.


        • #5
          Please post to Spring core forum, this forum is devoted to *Spring Batch*