db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From siss...@insession.com
Subject Re: Documentation questions for admin manual
Date Wed, 10 Nov 2004 05:15:04 GMT
See comments inline..

sissonj@insession.com wrote on 09/11/2004 05:56:04 PM:

> Questions regarding the section "Differences between running Derby in 
> embedded mode and using the Network Server":
> 
>         http://incubator.apache.org/derby/manuals/admin/hubprnt19.html
> 
> **Q1** In the section "User authentication" it says "The user's name 
> specified upon connection is the default schema for the connection, if a 

> schema with that name exists. See the "User Names and Schemas" section 
in 
> the Derby Developer's Guide."
> 
> What happens if a schema matching the user's name does not exist?  Do I 
> have to manually create a schema for each defined user?
> 
> E.G. I am have defined a user called wkpoint using the BUILTIN 
> authentication provider in derby.properties
> 
> derby.connection.requireAuthentication=true
> derby.authentication.provider=BUILTIN
> derby.user.wkpoint=wppass
> 
> And I am seeing the following error returned from some of my SQL 
scripts.
> 
> ERROR 42Y07: Schema 'WKPOINT' does not exist

I now know the circumstances where it reports ERROR 42Y07: Schema 
'WKPOINT' does not exist.

My script was attempting to do an insert before the table was defined. 
Here is the output showing the insert failing with the above error, the 
table being defined and then the insert working:

D:\Derby_snapshots\svnversion_46005>java -cp 
.;.\lib\derby.jar;.\lib\derbynet.jar;.\lib\derbytools.jar;..\db2jcc\lib\db2jcc.jar;..\db2jcc\lib\db2jcc_license_c.jar

 -Dij.driver=com.ibm.db2.jcc.DB2Driver -Dij.user=wkpoint 
-Dij.password=wppass -Dij.protocol=jdbc:derb
y:net://localhost:1527/ org.apache.derby.tools.ij
ij version 10.0 (C) Copyright IBM Corp. 1997, 2004.
ij> connect 
'testDB3;create=true:retrieveMessagesFromServerOnGetMessage=true;';
ij> insert into MY_TABLE(MY_ID, NAME) values(1, 'blah');
ERROR 42Y07: Schema 'WKPOINT' does not exist
ij> create table MY_TABLE
(
     MY_ID                           smallint              not null,
     NAME                            varchar(32)           not null
);
0 rows inserted/updated/deleted
ij> insert into MY_TABLE(MY_ID, NAME) values(1, 'blah');
1 row inserted/updated/deleted
ij> insert into MY_OTHER_TABLE(MY_ID, NAME) values(1, 'blah');
ERROR 42X05: Table 'MY_OTHER_TABLE' does not exist.
ij>

Note how the first time I attempted an insert I received the 42Y07 error, 
but after one table had been defined an attempt to insert into a non 
existent table gave me 42X05, the error I was expecting.  So it seems that 
when the first table is created, the schema is created for the user 
(currently connected via network server).

Is this a bug?  Should error 42X05 have been returned even on the first 
insert attempt?

Here is my sysinfo.. (other questions still below)

D:\Derby_snapshots\svnversion_46005>java -cp 
.;.\lib\derby.jar;.\lib\derbynet.jar;.\lib\derbytools.jar;..\db2jcc\lib\db2jcc.jar;..\d
b2jcc\lib\db2jcc_license_c.jar  -Dij.driver=com.ibm.db2.jcc.DB2Driver 
org.apache.derby.tools.sysinfo
------------------ Java Information ------------------
Java Version:    1.4.2_05
Java Vendor:     Sun Microsystems Inc.
Java home:       C:\Program Files\Java\j2re1.4.2_05
Java classpath: 
.;.\lib\derby.jar;.\lib\derbynet.jar;.\lib\derbytools.jar;..\db2jcc\lib\db2jcc.jar;..\db2jcc\lib\db2jcc_license_c.j
ar
OS name:         Windows XP
OS architecture: x86
OS version:      5.1
Java user name:  sissonj
Java user home:  C:\Documents and Settings\john
Java user dir:   D:\Derby_snapshots\svnversion_46005
--------- Derby Information --------
[D:\Derby_snapshots\svnversion_46005\lib\derby.jar] 10.0.2.0 - (46005)
[D:\Derby_snapshots\svnversion_46005\lib\derbynet.jar] 10.0.2.0 - (46005)
[D:\Derby_snapshots\svnversion_46005\lib\derbytools.jar] 10.0.2.0 - 
(46005)
[D:\Derby_snapshots\db2jcc\lib\db2jcc.jar] 2.4 - (17)
[D:\Derby_snapshots\db2jcc\lib\db2jcc_license_c.jar] 2.4 - (17)
------------------------------------------------------
----------------- Locale Information -----------------
------------------------------------------------------


> 
> **Q2** Is the documentation for the section "Encrypted UserID and 
> Password" out of date?  Do you need the IBM JCE if you are running the 
Sun 
> JRE 1.4?
> 
> **Q3** Typo 'Dun JDK'.  Do you want an issue raised?
> 
> Thanks,
> 
> John
> 


Mime
View raw message