db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Burlison <Alan.Burli...@sun.com>
Subject Derby replication seems to be mostly useless
Date Mon, 06 Jul 2009 16:59:20 GMT
I'm having an incredible struggle getting Derby replication to work - in 
fact, I can't get it to work at all.  The problem seems to be centred 
around the use of user authentication in conjunction with replication, 
and when trying to start the slave across the network rather than locally.

For startSlave the documentation on says:

"If authentication or authorization is turned on, you must also specify 
this attribute in conjunction with the user=userName and 
password=userPassword attributes. If authorization is turned on, the 
user must be the database owner."

The example given is:

-- start slave using database name in subprotocol, default slave host
-- and port, authorization

So the parameters I'm using for the connect() call are:

DB URL:     jdbc:derby://localhost:1528/opensolaris
Properties: {user=admin, password=admin, securityMechanism=8,
              startSlave=true, slaveHost=localhost}

and then I get the following exception:

DERBY SQL error: SQLCODE: -1, SQLSTATE: XRE09, SQLERRMC: Cannot start 
replication slave mode for database 'opensolaris'. The database has 
already been booted. [XRE09]

And the database absolutely *isn't* already booted - I'm starting the 
database up just before I run the above connect(), and all I see in the 
log file is the normal network server startup message:

Apache Derby Network Server - - (764942) started and ready to 
accept connections on port 1528

in derby.log, and if I single step through the debugger I seen nothing 
else in the log until I step over the connect() call, at which point I 
see the exception above appear in the log file.

Does replication actually work at all in my scenario?

Alan Burlison

View raw message