ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Fischer" <fisc...@Intellicare.de>
Subject SQL Statement
Date Thu, 07 Mar 2002 13:13:45 GMT
Hi all :-)

I wrote the following target:

<target name="interbase" description="deploy the tables and the values into
the Interbase Server">

 <exec dir="." executable="isql.exe" os="Windows 2000">
   <arg line="-i ${script}/MONICA.SQL"/>
 </exec>

 <sql
   driver="interbase.interclient.Driver"
   url="jdbc:interbase://localhost/L:/MONICA.GDB"
   userid="monica"
   password="monica"
   autocommit="true"
   onerror="continue"
 >

   <fileset dir="${script}">
     <exclude name="CVS"/>
     <exclude name="MONICA.SQL"/>
   </fileset>

   <classpath refid="project.path"/>
 </sql>

</target>


For some tables this target triggers the following exception :

interbase:
     [exec] Use CONNECT or CREATE DATABASE to specify a database
      [sql] Executing file: P:\server\db\test\jo\APPLICATIONFORM.SQL

BUILD FAILED

java.lang.VerifyError: (class: interbase/interclient/ErrorKey, method: _$372
signature: (Ljava/lang/String;Ljava/lang/String;I)V) Expecting to find
unitialized object on stack
        at interbase.interclient.SQLException.<init>(SQLException.java:96)
        at
interbase.interclient.RecvMessage.createSQLException(RecvMessage.java:694)
        at
interbase.interclient.RecvMessage.makeSQLException(RecvMessage.java:593)
        at
interbase.interclient.RecvMessage.get_EXCEPTIONS(RecvMessage.java:554)
        at interbase.interclient.Statement._$121856(Statement.java:645)
        at interbase.interclient.Statement.execute(Statement.java:624)
        at org.apache.tools.ant.taskdefs.SQLExec.execSQL(SQLExec.java:584)
        at
org.apache.tools.ant.taskdefs.SQLExec.runStatements(SQLExec.java:526)
        at
org.apache.tools.ant.taskdefs.SQLExec$Transaction.runTransaction(SQLExec.jav
a:693)
        at
org.apache.tools.ant.taskdefs.SQLExec$Transaction.access$000(SQLExec.java:67
1)
        at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:444)
        at org.apache.tools.ant.Task.perform(Task.java:217)
        at org.apache.tools.ant.Target.execute(Target.java:184)
        at org.apache.tools.ant.Target.performTasks(Target.java:202)
        at org.apache.tools.ant.Project.executeTarget(Project.java:601)
        at org.apache.tools.ant.Project.executeTargets(Project.java:560)
        at org.apache.tools.ant.Main.runBuild(Main.java:454)
        at org.apache.tools.ant.Main.start(Main.java:153)
        at org.apache.tools.ant.Main.main(Main.java:176)

Total time: 1 second




For the following table the target works fine:
CREATE TABLE BED
(
 ID INTEGER NOT NULL,
 CAPTION CHAR(255),
 PRIMARY KEY (ID)
);
INSERT INTO BED (ID, CAPTION) VALUES (6, 'Zi 9 - Fenster');
INSERT INTO BED (ID, CAPTION) VALUES (11, 'Zi 9 - Tür');
INSERT INTO BED (ID, CAPTION) VALUES (16, 'Zi 8 - Fenster');
INSERT INTO BED (ID, CAPTION) VALUES (20, 'Zi 8 - Tür');
INSERT INTO BED (ID, CAPTION) VALUES (25, 'Zi 7- Fenster');
INSERT INTO BED (ID, CAPTION) VALUES (26, 'Zi 7 - Tür');
INSERT INTO BED (ID, CAPTION) VALUES (28, 'Zi 6 - Fenster');
INSERT INTO BED (ID, CAPTION) VALUES (32, 'Zi 6 - Tür');
INSERT INTO BED (ID, CAPTION) VALUES (37, 'Zi 5 - Tür');
INSERT INTO BED (ID, CAPTION) VALUES (41, 'Zi 5 - Fenster');
INSERT INTO BED (ID, CAPTION) VALUES (46, 'Zi 4 - Fenster');
INSERT INTO BED (ID, CAPTION) VALUES (50, 'Zi 4 - Tür');
INSERT INTO BED (ID, CAPTION) VALUES (55, 'Zi 3');
INSERT INTO BED (ID, CAPTION) VALUES (60, 'Zi 2 - Fenster');
INSERT INTO BED (ID, CAPTION) VALUES (61, 'Zi 2 - Tür');
INSERT INTO BED (ID, CAPTION) VALUES (63, 'Zi 1 - Fenster');
INSERT INTO BED (ID, CAPTION) VALUES (64, 'Zi 1 - Tür');
INSERT INTO BED (ID, CAPTION) VALUES (69, 'Wartebett 1');
INSERT INTO BED (ID, CAPTION) VALUES (70, 'Wartebett 2');


For the following table the target fails :
CREATE TABLE MEASURE_DESC
(
 VALUE_ID	SMALLINT NOT NULL,
 TYPE_ID	SMALLINT NOT NULL,
 SYMBOL_ID	SMALLINT NOT NULL,
 NAME	VARCHAR(30) NOT NULL,
 DESCR	VARCHAR(200)
);
INSERT INTO MEASURE_DESC (VALUE_ID, TYPE_ID, SYMBOL_ID, NAME, DESCR) VALUES
(1, 5, 1, 'Atemform', NULL);
INSERT INTO MEASURE_DESC (VALUE_ID, TYPE_ID, SYMBOL_ID, NAME, DESCR) VALUES
(2, 5, 1, 'freier Eintrag!', NULL);
INSERT INTO MEASURE_DESC (VALUE_ID, TYPE_ID, SYMBOL_ID, NAME, DESCR) VALUES
(31, 5, 1, 'ASY', NULL);
INSERT INTO MEASURE_DESC (VALUE_ID, TYPE_ID, SYMBOL_ID, NAME, DESCR) VALUES
(4, 5, 1, 'FiO2', NULL);
INSERT INTO MEASURE_DESC (VALUE_ID, TYPE_ID, SYMBOL_ID, NAME, DESCR) VALUES
(32, 5, 1, 'VF', NULL);
INSERT INTO MEASURE_DESC (VALUE_ID, TYPE_ID, SYMBOL_ID, NAME, DESCR) VALUES
(33, 5, 1, 'VT', NULL);
INSERT INTO MEASURE_DESC (VALUE_ID, TYPE_ID, SYMBOL_ID, NAME, DESCR) VALUES
(34, 5, 1, 'RUN', NULL);
INSERT INTO MEASURE_DESC (VALUE_ID, TYPE_ID, SYMBOL_ID, NAME, DESCR) VALUES
(35, 5, 1, 'AIVR', NULL);
INSERT INTO MEASURE_DESC (VALUE_ID, TYPE_ID, SYMBOL_ID, NAME, DESCR) VALUES
(36, 5, 1, 'CPT', NULL);
INSERT INTO MEASURE_DESC (VALUE_ID, TYPE_ID, SYMBOL_ID, NAME, DESCR) VALUES
(37, 5, 1, 'BGM', NULL);
INSERT INTO MEASURE_DESC (VALUE_ID, TYPE_ID, SYMBOL_ID, NAME, DESCR) VALUES
(38, 5, 1, 'TACH', NULL);
INSERT INTO MEASURE_DESC (VALUE_ID, TYPE_ID, SYMBOL_ID, NAME, DESCR) VALUES
(39, 5, 1, 'BRDY', NULL);
INSERT INTO MEASURE_DESC (VALUE_ID, TYPE_ID, SYMBOL_ID, NAME, DESCR) VALUES
(40, 5, 1, 'PAUS', NULL);
INSERT INTO MEASURE_DESC (VALUE_ID, TYPE_ID, SYMBOL_ID, NAME, DESCR) VALUES
(41, 5, 1, '+++', NULL);
INSERT INTO MEASURE_DESC (VALUE_ID, TYPE_ID, SYMBOL_ID, NAME, DESCR) VALUES
(42, 5, 1, '---', NULL);
INSERT INTO MEASURE_DESC (VALUE_ID, TYPE_ID, SYMBOL_ID, NAME, DESCR) VALUES
(43, 5, 1, '***', NULL);
INSERT INTO MEASURE_DESC (VALUE_ID, TYPE_ID, SYMBOL_ID, NAME, DESCR) VALUES
(44, 5, 1, 'APN', NULL);
INSERT INTO MEASURE_DESC (VALUE_ID, TYPE_ID, SYMBOL_ID, NAME, DESCR) VALUES
(45, 5, 1, 'ARTF', NULL);
INSERT INTO MEASURE_DESC (VALUE_ID, TYPE_ID, SYMBOL_ID, NAME, DESCR) VALUES
(25, 5, 1, 'Gesamteinfuhr fortl.', NULL);
INSERT INTO MEASURE_DESC (VALUE_ID, TYPE_ID, SYMBOL_ID, NAME, DESCR) VALUES
(26, 5, 1, 'Gesamtausfuhr', NULL);
INSERT INTO MEASURE_DESC (VALUE_ID, TYPE_ID, SYMBOL_ID, NAME, DESCR) VALUES
(27, 5, 1, 'Gesamtbilanz', NULL);
INSERT INTO MEASURE_DESC (VALUE_ID, TYPE_ID, SYMBOL_ID, NAME, DESCR) VALUES
(28, 5, 1, 'Einfuhr (h)', NULL);
INSERT INTO MEASURE_DESC (VALUE_ID, TYPE_ID, SYMBOL_ID, NAME, DESCR) VALUES
(29, 5, 1, 'Ausfuhr (h)', NULL);
INSERT INTO MEASURE_DESC (VALUE_ID, TYPE_ID, SYMBOL_ID, NAME, DESCR) VALUES
(30, 5, 1, 'Bilanz (h)', NULL);


Any ideas what's going wrong here ? Especially, why doesn't the ant script
continue although i set the onerror flag to 'continue'?
And finally : How is it possible to create a database ? I do it with
isql.exe tool :-((.. any better solutionsfor that ?

Thanks for help :-)

Thomas

















Thomas Fischer
Software Engineer

Fischer@IntelliCare.de
+49(421)9 88 99-70




IntelliCare GmbH
Anne-Conway-Straße 2
28359 Bremen

www.IntelliCare.de
Phone +49(421)9 88 99-88
Fax   +49(421)9 88 99-99


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message