Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-409

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.1.1.0, 10.2.1.6
    • 10.1.2.1, 10.2.1.6
    • JDBC
    • None

    Description

      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)
      $

      Attachments

        1. ConnectionAttributes.java
          2 kB
          Katherine Marsden
        2. Derby409.patch
          2 kB
          Philip Wilder

        Activity

          People

            acadia_student_01 Philip Wilder
            kmarsden Katherine Marsden
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: