I don't really like this solution. I really am against blocking logs
unless absolutely necessary since it potentially hides bigger
problems. Why don't you change the "Geronimo" in the Engine (in the
plan.xml of the config) to "geronimo" to help make this work? Jeff anita kulshreshtha wrote: I would like to ignore the warning issued by tomcat by setting log4j.logger.org.apache.catalina.connector.MapperListener=ERROR. This part of the code (see below) is not executed if the engine name is Geronimo. This would allows us to refer to tomcat servlet MBeans as geronimo:............................................ suggestions?Thanks Anita --- anita kulshreshtha <[EMAIL PROTECTED]> wrote:I am trying to set domain name for tomcat Mbeans to 'geronimo' instead of 'Geronimo'. This will make tomcat MBeans, have names like geronimo:............... However as it is apparent from this trace that tomcat does not like it. The server behaves normally except for this trace. The problem is the following code athttp://svn.apache.org/repos/asf/tomcat/container/tags/tc5.5.x/TOMCAT_5_5_15/catalina/src/share/org/apache/catalina/connector/MapperListener.javaThe TomcatWebAppContext did not have "findMappingObject" and "findStaticResources" methods exposed, So I added them. Now I am getting the attached stack trace during server startup. The console works fine. Does any one know what is going on here? Thanks Anita private void registerContext(ObjectName objectName) throws Exception { String name = objectName.getKeyProperty("name"); // If the domain is the same with ours or the engine // name attribute is the same... - then it's ours String targetDomain=objectName.getDomain(); if( ! domain.equals( targetDomain )) { try { targetDomain = (String) mBeanServer.getAttribute (objectName, "engineName"); } catch (Exception e) { // Ignore } if( ! domain.equals( targetDomain )) { // not ours return; } } String hostName = null; String contextName = null; if (name.startsWith("//")) { name = name.substring(2); } int slash = name.indexOf("/"); if (slash != -1) { hostName = name.substring(0, slash); contextName = name.substring(slash); } else { return; } // Special case for the root context if (contextName.equals("/")) { contextName = ""; } if(log.isDebugEnabled()) log.debug(sm.getString ("mapperListener.registerContext", contextName)); Object context = mBeanServer.invoke(objectName, "findMappingObject", null, null); <----------- //mBeanServer.getAttribute(objectName, "mappingObject"); javax.naming.Context resources = (javax.naming.Context) mBeanServer.invoke(objectName, "findStaticResources", null, null); <----------- //mBeanServer.getAttribute(objectName, "staticResources"); String[] welcomeFiles = (String[]) mBeanServer.getAttribute(objectName, "welcomeFiles"); <------- 3 ---------- mapper.addContext(hostName, contextName, context, welcomeFiles, resources); } --- anita kulshreshtha <[EMAIL PROTECTED]> wrote:This seems to be a known problem:http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/core/StandardContext.html#findMappingObject()public Context findMappingObject() FIXME: Fooling introspection ... I would like to put a workaround this problem. Any help will beappreciated. I have also changed the tomcat engine name from 'Geronimo' to 'geronimo'. Thanks Anita anita kulshreshtha <[EMAIL PROTECTED]> wrote: Could someone please help me understand this? I have made some (trivial) modifications to geronimo-tomcat classes to setJ2EEApplication and J2EEServer. During the startup of server I get this trace for each config containing a webapp. The server otherwise starts fine. The console and the apps are working fine.theshutdown is also clean. The output on jconsole (Mapper, WebModule Mbeans) also looksright! The relevant stack trace is attached. Thanks In Advance Anita P.S. Please let me know if full trace is needed. --------------------------------- Everyone is raving about the all-new Yahoo! Mail.____________________________________________________________________________________Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail. http://new.mail.yahoo.com____________________________________________________________________________________ Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com |
- Re: Setting domain for tomcat MBeans [was Re: Geronimo ... Jeff Genender
- Re: Setting domain for tomcat MBeans [was Re: Gero... anita kulshreshtha
- Re: Setting domain for tomcat MBeans [was Re: ... Jeff Genender
- Re: Setting domain for tomcat MBeans [was ... anita kulshreshtha
- Re: Setting domain for tomcat MBeans [was Re: Gero... Dain Sundstrom
- Re: Setting domain for tomcat MBeans [was Re: ... Jeff Genender
- Re: Setting domain for tomcat MBeans [was ... David Jencks
- Re: Setting domain for tomcat MBeans [... Dain Sundstrom
- Re: Setting domain for tomcat MBe... Matt Hogstrom
- Re: Setting domain for tomcat MBeans [... anita kulshreshtha
- Re: Setting domain for tomcat MBeans [was Re: ... anita kulshreshtha