You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by Mohammed Mudassir <mm...@gmail.com> on 2005/06/04 04:17:50 UTC

Problem with ParamMap

Hello ,

I am facing this error:

IBatisNet.DataMapper.Exceptions.DataMapperException: This SQL map does
not contain an ParameterMap named Person.get-publisher-param. at
IBatisNet.DataMapper.SqlMapper.GetParameterMap(String name) at
IBatisNet.DataMapper.Configuration.Statements.Statement.Initialize(String
sqlMapName, SqlMapper sqlMap) at
IBatisNet.DataMapper.Configuration.Statements.Procedure.Initialize(String
sqlMapName, SqlMapper sqlMap) at
IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ConfigureSqlMap(SqlMapper
sqlMap, XmlNode sqlMapNode) at
IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Initialize() at
IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument
document, Boolean useConfigFileWatcher) at
IBatisNet.DataMapper.SqlMapper.ConfigureAndWatch(String fileName,
ConfigureHandler configureDelegate) at
IBatisNet.DataMapper.SqlMapper.ConfigureAndWatch(ConfigureHandler
configureDelegate) at IBatisNet.DataMapper.Mapper.InitMapper() at
IBatisNet.DataMapper.Mapper.Instance() at
IbatisBuraq.WebFaceSQL.ibatis_sql_datatable.Page_Load(Object sender,
EventArgs e) in
c:\inetpub\wwwroot\webface-sql\ibatis_sql_datatable.aspx.cs:line 32
 

where as my SQLMap.xml have the following stuff:

<?xml version="1.0" encoding="utf-8" ?>
<sqlMap namespace="Person"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="SqlMap.xsd">
	<!-- XML "behind" document for the People service class. -->
	<alias>
		<typeAlias alias="Publishers" type="IbatisBuraq.WebFaceSQL.Publishers" />
	</alias>
	<resultMaps>
		<resultMap id="SelectSPResult" class="Publishers">
			<result property="Name" column="Name" />
			<result property="CompanyName" column="CompanyName" />
			<result property="Address" column="Address" />
			<result property="City" column="City" />
			<result property="State" column="State" />
		</resultMap>
	</resultMaps>
	<statements>
	<procedure id="GetPublisher" resultMap="SelectSPResult" parameterMap
= "get-publisher-param">
		la_GetPublisher
	</procedure>
	</statements>
	<parameterMap id="get-publisher-param" class="paramClass">
		<parameter property="paramCity" column="City"/>
	</parameterMap>


</sqlMap>

it seems to me that the parameterMap name are same! aand still it is
not picking up that parameter, any thing I am missing?

Take Care,

-- 

Mudassir

San Jose,CA

--------------------------------------------------------------------------------------------------------------------------

Hope is a good thing, maybe the best of things, and no good thing ever dies. 

- The Shawshank Redemption (Movie)

Re: Problem with ParamMap

Posted by Roberto R <ro...@gmail.com>.
Try it with <parameterMaps> wrapping <parameterMap>:
<parameterMaps>

> <parameterMap id="get-publisher-param" class="paramClass">
> <parameter property="paramCity" column="City"/>
> </parameterMap>


</parameterMaps>

Roberto