The Java EE 5 Tutorial

Creating the Database Tables Using Ant

    The database tables are automatically created by the create-tables task, which is called before you deploy the application with the ant deploy task. To manually create the tables, do the following:

  1. In a terminal window, navigate to tut-install/javaeetutorial5/examples/ejb/order/.

  2. Type the following command:

    ant create-tables

    Note –

    The first time the create-tables task is run, you will see error messages when the task attempts to remove tables that don’t exist. Ignore these error messages. Subsequent calls to create-tables will run with no errors and will reset the database tables.