openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Donald Woods (JIRA)" <>
Subject [jira] Resolved: (OPENJPA-1535) Inconsistency in exceptions thrown from MetaDataRepository.resolve()
Date Thu, 25 Feb 2010 17:32:27 GMT


Donald Woods resolved OPENJPA-1535.

    Resolution: Fixed

Applied patch to trunk and 13x.  Will leave it up to the other branch release managers to

> Inconsistency in exceptions thrown from MetaDataRepository.resolve()
> --------------------------------------------------------------------
>                 Key: OPENJPA-1535
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.0.3, 1.1.0, 1.2.2, 2.0.0-beta
>            Reporter: Ravi P Palacherla
>             Fix For: 1.3.0, 2.0.0
>         Attachments: OPENJPA-1535-1.1.x.patch, OPENJPA-1535-trunk.patch
> There is an inconsistency in the way exceptions are thrown from MetaDataRepository.resolve(ClassMetaData).
> If there are more than one error encountered while resolving metadata then all these
exceptions are wrapped inside MetaDataException 
> and the MetaDataException is thrown. If there is only single exception thrown then that
exception is thrown without wrapping inside MetaDataException.
> So, in case of single error encountered any exception ( need not be MetaDataException)
is thrown 
> but in case of multiple errors encountered MetaDataException is thrown.
> Now, there is a method loadRegisteredClassMetaData() inside same class which calls the
above resolve method ( via other method calls).
> This loadRegisteredClassMetaData() catches MetaDataException and logs a warning, which
is an expected behavior.
> But as resolve(), in case of a single error , throws an exception other than MetaDataException
loadRegisteredClassMetaData() is not
> able to catch this Exception.
> I think this inconsistence behavior has to be fixed inside MetaDataRepository.resolve().

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

View raw message