db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zahra Zahid <zah...@gmail.com>
Subject Re: Schema does not exits exception
Date Thu, 30 Sep 2004 12:34:49 GMT
I dont think the problem is with the application accessing the
tables..becuase it works fine with postgres.
When i used to make a database in postgres...i wud also use the CREATE
USER omar with password 'omar';
command to make a user omar.
How do i do this in Derby...because i think this can help me get the
schema not found exception out...i have tried to make a schema within
the database myself but still i get the same exception.
How do u make a new user in derby system? 
 
 


On Wed, 29 Sep 2004 07:50:01 -0700, Daniel John Debrunner
<djd@debrunners.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Zahra Zahid wrote:
> 
> > Hi all,
> >    This is the connection im using in my build.properties files....the
> > database gets made but when some specific objects are 2 be loaded an
> > exception is thrown:
> > database=derby
> > dbDialect=net.sf.hibernate.dialect.GenericDialect
> > jdbcDriver=derby.jar
> > dbURL=jdbc:derby:omar_registry;create=true;user=omar;password=omar
> >
> > dbUsername=omar
> > dbPassword=omar
> > jdbcClassName=org.apache.derby.jdbc.EmbeddedDriver
> > dbTransactionIsolation=TRANSACTION_READ_COMMITTED
> > dbLargeBinaryType=blob
> >
> > I need to know how to resolve this issue?
> 
> It's hard to see what is going on, namely what SQL statement is causing
> the schema not found execption. But maybe an explanation will help.
> 
> The current schema for any connection defaults to a schema corresponding
> to the user name, in this case OMAR. 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
> creation). Thus in your case the schema OMAR does not exist.
> 
> 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.
> 
> Dan.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.5 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFBWsuYIv0S4qsbfuQRAtzWAJ0aV0tTB8Kow0kIW6hEilSa0lIVmwCg0pRD
> ulxNnc92dgt/mgU+fnOkMWw=
> =/bcK
> -----END PGP SIGNATURE-----
> 
>

Mime
View raw message