Geronimo jmx question

2006-10-30 Thread anita kulshreshtha
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 serverotherwise 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 AdvanceAnitaP.S. Please let me know if full trace is needed.  

Cheap Talk? Check out Yahoo! Messenger's low  PC-to-Phone call rates.
11:01:04,761 WARN  [MapperListener] Error registering Context 
geronimo:J2EEApplication=null,J2EEServer=geronimo,j2eeType=WebModule,name=org.apache.geronimo.configs/welcome-tomcat/1.2-SNAPSHOT/car
javax.management.ReflectionException: null nested exception is 
java.lang.NoSuchMethodException: findMappingObject()
java.lang.NoSuchMethodException: findMappingObject()
at 
org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:170)
at 
mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanServerInterceptor.java:221)
at 
mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:120)
at 
mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityMBeanServerInterceptor.java:84)
at 
mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:120)
at 
mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:120)
at 
mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke(ContextClassLoaderMBeanServerInterceptor.java:203)
at mx4j.server.MX4JMBeanServer.invoke(MX4JMBeanServer.java:1043)
at 
org.apache.catalina.connector.MapperListener.registerContext(MapperListener.java:377)
at 
org.apache.catalina.connector.MapperListener.handleNotification(MapperListener.java:215)
at 
mx4j.server.interceptor.NotificationListenerMBeanServerInterceptor$ListenerWrapper.handleNotification(NotificationListenerMBeanServerInterceptor.java:134)
at 
javax.management.NotificationBroadcasterSupport.handleNotification(NotificationBroadcasterSupport.java:347)
at 
javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:320)
at 
javax.management.MBeanServerDelegate.sendNotification(MBeanServerDelegate.java:67)
at mx4j.server.MX4JMBeanServer.notify(MX4JMBeanServer.java:881)
at mx4j.server.MX4JMBeanServer.register(MX4JMBeanServer.java:869)
at 
mx4j.server.MX4JMBeanServer.registerImpl(MX4JMBeanServer.java:830)
at 
mx4j.server.MX4JMBeanServer.registerMBeanImpl(MX4JMBeanServer.java:769)
at 
mx4j.server.MX4JMBeanServer.registerMBean(MX4JMBeanServer.java:753)
at 
org.apache.geronimo.system.jmx.MBeanServerKernelBridge.register(MBeanServerKernelBridge.java:107)
at 
org.apache.geronimo.system.jmx.MBeanServerKernelBridge.access$100(MBeanServerKernelBridge.java:46)
at 
org.apache.geronimo.system.jmx.MBeanServerKernelBridge$GBeanRegistrationListener.loaded(MBeanServerKernelBridge.java:144)
at 
org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.fireLoadedEvent(BasicLifecycleMonitor.java:149)
at 
org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.access$100(BasicLifecycleMonitor.java:41)
at 
org.apache.geronimo.kernel.basic.BasicLifecycleMonitor$RawLifecycleBroadcaster.fireLoadedEvent(BasicLifecycleMonitor.java:243)
at 
org.apache.geronimo.kernel.basic.BasicKernel.loadGBean(BasicKernel.java:356)
at 
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:362)
at 
org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187)

 

Re: Geronimo jmx question

2006-10-30 Thread anita kulshreshtha
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'. ThanksAnitaanita 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 serverotherwise 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 AdvanceAnitaP.S. Please let me know if full trace is needed. 
	



Everyone is raving about the  all-new Yahoo! Mail.


Setting domain for tomcat MBeans [was Re: Geronimo jmx question]

2006-11-07 Thread anita kulshreshtha
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

err.log
Description: 2001658238-err.log


Re: Setting domain for tomcat MBeans [was Re: Geronimo jmx question]

2006-11-09 Thread anita kulshreshtha
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


Re: Setting domain for tomcat MBeans [was Re: Geronimo jmx question]

2006-11-09 Thread Jeff Genender




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

  
  


 
__

Re: Setting domain for tomcat MBeans [was Re: Geronimo jmx question]

2006-11-09 Thread Dain Sundstrom
Please don't put them in the same domain as the rest of the geronimo  
mbeans.  This will cause many TCK tests to fail and may result in  
name collisions.


-dain

On Nov 7, 2006, at 12:28 PM, anita kulshreshtha 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





Re: Setting domain for tomcat MBeans [was Re: Geronimo jmx question]

2006-11-09 Thread Jeff Genender


Dain Sundstrom wrote:
> Please don't put them in the same domain as the rest of the geronimo
> mbeans.  This will cause many TCK tests to fail and may result in name
> collisions.

I agree with Dain as well.

> 
> -dain
> 
> On Nov 7, 2006, at 12:28 PM, anita kulshreshtha 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
>> 


Re: Setting domain for tomcat MBeans [was Re: Geronimo jmx question]

2006-11-09 Thread David Jencks


On Nov 9, 2006, at 11:22 AM, Jeff Genender wrote:




Dain Sundstrom wrote:

Please don't put them in the same domain as the rest of the geronimo
mbeans.  This will cause many TCK tests to fail and may result in  
name

collisions.


I agree with Dain as well.


I kinda think it would theoretically be better to get everything in  
the same domain, but not necessarily for 1.2.  Can we find out  
exactly what problems this causes before we reject it out of hand?


thanks
david jencks





-dain

On Nov 7, 2006, at 12:28 PM, anita kulshreshtha 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





Re: Setting domain for tomcat MBeans [was Re: Geronimo jmx question]

2006-11-09 Thread anita kulshreshtha
   That is exactly how I am setting it. The attached stack traced is
produced by changing 1 character in the EngineGBean!

Thanks
Anita

--- Jeff Genender <[EMAIL PROTECTED]> wrote:

> 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 thi

Re: Setting domain for tomcat MBeans [was Re: Geronimo jmx question]

2006-11-09 Thread Jeff Genender
Can you please attach the stack trace?  I didn't see it attached.

Jeff

anita kulshreshtha wrote:
>That is exactly how I am setting it. The attached stack traced is
> produced by changing 1 character in the EngineGBean!
> 
> Thanks
> Anita
> 
> --- Jeff Genender <[EMAIL PROTECTED]> wrote:
> 
>> 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 c

Re: Setting domain for tomcat MBeans [was Re: Geronimo jmx question]

2006-11-09 Thread Dain Sundstrom

On Nov 9, 2006, at 11:44 AM, David Jencks wrote:


On Nov 9, 2006, at 11:22 AM, Jeff Genender wrote:


Dain Sundstrom wrote:

Please don't put them in the same domain as the rest of the geronimo
mbeans.  This will cause many TCK tests to fail and may result in  
name

collisions.


I agree with Dain as well.


I kinda think it would theoretically be better to get everything in  
the same domain, but not necessarily for 1.2.  Can we find out  
exactly what problems this causes before we reject it out of hand?


I don't think it is worth the risk to attempt this for 1.2.

-dain


Re: Setting domain for tomcat MBeans [was Re: Geronimo jmx question]

2006-11-09 Thread anita kulshreshtha
   The trace was in the original mail. I was getting
noSuchMethodException for "findMappingObject" then for
"findStaticResources" and welcomeFiles. Please see:
http://www.nabble.com/Geronimo-jmx-question-p7074389.html
   I added these to TomcatWebAppContext. Now I am getting the attached
trace.

Thanks
Anita

--- Jeff Genender <[EMAIL PROTECTED]> wrote:

> Can you please attach the stack trace?  I didn't see it attached.
> 
> Jeff
> 
> anita kulshreshtha wrote:
> >That is exactly how I am setting it. The attached stack traced
> is
> > produced by changing 1 character in the EngineGBean!
> > 
> > Thanks
> > Anita
> > 
> > --- Jeff Genender <[EMAIL PROTECTED]> wrote:
> > 
> >> 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 {
&

Re: Setting domain for tomcat MBeans [was Re: Geronimo jmx question]

2006-11-09 Thread anita kulshreshtha
--- David Jencks <[EMAIL PROTECTED]> wrote:
>Can we find out  
>exactly what problems this causes before we reject it out of hand?
   I am more concerned about the fact that the GlobalRequestProcessors
are returning all zeros statistics for all the connectors. I was hoping
if enough people looked at it we might uncover why? It used to work
until 5.5.12. This is the reason why we do not have tomcat connector
statistics for the console.

Thanks
Anita

 



 

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 jmx question]

2006-11-10 Thread Matt Hogstrom


On Nov 9, 2006, at 3:37 PM, Dain Sundstrom wrote:


On Nov 9, 2006, at 11:44 AM, David Jencks wrote:


On Nov 9, 2006, at 11:22 AM, Jeff Genender wrote:


I don't think it is worth the risk to attempt this for 1.2.



I agree this should be deferred until after 1.2 is out.


-dain





Matt Hogstrom
[EMAIL PROTECTED]





Re: Setting domain for tomcat MBeans [was Re: Geronimo jmx question]

2006-11-10 Thread anita kulshreshtha

--- Dain Sundstrom <[EMAIL PROTECTED]> wrote:

> Please don't put them in the same domain as the rest of the geronimo 
> 
> mbeans.  This will cause many TCK tests to fail and may result in  
> name collisions.

 There are no name collisions because tomcat MBeans use type=... in
their names whereas Geronimo uses j2eeType= The only exception is
kernel. Here are some examples:

-|---|-
 MBeans  |  Geronimo |Tomcat
-|---|-
Host |   j2eeType=Host   | type=Host
Valve|   j2eeType=TomcatValve| type=Valve
Manager, Realm, Resources|   j2eeType=GBean 
|type=Manager...
Connector|   j2eeType=GBean  | type=Conenctor
WebModule| name=./car|
name=/host/context
Servlet  |   X   |
geronimo:

I do not know enough to comment about tck. I have been using
this  modification for more than 2 weeks, and have not come across any
issues so far.

Thanks
Anita


 

Cheap talk?
Check out Yahoo! Messenger's low PC-to-Phone call rates.
http://voice.yahoo.com