Details
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);
Initial patch, where I added one more occurence of calling DuplicateIdentityException(String) rather than DuplicateIdentityException(String, Exception), namely in SqlStatementLoad.