db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrna <my...@Golux.Com>
Subject suggestion for faq entry re schema does not exist error
Date Wed, 26 Jan 2005 22:26:41 GMT

There was a thread in which the error 'schema does not exist' came up,
and Dan Debrunner explained:
and I think it might be worthwhile adding something like the following
to the 'Using Derby' FAQ section.
Most of the following is from Dan's explanation on that thread, except 
the very last 'or'.

Q: Why do I get the error 'schema does not exist'?

The current schema for any connection defaults to a schema corresponding
to the user name. If no user name is supplied then the user name (and
hence current schema) defaults to APP.

However even though the current schema is set to the user name, that
schema may not exist. A schema is only created by CREATE SCHEMA or
creating an object (table etc.) in that schema (this is implicit schema

The one exception to this is the APP schema, which is always created,
though applications should not depend on that.

So you will see the schema not exists error if your application tries to
access the current schema before any objects have been created in it.
Possibilities are you try to perform a DROP TABLE before creating it, or
try to SELECT from a table to see if it should be created or not, or
when there is a problem with the sql for the very first object you try
to create in a particular schema and no explicit CREATE SCHEMA was issued..

View raw message