castor
  1. castor
  2. CASTOR-1402

Underlying SQLException information is lost when DuplicateIdentityException is created

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 1.0.1
    • Component/s: JDO
    • Labels:
      None
    • Environment:
      PostgreSQL
    • Number of attachments :
      3

      Description

      when processing SQLException in SQLStatementCreate, code tries to detect duplicate identity exception - if such is detected, new DuplicateIdentityException is created without saving original SQLException (which provides way more information about the cause of the exception) as nested one.

      the patch is really trivial:

      original org.exolab.castor.jdo.engine.SQLStatementCreate code:

      line 326: throw new DuplicateIdentityException(Messages.format("persist.duplicateIdentity", _type, identity));

      corrected code:

      line 326: throw new DuplicateIdentityException(Messages.format("persist.duplicateIdentity", _type, identity), except);

      1. patch.C1402.20060413.txt
        2 kB
        Werner Guttmann
      2. patch.C1402.20060413-002.txt
        10 kB
        Werner Guttmann
      3. patch.C1402.20060413-003.txt
        13 kB
        Werner Guttmann

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Werner Guttmann
            Reporter:
            Yegor Borovikov
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: