db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Dudziak" <tom...@gmail.com>
Subject Re: Connecting to Oracle 10 via DDLUtils throws Exceptions
Date Wed, 31 Jan 2007 04:46:10 GMT
On 1/30/07, Claas Eggert <claas01@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
DdlUtils comes with the commons-dbcp library which contains an
easy-to-use data source class called BasicDataSource
I think the Oracle JDBC driver provides
oracle.jdbc.pool.OracleDataSource also implements of this interface,
but I'm not sure.


View raw message