I get the following error when trying to configure a sqlMapper.
- The error occurred while loading SqlMap.
- The error occurred in <sqlMap resource="${root}\Maps\a.xml"
----> IBatisNet.Common.Exceptions.ConfigurationException : Unable to load
file via resource "root\Maps\a.xml" as resource. Cause : Could not find a
part of the path [Path].
It appears that IBatis is not expanding my ${root} property correctly.
Here is my config:
<sqlMapConfig xmlns="http://ibatis.apache.org/dataMapper"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<properties>
<property resource="properties.config" />
</properties>
<settings>
<setting useStatementNamespaces="true" />
<setting cacheModelsEnabled="true" />
<setting validateSqlMap="true" />
<setting useReflectionOptimizer="true" />
</settings>
<sqlMaps>
<sqlMap resource="${root}\Maps\a.xml" />
<sqlMap resource="${root}\Maps\b.xml" />
<sqlMap resource="${root}\Maps\c.xml" />
<sqlMap resource="${root}\Maps\d.xml" />
</sqlMaps>
</sqlMapConfig>
Properties.config has the following:
<?xml version="1.0" encoding="utf-8" ?>
<settings>
<add key="root" value="C:\Projects\Company\path-blah\Persistence" />
</settings>
I'm using DataMapper 1.61 & DataAccess 1.9.1 libs.
The DataMapper Guide version 1.61 in sections 4.3.2 and 4.3.3 states that
properties can be used for this purpose.
One caveat is my application is a console application. I don't believe that
should make a difference though.
Any assistance is greatly appreciated.
--
View this message in context:
http://www.nabble.com/Configuration-Exception-with-%24%7Broot%7D-in-SqlMap-tf3982941.html#a11307473
Sent from the iBATIS - User - Cs mailing list archive at Nabble.com.