You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Ravi P Palacherla (JIRA)" <ji...@apache.org> on 2010/02/24 22:35:27 UTC

[jira] Created: (OPENJPA-1535) Inconsistency in exceptions thrown from MetaDataRepository.resolve()

Inconsistency in exceptions thrown from MetaDataRepository.resolve()
--------------------------------------------------------------------

                 Key: OPENJPA-1535
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1535
             Project: OpenJPA
          Issue Type: Bug
    Affects Versions: 2.0.0-beta, 1.1.0
            Reporter: Ravi P Palacherla
            Assignee: Ravi P Palacherla


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.


[jira] Updated: (OPENJPA-1535) Inconsistency in exceptions thrown from MetaDataRepository.resolve()

Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Donald Woods updated OPENJPA-1535:
----------------------------------

           Patch Info: [Patch Available]
    Affects Version/s: 1.0.3
                       1.2.2
        Fix Version/s: 2.0.0
                       1.3.0
             Assignee:     (was: Ravi P Palacherla)

> Inconsistency in exceptions thrown from MetaDataRepository.resolve()
> --------------------------------------------------------------------
>
>                 Key: OPENJPA-1535
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1535
>             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.


[jira] Updated: (OPENJPA-1535) Inconsistency in exceptions thrown from MetaDataRepository.resolve()

Posted by "Ravi P Palacherla (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ravi P Palacherla updated OPENJPA-1535:
---------------------------------------

    Attachment: OPENJPA-1535-1.1.x.patch

Attaching patch contributed by Hiroki Tateno.

> Inconsistency in exceptions thrown from MetaDataRepository.resolve()
> --------------------------------------------------------------------
>
>                 Key: OPENJPA-1535
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1535
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.1.0, 2.0.0-beta
>            Reporter: Ravi P Palacherla
>            Assignee: Ravi P Palacherla
>         Attachments: OPENJPA-1535-1.1.x.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.


[jira] Updated: (OPENJPA-1535) Inconsistency in exceptions thrown from MetaDataRepository.resolve()

Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Donald Woods updated OPENJPA-1535:
----------------------------------

    Fix Version/s:     (was: 2.0.0)
                   2.0.0-beta3

> Inconsistency in exceptions thrown from MetaDataRepository.resolve()
> --------------------------------------------------------------------
>
>                 Key: OPENJPA-1535
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1535
>             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-beta3
>
>         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.


[jira] Resolved: (OPENJPA-1535) Inconsistency in exceptions thrown from MetaDataRepository.resolve()

Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Donald Woods resolved OPENJPA-1535.
-----------------------------------

    Resolution: Fixed

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

> Inconsistency in exceptions thrown from MetaDataRepository.resolve()
> --------------------------------------------------------------------
>
>                 Key: OPENJPA-1535
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1535
>             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.


[jira] Updated: (OPENJPA-1535) Inconsistency in exceptions thrown from MetaDataRepository.resolve()

Posted by "Ravi P Palacherla (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ravi P Palacherla updated OPENJPA-1535:
---------------------------------------

    Attachment: OPENJPA-1535-trunk.patch

Attaching patch contributed by Hiroki Tateno.

> Inconsistency in exceptions thrown from MetaDataRepository.resolve()
> --------------------------------------------------------------------
>
>                 Key: OPENJPA-1535
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1535
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.1.0, 2.0.0-beta
>            Reporter: Ravi P Palacherla
>            Assignee: Ravi P Palacherla
>         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.