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 at 

    
http://svn.apache.org/repos/asf/tomcat/container/tags/tc5.5.x/TOMCAT_5_5_15/catalina/src/share/org/apache/catalina/connector/MapperListener.java
  
   The 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 be
      
appreciated. 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 set
      
J2EEApplication 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.
      
the
    
shutdown is also 
clean. The output on jconsole (Mapper, WebModule Mbeans) also looks
      
right! 
    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
  

Reply via email to