ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason van Zyl <jvan...@periapt.com>
Subject Re: JDBC Drivers know to work with <sql>
Date Mon, 12 Feb 2001 23:10:09 GMT


On Mon, 12 Feb 2001, Bill Brooks wrote:

> On Mon, 12 Feb 2001, Jason van Zyl wrote:
> 
> > Hi,
> > 
> > I am building the Turbine Developer's Kit and I use
> > the <sql> task to automatically insert SQL generated
> > by the project build process and have found that for
> > MySQL it works beautifully, but I have just tried it
> > with Postgres it's not cooperating :-)
> 
> What version of Postgres and what version of the driver are you
> trying? What exactly is failing? Can you give us a paste of the error
> message?
> 
> I've been using the <sql> task since Ant 1.2 shipped with PostgreSQL
> 7.0.2 on several different projects and it works flawlessly.

Hi Bill,

Postgres 7.0.3
JDBC Driver that comes with

This is the SQL in the file that I am trying to insert:

-----------------------------------------------------------------------------
-- TURBINE_PERMISSION
-----------------------------------------------------------------------------

CREATE TABLE TURBINE_PERMISSION
(
    PERMISSION_ID serial,
    PERMISSION_NAME varchar (99) NOT NULL,
    OBJECTDATA oid,
    PRIMARY KEY(PERMISSION_ID),
    UNIQUE (PERMISSION_NAME)
);

And this is the error I get:

insert-sql-file:
      [sql] Executing file:
/home/jvanzyl/js/tdk/dist/tdk/webapps/newapp/WEB-INF/src/sql/turbine-schema.sql

BUILD FAILED

java.lang.NullPointerException
        at
org.postgresql.jdbc2.ResultSetMetaData.getColumnCount(ResultSetMetaData.java:46)
        at
org.apache.tools.ant.taskdefs.SQLExec.printResults(SQLExec.java:540)
        at org.apache.tools.ant.taskdefs.SQLExec.execSQL(SQLExec.java:512)
        at
org.apache.tools.ant.taskdefs.SQLExec.runStatements(SQLExec.java:441)
        at
org.apache.tools.ant.taskdefs.SQLExec$Transaction.runTransaction(SQLExec.java:614)
        at
org.apache.tools.ant.taskdefs.SQLExec$Transaction.access$000(SQLExec.java:592)
        at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:377)
        at org.apache.tools.ant.Target.execute(Target.java:153)
        at org.apache.tools.ant.Project.runTarget(Project.java:898)
        at org.apache.tools.ant.Project.executeTarget(Project.java:536)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:213)
        at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:103)
        at org.apache.tools.ant.Target.execute(Target.java:153)
        at org.apache.tools.ant.Project.runTarget(Project.java:898)
        at org.apache.tools.ant.Project.executeTarget(Project.java:536)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:213)
        at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:103)
        at org.apache.tools.ant.Target.execute(Target.java:153)
        at org.apache.tools.ant.Project.runTarget(Project.java:898)
        at org.apache.tools.ant.Project.executeTarget(Project.java:536)
        at org.apache.tools.ant.Project.executeTargets(Project.java:510)
        at org.apache.tools.ant.Main.runBuild(Main.java:421)
        at org.apache.tools.ant.Main.main(Main.java:149)

This is the same error that I got with MySQL until the
2.0.4 release. It's looks like a common problem.

Thanks,

jvz.


Mime
View raw message