ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Elizabeth Baron" <EBa...@poindextersystems.com>
Subject flushOnExecute iBatis in Spring
Date Mon, 02 May 2005 18:02:55 GMT
Hi,

I am a new user of iBatis, so thank you in advance for your patience.
Any help or advice you might be able to offer is appreciated.  

My problem is as follows:  

I have set up an SqlMap with a simple cache model and insert statement.
I am trying to force the cache to clear when the update named,
"updateNetwork", is executed.  But when I try to deploy my application
in Tomcat (4.1.30), SqlMaps complains with this error and will not load
the resource:

Caused by: com.ibatis.common.exception.NestedRuntimeException: Error
parsing XPath '/sqlMapConfig/end()'.  Cause:
com.ibatis.sqlmap.client.SqlMapException: There is no statement named
updateNetwork in this SqlMap.
Caused by: com.ibatis.sqlmap.client.SqlMapException: There is no
statement named updateNetwork in this SqlMap.

When I remove the <flushOnExecute statement="updateNetwork"/>, the web
app starts without errors.

I feel like there is something very obvious that I am missing.  Or maybe
it is some sort of Spring Framework/iBatis interaction that I don't
understand...

Thanks in advance,
Liz


The Network.xml mapping is:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
"http://www.ibatis.com/dtd/sql-map-2.dtd">

<sqlMap namespace="network">

	<cacheModel id="NetworkCache"
				type="LRU"
				readOnly="false"
				serialize="false">
		<flushOnExecute statement="updateNetwork"/>
		<flushInterval hours="24"/>
		<property name="cache-size" value="1000"/>
	</cacheModel>

	<typeAlias alias="network" type="com.poindexter.Network"/>

	<update id="updateNetwork" 
			parameterClass="network">
		UPDATE NETWORK
		SET NAME = #name#,
			DISABLED = #disabled#
			WHERE NETWORK_PK = #networkPK#
	</update>

</sqlMap>

Mime
View raw message