Bug 22328 - javax.management.ReflectionException: Cannot find method getClassName with this signature
Summary: javax.management.ReflectionException: Cannot find method getClassName with th...
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 4
Classification: Unclassified
Component: Webapps:Administration (show other bugs)
Version: 4.1.27
Hardware: PC Linux
: P1 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-11 22:39 UTC by Peter D. Ryan
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments
beans xml config (614 bytes, text/plain)
2003-10-02 12:25 UTC, David White
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter D. Ryan 2003-08-11 22:39:05 UTC
With the exception of choosing to make it an NT/2K service, I performed a 
vanilla install of Tomcat 4.1.27 on MS Windows 2K Server, build 5.00.2195, SP 4 
with J2SDK 1.4.2 build 1.4.2-b28 and MS SQLServer 2K SP 3a. I then stopped the 
service, changed it to a manual service, and unzipped 4.1.27-hotfix-22096. I 
then restarted the Tomocat service via the Services panel. Initially, the admin 
tool worrks fine. If I uncomment the AccessLogValve for the default virtual 
host in the conf/server.xml file, I receive the following error in the 
logs/stdout.log file once I log into the admin tool:

Bootstrap: Create Catalina server
Bootstrap: Starting service
Starting service Tomcat-Standalone
Apache Tomcat/4.1.27
Bootstrap: Service started
javax.management.ReflectionException: Cannot find method getClassName with this 
signaturenested exception is java.lang.NoSuchMethodException: 
org.apache.catalina.valves.AccessLogValve.getClassName()
java.lang.NoSuchMethodException: 
org.apache.catalina.valves.AccessLogValve.getClassName()
	at java.lang.Class.getMethod(Class.java:978)
	at org.apache.commons.modeler.BaseModelMBean.invoke
(BaseModelMBean.java:372)
	at org.apache.commons.modeler.BaseModelMBean.getAttribute
(BaseModelMBean.java:238)
	at mx4j.server.interceptor.InvokerMBeanServerInterceptor.getAttribute
(InvokerMBeanServerInterceptor.java:242)
	at mx4j.server.interceptor.DefaultMBeanServerInterceptor.getAttribute
(DefaultMBeanServerInterceptor.java:138)
	at mx4j.server.interceptor.SecurityMBeanServerInterceptor.getAttribute
(SecurityMBeanServerInterceptor.java:101)
	at mx4j.server.interceptor.DefaultMBeanServerInterceptor.getAttribute
(DefaultMBeanServerInterceptor.java:138)
	at mx4j.server.interceptor.DefaultMBeanServerInterceptor.getAttribute
(DefaultMBeanServerInterceptor.java:138)
	at 
mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.getAttribute
(ContextClassLoaderMBeanServerInterceptor.java:198)
	at mx4j.server.MBeanServerImpl.getAttribute(MBeanServerImpl.java:1237)
	at org.apache.webapp.admin.Lists.getValves(Lists.java:549)
	at org.apache.webapp.admin.Lists.getValves(Lists.java:600)
	at org.apache.webapp.admin.TomcatTreeBuilder.getValves
(TomcatTreeBuilder.java:542)
	at org.apache.webapp.admin.TomcatTreeBuilder.getContexts
(TomcatTreeBuilder.java:336)
	at org.apache.webapp.admin.TomcatTreeBuilder.getHosts
(TomcatTreeBuilder.java:292)
	at org.apache.webapp.admin.TomcatTreeBuilder.getServices
(TomcatTreeBuilder.java:219)
	at org.apache.webapp.admin.TomcatTreeBuilder.getServers
(TomcatTreeBuilder.java:180)
	at org.apache.webapp.admin.TomcatTreeBuilder.buildTree
(TomcatTreeBuilder.java:133)
	at org.apache.webapp.admin.SetUpTreeAction.perform
(SetUpTreeAction.java:165)
	at org.apache.struts.action.Action.execute(Action.java:420)
	at org.apache.struts.action.RequestProcessor.processActionPerform
(RequestProcessor.java:484)
	at org.apache.struts.action.RequestProcessor.process
(RequestProcessor.java:274)
	at org.apache.struts.action.ActionServlet.process
(ActionServlet.java:1482)
	at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:256)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:191)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke
(AuthenticatorBase.java:553)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2416)
	at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
	at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:171)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
	at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:172)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
	at org.apache.catalina.valves.AccessLogValve.invoke
(AccessLogValve.java:577)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:174)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.coyote.tomcat4.CoyoteAdapter.service
(CoyoteAdapter.java:223)
	at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:601)
	at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnectio
n(Http11Protocol.java:392)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt
(PoolTcpEndpoint.java:565)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:619)
	at java.lang.Thread.run(Thread.java:534)
Comment 1 Bogdan Klosek 2003-08-29 18:37:24 UTC
Der Fehler passiert, wenn man die Valve
org.apache.catalina.valves.AccessLogValve öffnet. Leider, kenne ich noch keine
Abhilfe, außer der, die Valve zu machen.
Ausgerechnet aber gerade diese Valve ist äußerst wichtig!
                                                                                
java.lang.NoSuchMethodException:
org.apache.catalina.valves.AccessLogValve.getClassName()
        at java.lang.Class.getMethod0(Class.java:1756)
        at java.lang.Class.getMethod(Class.java:963)
        at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:372)
        at
org.apache.commons.modeler.BaseModelMBean.getAttribute(BaseModelMBean.java:238)
        at
mx4j.server.interceptor.InvokerMBeanServerInterceptor.getAttribute(InvokerMBeanServerInterceptor.java:242)
.........
Comment 2 Amy Roh 2003-08-31 00:02:56 UTC
This is fixed and will be available in the next release.  You can add missing
className property for AccessLogValve mbean description as a patch.

  <mbean	 name="AccessLogValve"
  	    className="org.apache.catalina.mbeans.ClassNameMBean"
	  description="Valve that generates a web server access log"
               domain="Catalina"
                group="Valve"
                 type="org.apache.catalina.valves.AccessLogValve">
Comment 3 David White 2003-10-02 12:25:35 UTC
Created attachment 8428 [details]
beans xml config
Comment 4 David White 2003-10-02 12:40:05 UTC
The beans xml config file attachment (id=8428)

does not resolve this problem when added to the descriptors attribute of the 
ServerLifecycleListener tag.

---- attachment contents ------

<?xml version="1.0"?>
  <!DOCTYPE mbeans-descriptors PUBLIC
   "-//Apache Software Foundation//DTD Model MBeans Configuration File"
   "http://jakarta.apache.org/commons/dtds/mbeans-descriptors.dtd";>
  <!--
       Descriptions of JMX MBeans for Catalina
   -->
  
  <mbeans-descriptors>
	<mbean	 name="AccessLogValve"
  	    className="org.apache.catalina.mbeans.ClassNameMBean"
	  description="Valve that generates a web server access log"
               domain="Catalina"
                group="Valve"
                 type="org.apache.catalina.valves.AccessLogValve">
  </mbeans-descriptors>
Comment 5 Amy Roh 2003-12-23 18:29:21 UTC
You need to add missing className property for AccessLogValve mbean description
in org.apache.catalina.mbeans.mbeans-descriptors.xml.

cvs diff -r 1.76 -r 1.77 mbeans-descriptors.xml (in directory
C:\jakarta\jakarta-tomcat-4.0\catalina\src\share\org\apache\catalina\mbeans\)
Index: mbeans-descriptors.xml
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml,v
retrieving revision 1.76
retrieving revision 1.77
diff -r1.76 -r1.77
9c9
<      $Id: mbeans-descriptors.xml,v 1.76 2003/07/08 23:12:51 funkman Exp $
---
>      $Id: mbeans-descriptors.xml,v 1.77 2003/08/19 00:43:09 amyroh Exp $
13,17c13,18
<   <mbean name="AccessLogValve"
<          description="Valve that generates a web server access log"
<          domain="Catalina"
<          group="Valve"
<          type="org.apache.catalina.valves.AccessLogValve">
---
>   <mbean	 name="AccessLogValve"
>   	    className="org.apache.catalina.mbeans.ClassNameMBean"
> 	  description="Valve that generates a web server access log"
>                domain="Catalina"
>                 group="Valve"
>                  type="org.apache.catalina.valves.AccessLogValve">
501a503
>          className="org.apache.catalina.mbeans.ClassNameMBean"

The recent builds should have the fix it them.  Please update.