You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-user@db.apache.org by Claas Eggert <cl...@gmx.de> on 2007/03/25 10:56:11 UTC

JCP 225 XQJ and Re: Connecting to Oracle 10 via DDLUtils throws Exceptions

Hi Tom,

i'm still struggeling with the Oracle Datasource Problem :-(
But some other question.
I ran over the JCP 225 XQuery API for Java and i was wondering if there will 
be an integration or some other way for querying xml in dbs? At the moment i 
query the information by creating an xmltable or constructing an 
pretty-formated sequence. Or are there already other ways to do that?

Thanks,

Claas


----- Original Message ----- 
From: "Thomas Dudziak" <to...@gmail.com>
To: <dd...@db.apache.org>
Sent: Wednesday, January 31, 2007 6:46 AM
Subject: Re: Connecting to Oracle 10 via DDLUtils throws Exceptions


> On 1/30/07, Claas Eggert <cl...@gmx.net> wrote:
>
>> I'm trying to connect to Oracle 10g via ddlutils.
>> Since my code works fine with DB2 and postgres i'm wondering why i 
>> couldn't get it to work with Oracle using there jdbc driver (ojdbc14.jar 
>> or the special debugging version).
>>
>> Here's what i tried so far.
>> The code for postgres:
>>
>>         Class.forName("org.postgresql.Driver").newInstance();
>>         PGSimpleDataSource ds = new PGSimpleDataSource();
>>         ds.setDatabaseName("benchmarking");
>>         ds.setUser("user");
>>         ds.setPassword("user");
>>
>>         platform = PlatformFactory.createNewPlatformInstance(ds);
>>
>>         db = platform.readModelFromDatabase("benchmarking");
>>
>> For Oracle I already tried some additional options for the DataSource 
>> like setting the DriverType, Port, the DB-URL in various forms (with user 
>> and pw, port etc).
>
> What data source class are you using ? You have to use one that
> actually implements the DataSource interface
> (http://java.sun.com/j2se/1.4.2/docs/api/javax/sql/DataSource.html).
> DdlUtils comes with the commons-dbcp library which contains an
> easy-to-use data source class called BasicDataSource
> (http://jakarta.apache.org/commons/dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html).
> I think the Oracle JDBC driver provides
> oracle.jdbc.pool.OracleDataSource also implements of this interface,
> but I'm not sure.
>
> Tom 


Re: JCP 225 XQJ and Re: Connecting to Oracle 10 via DDLUtils throws Exceptions

Posted by Thomas Dudziak <to...@gmail.com>.
On 3/25/07, Claas Eggert <cl...@gmx.de> wrote:

> i'm still struggeling with the Oracle Datasource Problem :-(

Could you post the code that you use to connect to the database ?

> I ran over the JCP 225 XQuery API for Java and i was wondering if there will
> be an integration or some other way for querying xml in dbs? At the moment i
> query the information by creating an xmltable or constructing an
> pretty-formated sequence. Or are there already other ways to do that?

DdlUtils is intended for DDL only, and the DML/querying capabilities
are solely for data i/o (which does not require any complicated
queries).
That being said, I'm pretty sure that there are already
implementations of JCP 225 that can easily be integrated with DdlUtils
(via the getDataSource/borrowConnection methods in the Platform
interface).

Tom