db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DERBY-5218) Connect fails when sanity checking user name against role names if defaultConnectionMode is noAccess
Date Thu, 05 May 2011 21:33:03 GMT
Connect fails when sanity checking user name against role names if defaultConnectionMode is
noAccess
----------------------------------------------------------------------------------------------------

                 Key: DERBY-5218
                 URL: https://issues.apache.org/jira/browse/DERBY-5218
             Project: Derby
          Issue Type: Bug
            Reporter: Dag H. Wanvik


Given this "derby.properties" files

derby.database.defaultConnectionMode=noAccess
derby.authentication.provider=BUILTIN
derby.user.sa=veryStrongPwd
derby.user.readonly=readonly
derby.fullAccessUsers=sa
derby.readonlyAccessUsers=readonly

this fails:

$  java -Dij.exceptionTrace=true org.apache.derby.tools.ij
ij version 10.9
ij> connect 'jdbc:derby:wombat;create=true;user=sa;password=veryStrongPwd';
ERROR 08004: Database connection refused.
java.sql.SQLNonTransientConnectionException: Database connection refused.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:77)
	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:256)
	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:396)
	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:348)
	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2290)
	at org.apache.derby.impl.jdbc.EmbedConnection.checkUserIsNotARole(EmbedConnection.java:1283)
	at org.apache.derby.impl.jdbc.EmbedConnection.checkUserCredentials(EmbedConnection.java:1215)
	at org.apache.derby.impl.jdbc.EmbedConnection.<init>(EmbedConnection.java:422)
	at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(EmbedConnection30.java:73)
	at org.apache.derby.impl.jdbc.EmbedConnection40.<init>(EmbedConnection40.java:51)
	at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Driver40.java:70)
	at org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:248)
	at org.apache.derby.jdbc.AutoloadedDriver.connect(AutoloadedDriver.java:146)
	at java.sql.DriverManager.getConnection(DriverManager.java:582)
	at java.sql.DriverManager.getConnection(DriverManager.java:154)
	at org.apache.derby.impl.tools.ij.ij.dynamicConnection(ij.java:1527)
	at org.apache.derby.impl.tools.ij.ij.ConnectStatement(ij.java:1357)
	at org.apache.derby.impl.tools.ij.ij.ijStatement(ij.java:1142)
	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(utilMain.java:341)
	at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:261)
	at org.apache.derby.impl.tools.ij.Main.go(Main.java:229)
	at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:184)
	at org.apache.derby.impl.tools.ij.Main.main(Main.java:75)
	at org.apache.derby.tools.ij.main(ij.java:59)
Caused by: java.sql.SQLException: Database connection refused.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:122)
	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:71)
	... 23 more
Caused by: ERROR 08004: Database connection refused.
	at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:276)
	at org.apache.derby.impl.sql.conn.GenericAuthorizer.refresh(GenericAuthorizer.java:312)
	at org.apache.derby.impl.sql.conn.GenericAuthorizer.<init>(GenericAuthorizer.java:69)
	at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.initialize(GenericLanguageConnectionContext.java:383)
	at org.apache.derby.impl.db.BasicDatabase.setupConnection(BasicDatabase.java:295)
	at org.apache.derby.impl.jdbc.TransactionResourceImpl.startTransaction(TransactionResourceImpl.java:189)
	at org.apache.derby.impl.jdbc.EmbedConnection.checkUserIsNotARole(EmbedConnection.java:1251)
	... 18 more

cf mail on derby-user 5 May 2011.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message