Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 590193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:30:10+00:00 2026-05-13T15:30:10+00:00

I’m trying to use org.sqlite.JDBC to create and update a sqlite database in ant.

  • 0

I’m trying to use org.sqlite.JDBC to create and update a sqlite database in ant.
The sqlitejdbc-v056.jar comes from http://www.zentus.com/sqlitejdbc/ and is the latest version (056)

This is my build.xml:

<?xml version="1.0" encoding="utf-8"?>

<project name="My Project" default="mytarget" basedir=".">

    <path id="antclasspath">
        <fileset dir="_ant">
            <include name="*.jar"/>
        </fileset>
    </path>

    <target name="mytarget">
        <property name="antclasspathar" refid="antclasspath" />
        <echo message="Classpath is ${antclasspathar}"/>
        <sql
            driver="org.sqlite.JDBC"
            url="jdbc:sqlite:C:/Projects/dummy/test.db"
            userid=""
            password=""
            classpathref="antclasspath"
        >
            DROP TABLE IF EXISTS people;
            CREATE TABLE people (name, occupation);
        </sql>

    </target>

</project>

This is the output I get:

C:\Projects\dummy>ant -v
Apache Ant version 1.7.1 compiled on June 27 2008
Buildfile: build.xml
Detected Java version: 1.6 in: C:\Program Files (x86)\Java\jdk1.6.0_10\jre
Detected OS: Windows Vista
parsing buildfile C:\Projects\dummy\build.xml with URI = file:/C:/Projects/dummy/build.xml
Project base dir set to: C:\Projects\dummy
[antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found.
Build sequence for target(s) `mytarget' is [mytarget]
Complete build sequence is [mytarget, ]

mytarget:
     [echo] Classpath is C:\Projects\dummy\_ant\sqlitejdbc-v056.jar
      [sql] connecting to jdbc:sqlite:C:/Projects/dummy/test.db
      [sql] Loading org.sqlite.JDBC using AntClassLoader with classpath C:\Projects\dummy\_ant\sqlitejdbc-v056.jar
      [sql] Executing commands
      [sql] SQL:  DROP TABLE IF EXISTS people
      [sql] Failed to execute:  DROP TABLE IF EXISTS people

BUILD FAILED
java.sql.SQLException: no ResultSet available
        at org.sqlite.Stmt.getResultSet(Stmt.java:111)
        at org.apache.tools.ant.taskdefs.SQLExec.execSQL(SQLExec.java:567)
        at org.apache.tools.ant.taskdefs.SQLExec.runStatements(SQLExec.java:535)
        at org.apache.tools.ant.taskdefs.SQLExec$Transaction.runTransaction(SQLExec.java:764)
        at org.apache.tools.ant.taskdefs.SQLExec$Transaction.access$000(SQLExec.java:706)
        at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:449)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.apache.tools.ant.Main.runBuild(Main.java:758)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Total time: 0 seconds
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T15:30:11+00:00Added an answer on May 13, 2026 at 3:30 pm

    DDL (Data Definition Language, e.g. CREATE, DROP, etc) statements does not return a ResultSet while your Ant script is apparently expecting it. At least, the SQLException is basically telling that you. I don’t do Ant extensively, so I can’t go in detail, but you at least need to change the script so so that no return value is expected.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 386k
  • Answers 386k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I may not be correct, but try sending a header… May 14, 2026 at 11:47 pm
  • Editorial Team
    Editorial Team added an answer It is a batch terminator this will break declare @i… May 14, 2026 at 11:47 pm
  • Editorial Team
    Editorial Team added an answer There is absolutely no bug; you simply misunderstood the subtyping… May 14, 2026 at 11:47 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.