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.
J.
"Optional features not implemented" Error in Spring-Ibatis-MS Access application
Hi
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"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<servlet>
<servlet-name>action</servlet-name>
<display-name>action</display-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
</web-app>
My action-servlet has the code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="urlMapping" class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">
<property name="mappings">
<props>
<!-- keys for my work view -->
<prop key="/hewitt.html">hewittController</prop>
</props>
</property>
</bean>
<bean id="hewittAssociateDao" class="com.hello.connectivity.hewittAssociate.Hewi ttAssociateDaoIbatis">
<property name="sqlMapClient" ref="sqlMapConfig" />
<property name="dataSource"><ref local="testDataSource"/></property>
</bean>
<bean id="loginManager" class="com.hello.service.LoginManagerImpl">
<property name="hewittAssociateDao" ref="hewittAssociateDao" />
</bean>
<bean id="hewittController" class="com.hello.web.associateController.HewittAss ociateController">
<property name="loginManager" ref="loginManager" />
</bean>
<bean id="testDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName">
<value>sun.jdbc.odbc.JdbcOdbcDriver</value>
</property>
<property name="url">
<value>jdbc:odbc:ASSOCIATE</value>
</property>
<property name="username">
<value></value>
</property>
<property name="password">
<value></value>
</property>
</bean>
<bean id="sqlMapConfig" class="org.springframework.orm.ibatis.SqlMapClient FactoryBean">
<property name="configLocation">
<value>classpath:com/hello/connectivity/sqlMaps/sqlMapConfig.xml</value>
</property>
</bean>
</beans>
Please guide me through where the error can be.