ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From PamChua <p.chu...@gmail.com>
Subject iBatis error - No SqlMapClient specified
Date Mon, 16 Feb 2009 13:35:53 GMT

Hi All 

I am new to ibatis , while trying to confugure ibatis using struts2 and
spring, i am facing this error : "No SqlMapClient specified" 

Below is my javacode which calls the ibatis (DBServiceImpl.java which
extends SqlMapClientDaoSupport) 

paramMap.put("bcaNumber", bcaNumber); 
childDocIDList =
(List<RevenueProfitabilityDetailsDTO>)getSqlMapClientTemplate().queryForObjec("retrieveChildRecsFromParentDocId",
paramMap); 

(where RevenueProfitabilityDetailsDTO is my bean which maps to database
table)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The SQLMapClient configuration as specified in XML file
(dataAccessContext.xml) 

<bean id="sqlMapClient"
class="org.springframework.orm.ibatis.SqlMapClientFactoryBean"> 
<property name="configLocation" value="WEB-INF/sql-map-config.xml"/> 
<property name="dataSource" ref="dataSource"/> 
</bean> 

<bean id="dbSvcImpl" class="com.scb.cr.common.impl.DBServiceImpl"> 
<property name="sqlMapClient" ref="sqlMapClient"/> 
</bean> 
----------------------------------------------------------------------------------------------------------

The datasource being reffered in dataAccessContext.xml is defined in another
configuration file ( infContext.xml) 

<beans xmlns="http://www.springframework.org/schema/beans" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:tx="http://www.springframework.org/schema/tx" 
xmlns:jee="http://www.springframework.org/schema/jee" 
xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd 
http://www.springframework.org/schema/jee 
http://www.springframework.org/schema/jee/spring-jee-2.0.xsd 
http://www.springframework.org/schema/tx 
http://www.springframework.org/schema/tx/spring-tx-2.0.xsd" > 

<!-- INF Related bean declarations --> 
<jee:jndi-lookup id="dataSource" jndi-name="jdbc/CR_DB_DataSource"/> 

This datasource has been configured properly in IBMwebshere and working fine
, however i am still getting the above mentioned error. 
I am catching the exception in my java class but no stacktrace is being
printed for it. However if I print e.getMessage() then it prints "No
SqlMapClient specified". 
I have also added the required ibatis jar to my classpath. 

The same configurations are woking for another module but somehow its not
working for this module which I am doing. Please help to identify the
problem or any settings that I have overlooked. 

Thanks 

-- 
View this message in context: http://www.nabble.com/iBatis-error---No-SqlMapClient-specified-tp22037373p22037373.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Mime
View raw message