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

ClassCastException from getBlob() on string parameter

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.7.1.1
    • Fix Version/s: 10.8.1.2
    • Component/s: JDBC
    • Labels:
      None
    • Issue & fix info:
      Repro attached

      Description

      If you call getBlob() on a string parameter in a CallableStatement, you'll get a ClassCastException. We should get a proper SQLException.

      Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to java.sql.Blob
      at org.apache.derby.impl.jdbc.EmbedCallableStatement.getBlob(EmbedCallableStatement.java:580)
      at Test.main(Test.java:13)

        Attachments

        1. d4970-withTests.diff
          5 kB
          Knut Anders Hatlen
        2. d4970.diff
          2 kB
          Knut Anders Hatlen
        3. Test.java
          0.6 kB
          Knut Anders Hatlen

          Issue Links

            Activity

              People

              • Assignee:
                knutanders Knut Anders Hatlen
                Reporter:
                knutanders Knut Anders Hatlen
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: