ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Angso, Tony" <Tony_An...@medco.com>
Subject Need Help in iBatis Configuration
Date Wed, 05 Mar 2008 20:23:09 GMT


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


Mime
View raw message