ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Kratz" <jason.kr...@firm58.com>
Subject RE: java.lang.IllegalArgumentException: No SqlMapClient specified
Date Thu, 28 Feb 2008 14:28:03 GMT
You haven't mentioned whether or not the sqlMapClient bean is configured in
the same spring XML file or not.  If it is in a different spring XML
configuration file try ref bean="sqlMapClient".   

Jason

-----Original Message-----
From: srividhya_v@infosys.comc [mailto:srividhya_v@infosys.com] 
Sent: Thursday, February 28, 2008 6:40 AM
To: user-java@ibatis.apache.org
Subject: java.lang.IllegalArgumentException: No SqlMapClient specified


Hi,
When am
 trying to execute a query using iBatis, getting the following exception.
java.lang.IllegalArgumentException: No SqlMapClient specified
	at org.springframework.util.Assert.notNull(Assert.java:113)
	at
org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemp
late.java:163)
	at
org.springframework.orm.ibatis.SqlMapClientTemplate.executeWithListResult(Sq
lMapClientTemplate.java:219)
	at
org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapClien
tTemplate.java:266)
	at
org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapClien
tTemplate.java:260)
	at
com.infosys.analytics.persistence.user.dao.impl.ScenarioSummaryDAOImpl.getSc
eSumDetails(ScenarioSummaryDAOImpl.java:35)
	at
com.infosys.analytics.business.user.impl.ScenarioSummaryManagerImpl.getSceSu
mDetails(ScenarioSummaryManagerImpl.java:36)
	at
com.infosys.analytics.ui.action.ScenarioSummaryAction.execute(ScenarioSummar
yAction.java:65)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)


Following is the entry for my DAO in dao related XML:
<bean id="scenariosummaryDao"
class="com.infosys.analytics.persistence.user.dao.impl.ScenarioSummaryDAOImp
l">
<property name="sqlMapClient" ref="sqlMapClient" />
</bean>

Following is the entry for my sqlMapClient dao related XML
<bean id="sqlMapClient"
class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation">
<value>classpath:sql-map-config.xml</value>
</property>
<property name="dataSource" ref="dataSource" />
</bean>

I have following entry for my queries XML in sql-map-config.xml
<sqlMap resource="ScenarioSummary.xml" />

In my ScenarioSummary.xml, required entries are present

Please point as to why am getting this exception.


-- 
View this message in context:
http://www.nabble.com/java.lang.IllegalArgumentException%3A-No-SqlMapClient-
specified-tp15735521p15735521.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.



Mime
View raw message