Issue Details (XML | Word | Printable)

Key: DERBY-409
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Philip Wilder
Reporter: Kathey Marsden
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Derby

ClientDataSource setConnectionAttributes("create=true") fails with "An attempt was made to access a database, mydbcreate=true, which was not found."

Created: 30/Jun/05 06:23 AM   Updated: 11/Jul/06 11:53 PM
Return to search
Component/s: JDBC
Affects Version/s: 10.1.1.0, 10.2.1.6
Fix Version/s: 10.1.2.1, 10.2.1.6

Time Tracking:
Not Specified

File Attachments:
  Size
Java Source File Licensed for inclusion in ASF works ConnectionAttributes.java 2005-06-30 06:25 AM Kathey Marsden 2 kB
Text File Licensed for inclusion in ASF works Derby409.patch 2005-07-12 10:18 PM Philip Wilder 2 kB

Resolution Date: 30/Sep/05 01:53 AM


 Description  « Hide
ClientDataSource setConnectionAttributes("create=true") fails with "An attempt was made to access a database, mydbcreate=true, which was not found." The method does not seem to insert a semicolon before the attributes.


run attached repro to produce the error below

$java ConnectionAttributes
embedded setConnectionAttributes
client setConnectionAttributes
org.apache.derby.client.am.DisconnectException: The application server rejected establishment of the connection. An attempt was made to access a database, mydbcreate=true, which was not found.
        at org.apache.derby.client.net.NetConnectionReply.parseRDBNFNRM(NetConnectionReply.java)
        at org.apache.derby.client.net.NetConnectionReply.parseAccessRdbError(NetConnectionReply.java)
        at org.apache.derby.client.net.NetConnectionReply.parseACCRDBreply(NetConnectionReply.java)
        at org.apache.derby.client.net.NetConnectionReply.readAccessDatabase(NetConnectionReply.java)
        at org.apache.derby.client.net.NetConnection.readSecurityCheckAndAccessRdb(NetConnection.java)
        at org.apache.derby.client.net.NetConnection.flowSecurityCheckAndAccessRdb(NetConnection.java)
        at org.apache.derby.client.net.NetConnection.flowUSRIDPWDconnect(NetConnection.java)
        at org.apache.derby.client.net.NetConnection.flowConnect(NetConnection.java)
        at org.apache.derby.client.net.NetConnection.initialize(NetConnection.java)
        at org.apache.derby.client.net.NetConnection.<init>(NetConnection.java)
        at org.apache.derby.jdbc.ClientDataSource.getConnection(ClientDataSource.java)
        at org.apache.derby.jdbc.ClientDataSource.getConnection(ClientDataSource.java)
        at ConnectionAttributes.main(ConnectionAttributes.java:28)
$

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Kathey Marsden added a comment - 30/Jun/05 06:25 AM
repro

Kathey Marsden made changes - 30/Jun/05 06:25 AM
Field Original Value New Value
Attachment ConnectionAttributes.java [ 12311014 ]
Kathey Marsden added a comment - 30/Jun/05 06:30 AM
This issue would appear to be in
java/client/org/apache/derby/client/am/Connection.java
 databaseName_ = dataSource.getDatabaseName() + attrString;

If there is an attrString, there should be a ";" before it.

Philip Wilder made changes - 30/Jun/05 11:58 PM
Assignee Philip Wilder [ acadia_student_01 ]
Philip Wilder made changes - 01/Jul/05 01:56 AM
Status Open [ 1 ] In Progress [ 3 ]
Philip Wilder added a comment - 07/Jul/05 04:34 AM
Please see DERBY-406 for an update on the status of this issue.

Philip Wilder added a comment - 12/Jul/05 10:18 PM
This is a potential patch for the issue brought up in DERBY-406
connectionAttributes will now default to null (aka no default)

It had a clean run of derbyall with the exception of the DERBY-273 issue.

Philip Wilder made changes - 12/Jul/05 10:18 PM
Attachment Derby409.patch [ 12311196 ]
Repository Revision Date User Message
ASF #219256 Fri Jul 15 23:01:02 UTC 2005 djd DERBY-409 This is a potential patch for the issue brought up in DERBY-406
connectionAttributes will now default to null (aka no default)

Patch contributed by Philip Wilder 050503w@acadiau.ca
Files Changed
MODIFY /incubator/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java
MODIFY /incubator/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSource.java

Daniel John Debrunner added a comment - 16/Jul/05 08:03 AM
Committed revision 219256.
Excluded file testSecMec.java as it was only a change in spaces.

Philip, it's just a little easier in the future if patch files are from the root of the tree, not a sub-directory.
This allows committers to applie patches consistently, without having to figure out where the root is.

Thanks for the patch.,

Philip Wilder added a comment - 19/Jul/05 11:16 PM
With the latest patch I believe this issue can be considered resolved. The related Derby-406 and Derby-410 issues remain open.

Philip Wilder made changes - 19/Jul/05 11:16 PM
Resolution Fixed [ 1 ]
Fix Version/s 10.1.1.0 [ 10993 ]
Fix Version/s 10.1.1.1 [ 12310155 ]
Fix Version/s 10.2.0.0 [ 11187 ]
Status In Progress [ 3 ] Resolved [ 5 ]
Andrew McIntyre added a comment - 20/Jul/05 01:14 AM
Setting Fix in to 10.2.0.0 only, as the fix has only gone into the trunk.

Andrew McIntyre made changes - 20/Jul/05 01:14 AM
Fix Version/s 10.1.1.0 [ 10993 ]
Fix Version/s 10.1.1.1 [ 12310155 ]
Repository Revision Date User Message
ASF #219980 Thu Jul 21 01:52:49 UTC 2005 bandaram Merge trunk change 209498 to 10.1 branch.

DERBY-406 - Sets the username to start with the default value ("APP")
DERBY-410 - Sets the server name to start with the default value ("localhost")
DERBY-409 - Adds a semi-colon in the connection class to avoid databasenames like myDBcreate=true resulting from no dividing semi-colon.

Submitted by Satheesh Bandaram (satheesh@sourcery.org)
Files Changed
MODIFY /incubator/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/dataSourcePermissions_net.out
MODIFY /incubator/derby/code/branches/10.1/java/client/org/apache/derby/jdbc/ClientBaseDataSource.java
MODIFY /incubator/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/dataSourcePermissions_net.java
MODIFY /incubator/derby/code/branches/10.1/java/client/org/apache/derby/client/am/Connection.java

Repository Revision Date User Message
ASF #219981 Thu Jul 21 01:55:40 UTC 2005 bandaram Port trunk change 219256 to 10.1 branch.

DERBY-409: This is a potential patch for the issue brought up in DERBY-406 connectionAttributes will now default to null (aka no default)

Ported to 10.1 by Satheesh Bandaram (satheesh@sourcery.org)
Files Changed
MODIFY /incubator/derby/code/branches/10.1/java/client/org/apache/derby/jdbc/ClientBaseDataSource.java
MODIFY /incubator/derby/code/branches/10.1/java/client/org/apache/derby/client/am/Connection.java

Satheesh Bandaram added a comment - 21/Jul/05 10:59 AM
Merged this fix into 10.1 branch with change number: 209498

Satheesh Bandaram made changes - 21/Jul/05 10:59 AM
Fix Version/s 10.1.1.0 [ 10993 ]
Kathey Marsden added a comment - 16/Sep/05 01:47 AM
reopening to fix fix version

Kathey Marsden made changes - 16/Sep/05 01:47 AM
Resolution Fixed [ 1 ]
Status Resolved [ 5 ] Reopened [ 4 ]
Kathey Marsden made changes - 16/Sep/05 01:48 AM
Fix Version/s 10.1.1.0 [ 10993 ]
Status Reopened [ 4 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Fix Version/s 10.1.2.0 [ 12310270 ]
Kathey Marsden made changes - 16/Sep/05 01:48 AM
Status Resolved [ 5 ] Closed [ 6 ]
Deepa Remesh added a comment - 30/Sep/05 01:49 AM
reopening to fix fix version

Deepa Remesh made changes - 30/Sep/05 01:49 AM
Resolution Fixed [ 1 ]
Status Closed [ 6 ] Reopened [ 4 ]
Deepa Remesh made changes - 30/Sep/05 01:51 AM
Fix Version/s 10.1.1.1 [ 12310332 ]
Deepa Remesh made changes - 30/Sep/05 01:53 AM
Status Reopened [ 4 ] Closed [ 6 ]
Resolution Fixed [ 1 ]
Rick Hillegas added a comment - 11/Jul/06 11:53 PM
Assigning to JDBC component.

Rick Hillegas made changes - 11/Jul/06 11:53 PM
Component/s JDBC [ 11407 ]