https://issues.apache.org/bugzilla/show_bug.cgi?id=52591

             Bug #: 52591
           Summary: UnsupportedOperationException logged when fetching
                    BasicDataSource 'loginTimeout'
           Product: Tomcat 7
           Version: 7.0.25
          Platform: PC
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Manager
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: ch...@christopherschultz.net
    Classification: Unclassified


With a BasicDataSource configured (using a <Resource>), simply list the
available MBeans and this exception will be emitted to stdout:

SEVERE: Error getting attribute
Catalina:type=DataSource,context=/context,host=localhost,class=javax.sql.DataSource,name="jdbc/myDataSource"
loginTimeout
javax.management.RuntimeOperationsException: Exception invoking method
loginTimeout
        at
org.apache.tomcat.util.modeler.BaseModelMBean.getAttribute(BaseModelMBean.java:197)
        at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:666)
        at
com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:638)
        at
org.apache.catalina.mbeans.MBeanDumper.dumpBeans(MBeanDumper.java:81)
        at
org.apache.catalina.manager.JMXProxyServlet.listBeans(JMXProxyServlet.java:166)
        at
org.apache.catalina.manager.JMXProxyServlet.doGet(JMXProxyServlet.java:121)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
[...]
Caused by: java.lang.UnsupportedOperationException: Not supported by
BasicDataSource
        at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getLoginTimeout(BasicDataSource.java:1083)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


This exception does not cause the request to fail, but definitely puts an ugly
stack trace in catalina.out. It might be better to catch
UnsupportedOperationException and emit a one-line error message -- one that
isn't SEVERE.

-- 
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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to