openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albert Lee (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENJPA-1525) TestCacheMarshallerEndToEnd.Log requires to implement warn() method
Date Fri, 19 Feb 2010 18:36:28 GMT
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.


Mime
View raw message