ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claudio Miranda <cmira...@eversystems.com.br>
Subject Re: WELCOME to ant-user@jakarta.apache.org
Date Tue, 21 Nov 2000 01:55:14 GMT
   Dear users, I am using ant 1.2 to build a sql script, like this

    <target name="hsql.sql">
       <sql driver="org.hsql.jdbcDriver"
            url="jdbc:HypersonicSQL:hsql://localhost"
            userid="sa"
            password=""
            print="yes"
            classpath="../lib/hsql.jar"
            src="hypersonic.sql"
       />
    </target>

with command prompt ant hsql.sql
and the hypersonic.sql is

CREATE TABLE UserOne (
        userId               INTEGER NOT NULL,
        name                 VARCHAR(50) NOT NULL,
        user_name             VARCHAR(20) NOT NULL,
        PRIMARY KEY (userId),
        UNIQUE (user_name)
);

CREATE TABLE GroupOne (
        groupName            VARCHAR(20) NOT NULL,
        userId               INTEGER NOT NULL,
        PRIMARY KEY (groupName, userId),
        FOREIGN KEY (userId) REFERENCES UserOne (userId)
);

and the error is, appear to be to each create table, the connection is 
closed, because in hypersonic console appear 0:disconnected, then...

java.lang.NullPointerException
         at org.hsql.jdbcResultSet.getColumnName(jdbcResultSet.java:1962)
         at 
org.apache.tools.ant.taskdefs.SQLExec.printResults(SQLExec.java:535)
         at org.apache.tools.ant.taskdefs.SQLExec.execSQL(SQLExec.java:496)
         at 
org.apache.tools.ant.taskdefs.SQLExec.runStatements(SQLExec.java:425)
         at 
org.apache.tools.ant.taskdefs.SQLExec$Transaction.runTransaction(SQLExec.java:592)
         at 
org.apache.tools.ant.taskdefs.SQLExec$Transaction.access$0(SQLExec.java:589)
         at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:366)
         at org.apache.tools.ant.Target.execute(Target.java:142)
         at org.apache.tools.ant.Project.runTarget(Project.java:818)
         at org.apache.tools.ant.Project.executeTarget(Project.java:532)
         at org.apache.tools.ant.Project.executeTargets(Project.java:506)
         at org.apache.tools.ant.Main.runBuild(Main.java:420)
         at org.apache.tools.ant.Main.main(Main.java:149)


if anyone could help me, very thanks.

-- 
   Claudio Miranda
   ___________________________________
   SUN Certified Programmer for JAVA 2


Mime
View raw message