3 Replies Latest reply: Mar 22, 2012 2:40 PM by Joe Weinstein-Oracle RSS

    RemoteRuntimeException on SerialStatement.close()

      I'm using Weblogic server 10.3, and am receiving the following error in our code:

      java.sql.SQLException: weblogic.rmi.extensions.RemoteRuntimeException: Unexpected Exception
      at weblogic.jdbc.rmi.SerialStatement.close(SerialStatement.java:124)
      at weblogic.jdbc.rmi.SerialStatement.close(SerialStatement.java:110)

      Any thoughts on why this might be occurring? I can't find javadocs for any of these classes, so I'm not sure what if anything I need to check.

        • 1. Re: RemoteRuntimeException on SerialStatement.close()
          Joe Weinstein-Oracle
          Show the full stacktrace. Could it be that the statement is being closed after the connection was closed?
          • 2. Re: RemoteRuntimeException on SerialStatement.close()
            The rest of the stack trace is not relevant. But it is entirely possible I'm closing twice... but given this from the Interface docs:

            Calling the method close on a Statement object that is already closed has no effect.

            (see http://docs.oracle.com/javase/6/docs/api/java/sql/Statement.html#close())

            It would seem this is not correctly implemented, which is why I was confused. If you're telling me that it is not acceptable to call close() twice, then I can deal with that and move on.
            • 3. Re: RemoteRuntimeException on SerialStatement.close()
              Joe Weinstein-Oracle
              It is indeed OK by spec to close a statement that has already been closed,
              even if closed implicitly by having closed the connection, and if you find that
              is what is causing the exception, you can certainly file an SR to get that fixed.
              I was just saying that I've seen such exceptions caused by such behavior. If
              you can easily code to close things once (the connection being the only
              crucial one), then you could also just move on with that change.

              The complexity (which does not excuse a bug) is that we are dealing with
              RMI objects, and once/if the connection is closed, sub-objects (the
              internal RMI referents) may no longer exist...

              Edited by: Joe Weinstein on Mar 22, 2012 12:37 PM