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 RE: Need Help in iBatis Configuration
Date Wed, 05 Mar 2008 22:15:34 GMT
Am getting this now
 Error while loading properties. Cause:
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

Where can I get the Oracle Driver?

-----Original Message-----
From: Clinton Begin [mailto:clinton.begin@gmail.com] 
Sent: Wednesday, March 05, 2008 3:40 PM
To: user-java@ibatis.apache.org
Subject: RE: Need Help in iBatis Configuration


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:Tony_Angso@medco.com] 
Sent: March-05-08 1:23 PM
To: user-java@ibatis.apache.org
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


-----------------------------------------
This e-mail message and any attachments contain confidential
information from Medco. If you are not the intended recipient, you
are hereby notified that disclosure, printing, copying,
distribution, or the taking of any action in reliance on the
contents of this electronic information is strictly prohibited. If
you have received this e-mail message in error, please immediately
notify the sender by reply message and then delete the electronic
message and any attachments.

Mime
View raw message