You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Albert Lee (JIRA)" <ji...@apache.org> on 2010/02/19 20:40:27 UTC

[jira] Closed: (OPENJPA-1525) TestCacheMarshallerEndToEnd.Log requires to implement warn() method

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

Albert Lee closed OPENJPA-1525.
-------------------------------


> TestCacheMarshallerEndToEnd.Log requires to implement warn() method
> -------------------------------------------------------------------
>
>                 Key: OPENJPA-1525
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1525
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: jpa
>    Affects Versions: 2.0.0-beta, 2.0.0
>            Reporter: Albert Lee
>            Assignee: Albert Lee
>            Priority: Minor
>             Fix For: 2.0.0
>
>
> In TestCacheMarshallerEndToEnd test, it set its own Log implementation to the MetaDataCacheMaintenance class. However it does not implement the warn() method required in 
>     private void loadQuery(Broker broker, QueryMetaData qmd) {
>         try {
>             Query q = broker.newQuery(qmd.getLanguage(), null);
>             qmd.setInto(q);
>             q.compile();
>         } catch (Exception e) {
>             if (log.isTraceEnabled()) {
>                 log.warn("Skipping named query " + qmd.getName() + ": "
>                     + e.getMessage(), e);
>             } else {
>                 log.warn("Skipping named query " + qmd.getName() + ": "
>                     + e.getMessage());
>             }
>         }
>     }
> In a specific test scenario, it will failed with an exception as shown below:
> [11:38:50]: [junit] org.apache.openjpa.conf.TestCacheMarshallerEndToEnd (13m:37s)
> [11:38:50]: [org.apache.openjpa.conf.TestCacheMarshallerEndToEnd] testCacheMarshallerEndToEnd (13m:32s)
> [11:52:21]: [testCacheMarshallerEndToEnd] java.lang.UnsupportedOperationException
> [11:52:21]: [testCacheMarshallerEndToEnd] java.lang.UnsupportedOperationException
> at org.apache.openjpa.conf.TestCacheMarshallerEndToEnd$LogImpl.warn(TestCacheMarshallerEndToEnd.java:153)
> at org.apache.openjpa.conf.MetaDataCacheMaintenance.loadQuery(MetaDataCacheMaintenance.java:152)
> at org.apache.openjpa.conf.MetaDataCacheMaintenance.loadQueries(MetaDataCacheMaintenance.java:139)
> at org.apache.openjpa.conf.MetaDataCacheMaintenance.store(MetaDataCacheMaintenance.java:122)
> at org.apache.openjpa.conf.TestCacheMarshallerEndToEnd.testCacheMarshallerEndToEnd(TestCacheMarshallerEndToEnd.java:83)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)

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