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

ClassCastException from getBlob() on string parameter

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.7.1.1
    • 10.8.1.2
    • JDBC
    • None
    • 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.diff
          2 kB
          Knut Anders Hatlen
        2. d4970-withTests.diff
          5 kB
          Knut Anders Hatlen
        3. Test.java
          0.6 kB
          Knut Anders Hatlen

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment