You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2007/05/30 15:03:15 UTC

[jira] Updated: (DERBY-2692) Client driver doesn't chain exceptions received from the server

     [ https://issues.apache.org/jira/browse/DERBY-2692?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-2692:
--------------------------------------

    Attachment: d2692.stat
                d2692.diff

Attaching a patch which makes the client recreate the chain of
exceptions sent by the server instead of concatenating the messages.

Derbyall and suites.All ran cleanly on JDK5 and JDK6.

Description of the changes:

* java/client/org/apache/derby/client/am/Sqlca.java:

  - added a message number parameter to the methods that retrieved
    mesage and SQL state

  - fixed SqlErrmc parsing (used the correct delimiter) and renamed
    sqlErrmcTokens_ to sqlErrmcMessages_ since the SqlErrmc was split
    into its separate messages, not its tokens

  - added a string array called sqlStates_, which keeps the SQL states
    for each message in the chain

* java/client/org/apache/derby/client/am/SqlException.java

  - added a message number field to keep track of which message in the
    SQLCA to use

  - changed the constructor that takes an Sqlca argument so that it
    recursively builds the chain of exceptions when the Sqlca contains
    many messages

* java/client/org/apache/derby/client/am/ExceptionFormatter.java

  - removed the printing of SqlErrmcTokens in printTrace(), because
    (a) that method was renamed, and (b) it contains the exact same
    information as SqlErrmc which is printed anyway

* java/testing/org/apache/derbyTesting/junit/BaseJDBCTestCase.java

  - changed assertSQLState() so that it checks nested exceptions on
    the client the same way as on embedded

* java/testing/org/apache/derbyTesting/functionTests/tests/lang/ProcedureInTriggerTest.java

  - enabled an assert that previously only worked on embedded

> Client driver doesn't chain exceptions received from the server
> ---------------------------------------------------------------
>
>                 Key: DERBY-2692
>                 URL: https://issues.apache.org/jira/browse/DERBY-2692
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: d2692.diff, d2692.stat
>
>
> When the client driver receives a chain of exceptions from the server, it generates one exception with the messages from all the server-side exceptions concatenated into one message. No next-exception chain is set up on the client. See the description of DERBY-1440 for an example.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.