I have an Ant script that uses the "sql" task, and I can connect to my
db and run a query.

I also have a jelly script that tries to do the same thing.  I'm using
"sql:setDataSource" and "sql:query". I'm using the same properties file
for both the Ant and Jelly tests.  The Jelly script fails with:

  <sql:query> Unable to get connection, DataSource invalid: "No suitable
driver"

My Jelly script is just this:

--------------------
<document xmlns:util="jelly:util" xmlns:sql="jelly:sql"
xmlns:log="jelly:log">
 <util:properties file="dbtest.properties"/>
 <log:info>
user="${dbuser}"
password="${dbpwd}"
url="jdbc:oracle:thin:@${dbhost}:${dbport}:${dbname}"
</log:info>
 <sql:setDataSource dataSource="ds"
                    driver="oracle.jdbc.OracleDriver"
                    user="${dbuser}" password="${dbpwd}"
 
url="jdbc:oracle:thin:@${dbhost}:${dbport}:${dbname}" />

 <sql:query dataSource="ds" sql="SELECT TABLE_NAME FROM
USER_TAB_COLUMNS" />
</document>
--------------------

I put the "ojdbc14.jar" in my classpath by setting JELLY_OPTS to set a
property pointing to the root of the Oracle drivers (inside the WebLogic
distribution), and I set forehead.conf to reference that variable, and
add "${wlsextjdbc}/oracle/920/ojdbc14.jar" to the "[root.jelly]"
section.  I'm not certain whether this is the correct way to add this to
the classpath.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to