Derby
  1. Derby
  2. DERBY-2696

ij reports "Attribute is unknown to Derby" on collate, ssl and some other new attributes.

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 10.3.1.4
    • Fix Version/s: None
    • Component/s: Tools
    • Urgency:
      Normal
    • Issue & fix info:
      Newcomer

      Description

      ij> connect 'jdbc:derby:test;ssl=basic';
      URL Attribute [ssl=basic]
      Attribute is unknown to Derby.
      ij> connect 'jdbc:derby:test;traceFile=x';
      URL Attribute [traceFile=x]
      Attribute is unknown to Derby.
      ij> connect 'jdbc:derby:test;collate=blah';
      URL Attribute [collate=blah]
      Attribute is unknown to Derby.

      Reason:

      The attributes traceFileAppend, traceDirectory, traceFile,
      traceLevel, collate and ssl are defined in
      org.apache.derby.shared.common.reference.Attribute.java
      and not in org.apache.derby.iapi.reference.Attribute.java

      and ij does reflection of the latter.

        Issue Links

          Activity

          Hide
          Dag H. Wanvik added a comment -

          It seems URLCheck only does its thing for the embedded driver, cf.
          DERBY-1151 and URLCheck#getAttributes (see fragment below).

          The documentation is silent about this limitation
          (http://db.apache.org/derby/docs/dev/tools/rtoolsijpropref38481.html);
          on the contrary, a sentence leads one to believe it checks for all
          drivers:

          "Typically, you would only explicitly turn off the URL checker if you
          were using ij with a non-Derby JDBC driver or database."

          The code would indicate that this warning is unnecessary:

          if( url.startsWith( "jdbc:derby:net:") ||
          url.startsWith( "jdbc:derby://"))

          { validProps = null; }

          else if( url.startsWith( "jdbc:derby:"))

          { protocol = "jdbc:derby:"; validProps = getValidDerbyProps(); }

          else
          validProps = null;

          ('null' short circuits the check.)

          Until this functionality is extended to the client driver, I guess
          client URL attributes are not impacted by the omissions (the example
          uses embedded driver!). It will still be good to keep those files in
          synch, or even better, eliminate the redundancy.

          Show
          Dag H. Wanvik added a comment - It seems URLCheck only does its thing for the embedded driver, cf. DERBY-1151 and URLCheck#getAttributes (see fragment below). The documentation is silent about this limitation ( http://db.apache.org/derby/docs/dev/tools/rtoolsijpropref38481.html ); on the contrary, a sentence leads one to believe it checks for all drivers: "Typically, you would only explicitly turn off the URL checker if you were using ij with a non-Derby JDBC driver or database." The code would indicate that this warning is unnecessary: if( url.startsWith( "jdbc:derby:net:") || url.startsWith( "jdbc:derby://")) { validProps = null; } else if( url.startsWith( "jdbc:derby:")) { protocol = "jdbc:derby:"; validProps = getValidDerbyProps(); } else validProps = null; ('null' short circuits the check.) Until this functionality is extended to the client driver, I guess client URL attributes are not impacted by the omissions (the example uses embedded driver!). It will still be good to keep those files in synch, or even better, eliminate the redundancy.

            People

            • Assignee:
              Unassigned
              Reporter:
              Bernt M. Johnsen
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Development