Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-914

SpecificResponder casts Throwable to Exception; fails for OutOfMemoryError

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.6.0
    • java
    • None

    Description

      I have the following stack frame in an application i'm working with:

      java.lang.ClassCastException: java.lang.OutOfMemoryError cannot be cast to java.lang.Exception
      at org.apache.avro.ipc.specific.SpecificResponder.respond(SpecificResponder.java:90)
      at org.apache.avro.ipc.Responder.respond(Responder.java:149)
      at org.apache.avro.ipc.SocketServer$Connection.run(SocketServer.java:116)
      at java.lang.Thread.run(Thread.java:662)

      Nothing too surprising, here's the code:

        @Override
        public Object respond(Message message, Object request) throws Exception {
      ...
          } catch (InvocationTargetException e) {
            throw (Exception)e.getTargetException();
      ...
      

      It's probably a bug that this ends up with a ClassCastException. Any suggestions? I don't think we can change the signature to Exception. We could check instanceof and wrap the Throwable if it's not an Exception?

      Attachments

        Issue Links

        Activity

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

          People

            philip Philip Martin Assign to me
            philip Philip Martin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment