Wow, sorry for such a horribly unhelpful error! That exception is thrown if
any of these keys are missing, not simply null, but completely missing.
<property name="JDBC.Driver" value="${driver}"/>
<property name="JDBC.ConnectionURL" value="${jdbc.url.alpha}"/>
<property name="JDBC.Username" value="${username.alpha}"/>
<property name="JDBC.Password" value="${password.alpha}"/>
But they are indeed there... so I'm confused too, as it should succeed...?
Is there any chance this is the wrong XML configuration file that's being
loaded?
Clinton
-----Original Message-----
From: Angso, Tony [mailto:[EMAIL PROTECTED]
Sent: March-05-08 1:23 PM
To: [email protected]
Subject: Need Help in iBatis Configuration
Am running in RAD6 and getting the following error
[3/5/08 14:24:50:692 EST] 00000025 SystemErr R
java.lang.RuntimeException: Error occurred. Cause:
com.ibatis.common.xml.NodeletException: Error parsing XML. Cause:
java.lang.RuntimeException: Error parsing XPath
'/sqlMapConfig/transactionManager/dataSource/end()'. Cause:
com.ibatis.sqlmap.client.SqlMapException: Error initializing DataSource.
Could not instantiate DataSourceFactory. Cause:
java.lang.RuntimeException: SimpleDataSource: Error while loading
properties. Cause: java.lang.RuntimeException: SimpleDataSource: Some
properties were not set.
my db.properties
driver=oracle.jdbc.driver.OracleDriver
jdbc.url.alpha=jdbc:oracle:thin:@//mcfl1uaq:1535/MCDBI03
username.alpha=user
password.alpha=password
my sqlmapconfig.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config
2.0//EN" "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<properties resource="db.properties"/>
<settings cacheModelsEnabled="true" enhancementEnabled="true"
lazyLoadingEnabled="true" maxRequests="1024" maxSessions="128"
maxTransactions="32" useStatementNamespaces="false"/>
<transactionManager type="JDBC">
<dataSource type="SIMPLE">
<property name="JDBC.Driver" value="${driver}"/>
<property name="JDBC.ConnectionURL"
value="${jdbc.url.alpha}"/>
<property name="JDBC.Username" value="${username.alpha}"/>
<property name="JDBC.Password" value="${password.alpha}"/>
</dataSource>
</transactionManager>
<sqlMap resource="xml/uv_sqlmap.xml"/>
</sqlMapConfig>
Am getting error in
String resource = "sqlmapconfig.xml";
Reader reader = Resources.getResourceAsReader(resource);
alphaSqlMap = SqlMapClientBuilder.buildSqlMapClient(reader); // <--
error on this statement
Appreciate any help! Thanks
Tony