Uploaded image for project: 'Commons DBCP'
  1. Commons DBCP
  2. DBCP-143

[dbcp] SQLNestedException thrown by server causes client ClassNotFoundException.

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0
    • None
    • Operating System: other
      Platform: Other

    • 37181

    Description

      This is a GUI client / application server / database server application.

      On the GUI client side, we see java.lang.ClassNotFoundException:
      org.apache.commons.dbcp.SQLNestedException.

      This happens when the database server is down, DBCP cannot connect to the
      database, and throws a org.apache.commons.dbcp.SQLNestedException.

      Our application server code sends the java.sql.SQLException it sees to the
      client via RMI.

      However, on the client, we have not provided commons-dbcp.jar.

      And I don't think we should - DBCP is server code.

      But, when the client does not have SQLNestedException's class file, the attempt
      to de-serialize it results in the ClassNotFoundException we've been seeing.

      Even old http://java.sun.com/j2se/1.3/docs/api/java/sql/SQLException.html has
      the facilities that SQLNestedExcepion offers: It is able to chain another
      SQLException to itself. So while SQLNestedException clearly causes problems, I
      don't understand what DBCP gains from it.

      What would we loose if it were scratched?

      Attachments

        1. DBCP-143.patch
          24 kB
          Dain Sundstrom

        Issue Links

        Activity

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

          People

            Unassigned Unassigned
            andreas.krueger@dv-ratio.com Andreas Kr├╝ger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Issue deployment