tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 49883] New: java.lang.UnsupportedOperationException: The getName() method should never be called
Date Sun, 05 Sep 2010 02:58:55 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=49883

           Summary: java.lang.UnsupportedOperationException: The getName()
                    method should never be called
           Product: Tomcat 7
           Version: trunk
          Platform: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: kevin@infofinity.com


Hi, I am running Tomcat trunk (revision 992708, 2010-09-03). I added this line
to conf/logging.properties:

org.apache.catalina.level=FINEST

The server fails to start with:

Throwable occurred: java.lang.UnsupportedOperationException: The getName()
method should never be called
    at org.apache.catalina.realm.CombinedRealm.getName(CombinedRealm.java:268)
    at org.apache.catalina.realm.RealmBase.toString(RealmBase.java:1015)
    at java.text.MessageFormat.subformat(MessageFormat.java:1258)
    at java.text.MessageFormat.format(MessageFormat.java:807)
    at
org.apache.tomcat.util.res.StringManager.getString(StringManager.java:152)
    at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:320)
    at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:305)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:98)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:131)
    at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1020)
    at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:276)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140)
    at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:429)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140)
    at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:649)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:584)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:600)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:416)
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:600)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:416)
Caused by: java.lang.UnsupportedOperationException: The getName() method should
never be called
    at org.apache.catalina.realm.CombinedRealm.getName(CombinedRealm.java:268)
    at org.apache.catalina.realm.RealmBase.toString(RealmBase.java:1015)
    at java.text.MessageFormat.subformat(MessageFormat.java:1258)
    at java.text.MessageFormat.format(MessageFormat.java:807)
    at
org.apache.tomcat.util.res.StringManager.getString(StringManager.java:152)
    at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:320)
    at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:305)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:98)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:131)
    at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1020)
    at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:276)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140)
    at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:429)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140)
    at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:649)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:584)
    ... 6 more


If I comment out that line in logging.properties, the server starts fine.
Looking at the code in LifecycleBase line 320, it is a log.debug call:

        if (log.isDebugEnabled()) {
            log.debug(sm.getString("lifecycleBase.setState", this, state));
        }

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message