Topic
1 reply Latest Post - ‏2007-10-26T19:05:24Z by Stan
SystemAdmin
SystemAdmin
1525 Posts
ACCEPTED ANSWER

Pinned topic Exception on database startup (version 10.3.1.4)

‏2007-10-18T12:48:47Z |

If user authentication and authorization are turned on:
derby.database.defaultConnectionMode=readOnlyAccess
derby.database.fullAccessUsers=TEST
derby.database.sqlAuthorization=TRUE
derby.drda.securityMechanism=STRONG_PASSWORD_SUBSTITUTE_SECURITY

After first connection to DB via NetworkServer we have a such records in derby.log:

2007-10-18 12:30:33.717 GMT:
Booting Derby version The Apache Software Foundation - Apache Derby - 10.3.1.4 - (561794): instance c013800d-0115-b317-a63f-00000052c810
on database directory C:\Java\Derby\Data\elbadb

Database Class Loader started - derby.database.classpath='TEST.UTILS'
2007-10-18 12:30:35.233 GMT ThreadDRDAConnThread_2,5,main Cleanup action starting
java.sql.SQLTransientConnectionException: Connection refused : Invalid authentication.
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.checkUserCredentials(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection40.<init>(Unknown Source)
at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
at org.apache.derby.impl.drda.Database.makeDummyConnection(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.validateSecMecUSRSSBPWD(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.parseACCSEC(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
Caused by: java.sql.SQLException: Connection refused : Invalid authentication.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
... 17 more
============= begin nested exception, level (1) ===========
java.sql.SQLException: Connection refused : Invalid authentication.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.checkUserCredentials(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection40.<init>(Unknown Source)
at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
at org.apache.derby.impl.drda.Database.makeDummyConnection(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.validateSecMecUSRSSBPWD(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.parseACCSEC(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
============= end nested exception, level (1) ===========
Cleanup action completed
But user's connection is established successfully.
As I can understand, internal process can't connect to DB.
How can I adjust settings?
Updated on 2007-10-26T19:05:24Z at 2007-10-26T19:05:24Z by Stan
  • Stan
    Stan
    267 Posts
    ACCEPTED ANSWER

    Re: Exception on database startup (version 10.3.1.4)

    ‏2007-10-26T19:05:24Z  in response to SystemAdmin
    Hi Alexis -
    With the settings you list you are still allowing unauthenticated users to access your database. To prevent connections when a connection does not authenticate you need to set: derby.connection.requireAuthentication=true

    See: http://db.apache.org/derby/docs/10.3/devguide/cdevcsecure36127.html