Help needed with Tomcat 5.5.7 admin app (MBeanServer is not available)

2005-04-11 Thread Fritz Schneider
Simon,

 

I had the same problem. Then I discovered that the admin app had to be
installed under ${Catalina.home}/server/webapps rather than just
${Catalina.home}/webapps. Once I moved the directory to where the Context
docBase said it was supposed to be, it started working.

 

Fritz

  _  

From: Simon Watson [EMAIL PROTECTED]
Subject: Help needed with Tomcat 5.5.7 admin app (MBeanServer is not
available)
Date: Sun, 06 Feb 2005 16:18:49 GMT

  _  

Hi there,
 
I've just installed Tomcat 5.5.7 (using the .exe installer on WinXP)
and, whilst the server and manager app work fine, I'm having problems
with the optional admin webapp.
 
I downloaded the admin zip file and extracted the files to the
appropriate locations. The admin app starts ok and I can log in, but
when I click on Environmental Entries (or try to add a datasource),
I get a 500 response with the message MBeanServer is not available
(stack trace from stdout log below).
 

 



Help needed with Tomcat 5.5.7 admin app (MBeanServer is not available)

2005-02-06 Thread Simon Watson
Hi there,

I've just installed Tomcat 5.5.7 (using the .exe installer on WinXP)
and, whilst the server and manager app work fine, I'm having problems
with the optional admin webapp.

I downloaded the admin zip file and extracted the files to the
appropriate locations. The admin app starts ok and I can log in, but
when I click on Environmental Entries (or try to add a datasource),
I get a 500 response with the message MBeanServer is not available
(stack trace from stdout log below).

My server.xml file includes:
  !-- Comment these entries out to disable JMX MBeans support used for the 
   administration web application --
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener /
  Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
/

Has anyone got any ideas? I'm new to Tomcat so I could be missing
something obvious but I've run out of ideas. Any help would be much
appreciated.

Cheers,

Simon.



SEVERE: Servlet.service() for servlet action threw exception
javax.servlet.jsp.JspException: MBeanServer is not available
at org.apache.webapp.admin.AttributeTag.doEndTag(AttributeTag.java:163)
at 
admin.resources.listEnvEntries_jsp._jspx_meth_controls_attribute_0(listEnvEntries_jsp.java:766)
at 
admin.resources.listEnvEntries_jsp._jspService(listEnvEntries_jsp.java:380)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:673)
at 
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:464)
at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:399)
at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at 
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1054)
at 
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1192)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:412)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:673)
at 
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:464)
at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:399)
at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at 
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1054)
at 
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1192)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:412)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.apache.webapp.admin.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:123)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at 
org.apache.catalina.core.StandardEngineValve.invoke

Admin app fails with MBeanServer is not available

2004-12-20 Thread Andy Cohen
I've searched the mailing list archives, and the net at large, but I haven't
seen anyone report this problem for Tomcat 5:

I downloaded and installed Tomcat 5.5.4, and version 5.5.4 of the Admin
webapp. The Admin webapp starts up fine, but when I click on the
Environment Entries button in the Admin webapp, I get the error message
which I've appended to this email. I've tried downloading various
incarnations of JMX jars, and putting them in various Tomcat folders, as
some archived messages recommended for this problem under Tomcat 4.x, but
to no avail.

Is this a real bug, or am I just doing something wrong?

Thanks for any help,

Andy Cohen
System Software Developer
[EMAIL PROTECTED]



HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it
from fulfilling this request.

exception

javax.servlet.ServletException: MBeanServer is not available

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:845)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:778)

admin.resources.listEnvEntries_jsp._jspService(listEnvEntries_jsp.java:437)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)

org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)

org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

javax.servlet.jsp.JspException: MBeanServer is not available
org.apache.webapp.admin.AttributeTag.doEndTag(AttributeTag.java:163)

admin.resources.listEnvEntries_jsp._jspx_meth_controls_attribute_0(listEnvEntries_jsp.java:766)

admin.resources.listEnvEntries_jsp._jspService(listEnvEntries_jsp.java:380)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)

org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)

org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Adding DataSources to a specific webapp context using MBeanServer - Success (using a custom tag)

2004-10-15 Thread Jérôme BATON

Hi all, 


I found a way to create some DataSources in a webapp context from a properties file, 
at tomcat startup.

I did it by creating a custom tag that I will add on the entrance page.

For information, doing it from a struts plugin also works if you create the 
DataSources in the _Global_ context (only).

If somebody achieve to do create DataSources in the webapp context from a struts 
plugin, plz share your magic.

Hope it helps


Regards


Jerome 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Adding DataSources to a specific webapp context using MBeanServer - half success

2004-10-12 Thread Jérôme BATON
Hi all,

Could anyone tell me the order of the initializations of the webapps contexts, the 
webapps, the servlets (those run at startup).

I succeeded in creating my DataSources in my webapp context by redeploying my classes 
with tomcat running, I just copied the newly compiled 
classes to the WEB-INF/classes directory, and tada! The datasources appeared in the 
admin webapp. 
It works but the problem is not solved as I did it by hand.

I'll explore the way of making it recompiled automatically by another webapp which 
name alphabetically follows my webapp's name and is therefore deployed after.
But I would prefer a less dirty way.


Thanks for your help


Jerome

-Message d'origine-
De : Jérôme BATON 
Envoyé : lundi 11 octobre 2004 19:55
À : [EMAIL PROTECTED]
Objet : Adding DataSources to a specific webapp context using MBeanServer


Hi all,

My goal is to dynamically add DataSources to the context of a specific webapp.


To do this, I wrote a struts plugin which reads a properties file. 


I've looked at the admin webapp for the JMX/MBeanServer code, I used the code in class 
SaveDataSourceAction.
And it works fine _only if_ I choose Global (ResourceUtils.GLOBAL_TYPE) as parameter 
and not when I use Context (ResourceUtils.CONTEXT_TYPE) in the following code 
fragment.

oname = new ObjectName( domain + ResourceUtils.RESOURCE_TYPE + 
ResourceUtils.GLOBAL_TYPE + ,class= + params[1] + 
,name= + params[0]);


I used the same parameters as those seen from the running admin webapp but I get a 
javax.management.InstanceNotFoundException.


javax.management.InstanceNotFoundException: MBeanServer cannot find MBean with 
ObjectName 
Catalina:type=NamingResources,resourcetype=Context,path=/struts-arch,host=localhost
at mx4j.server.MBeanServerImpl.findMBeanMetaData(MBeanServerImpl.java:528)
at mx4j.server.MBeanServerImpl.invoke(MBeanServerImpl.java:1351)
at 
igc.arch.action.plugin.DBPropertiesToContextPlugin.ajouteDataSource(DBPropertiesToContextPlugin.java:236)
at 
igc.arch.action.plugin.DBPropertiesToContextPlugin.init(DBPropertiesToContextPlugin.java:108)
at 
org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1158)





I run Tomcat 5.0. on an xp pro box


Thanks a lot 


Jerome 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Adding DataSources to a specific webapp context using MBeanServer

2004-10-11 Thread Jérôme BATON

Hi all,

My goal is to dynamically add DataSources to the context of a specific webapp.


To do this, I wrote a struts plugin which reads a properties file. 


I've looked at the admin webapp for the JMX/MBeanServer code, I used the code in class 
SaveDataSourceAction.
And it works fine _only if_ I choose Global (ResourceUtils.GLOBAL_TYPE) as parameter 
and not when I use Context (ResourceUtils.CONTEXT_TYPE) in the following code 
fragment.

oname = new ObjectName( domain + ResourceUtils.RESOURCE_TYPE + 
ResourceUtils.GLOBAL_TYPE + ,class= + params[1] + 
,name= + params[0]);


I used the same parameters as those seen from the running admin webapp but I get a 
javax.management.InstanceNotFoundException.


javax.management.InstanceNotFoundException: MBeanServer cannot find MBean 
with ObjectName 
Catalina:type=NamingResources,resourcetype=Context,path=/struts-arch,host=localhost
at mx4j.server.MBeanServerImpl.findMBeanMetaData(MBeanServerImpl.java:528)
at mx4j.server.MBeanServerImpl.invoke(MBeanServerImpl.java:1351)
at 
igc.arch.action.plugin.DBPropertiesToContextPlugin.ajouteDataSource(DBPropertiesToContextPlugin.java:236)
at 
igc.arch.action.plugin.DBPropertiesToContextPlugin.init(DBPropertiesToContextPlugin.java:108)
at 
org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1158)





I run Tomcat 5.0. on an xp pro box


Thanks a lot 


Jerome 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



MBeanServer in Tomcat 5.0.10

2003-11-24 Thread santoshsprabhu
Hi,


As mentioned in the changelogs of Tomcat version 5.0.10 MX4J 1.1.1 is being replaced 
by JMX 1.2 RI 
Please refer to page http://jakarta.apache.org/tomcat/tomcat-5.0-doc/changelog.html 
for details.
Has any one tried out to get the MBeans in this new implementation ?
I am trying to get the MBeanServer and access the MBeans exposed by Tomcat.
Any help in this direction will be deeply appreciated


Santosh



 
 Click onthe image to chat with me


Re: How to get reference of MBeanServer in Tomcat

2003-08-28 Thread Bill Barker
You need to have the JkCoyote connector running (even if you are using
Tomcat stand-alone), and in your $CATALINA_HOME/conf/jk2.properties file
add:
  mx.port=9000
Of course, change '9000' to whatever port you want the JMX consol to listen
to.

Note:  There is a bug in Tomcat that is doesn't shutdown the consol properly
if you use this option.  As a result, you will lose the ability to do a
clean shutdown.

s p [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi Purvis,

 Thanks for the reply.
 This code will give me the MBeanServers on the same
 JVM
 But in our case we want to get the MBeanServer of a
 remote Tomcat. The Tomat server may be running on any
 other machine. I would have the port number and the
 address of the machine where the Tomcat is running. So
 the problem is to get MBeanServer of this Tomcat.
 Do we have any APIs for doing this?

 Santosh

 --- Purvis Robert [EMAIL PROTECTED] wrote:
  I've done this just recently in fact! I was looking
  for a means of
  monitoring objects within our Tomcat and dicovered
  JMX. To get to Tomcats
  Mbean Server you use the following (I've got it in a
  GeneralJMX class in a
  static method for easy of reuse):
 
  public class GeneralJMX {
 
 /** Creates a new instance of GeneralJMX */
 public GeneralJMX() {
 }
 
 
 

/***
  *
  * Get the MBean server associated with Tomcat.
  *
  * @return the MBean server, or null if one canot
  be found.
  */
 
 public static MBeanServer getTomcatMBeanServer()
  {
MBeanServer server = null;
List myList =
  MBeanServerFactory.findMBeanServer(null);
if (myList.toArray().length  0)
   server = (MBeanServer)myList.toArray()[0];
 
return server;
 }
 
  }
 
  -Original Message-
  From: s p [mailto:[EMAIL PROTECTED]
  Sent: 27 August 2003 03:59
  To: [EMAIL PROTECTED]
  Subject: How to get reference of MBeanServer in
  Tomcat
 
 
  I am using JMX technology to get information of
  Tomcat
  server. I am unable to get the reference of the
  MBeanServer in Tomcat. Has any one worked on this
  before. I am able get the information for other
  application servers like weblogic and webshere. But
  I
  did not find suitable APIs for Tomcat. Any help in
  this direction will be appreciated.
 
  Regards,
  Santosh
 
  __
  Do you Yahoo!?
  Yahoo! SiteBuilder - Free, easy-to-use web site
  design software
  http://sitebuilder.yahoo.com
 
 
 -
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  This e-mail is confidential and privileged.  If you
  are not the intended
  recipient please accept our apologies;  please do
  not disclose, copy or
  distribute information in this e-mail or take any
  action in reliance on its
  contents:  to do so is strictly prohibited and may
  be unlawful.  Please
  inform us that this message has gone astray before
  deleting it.  Thank you
  for your co-operation.
 
 
 -
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
 


 __
 Do you Yahoo!?
 Yahoo! SiteBuilder - Free, easy-to-use web site design software
 http://sitebuilder.yahoo.com




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to get reference of MBeanServer in Tomcat

2003-08-28 Thread s p
I am trying to get the reference of Tomcat MBeanServer

I am using the folowing code :

---

RemoteMBeanServer server;

IIOPConnector con = new IIOPConnector();
String protocol = http;
String host = 192.168.0.15;
int port = 7080;
String path = ;

JMXAddress address = new JMXAddress(protocol, host,
port, path);

Hashtable props = new Hashtable();
props.put(Context.INITIAL_CONTEXT_FACTORY,
javax.naming.InitialContext);
props.put(Context.SECURITY_PRINCIPAL,   admin);
props.put(Context.SECURITY_CREDENTIALS, );
con.connect(address.getPath(), props);

server = con.getRemoteMBeanServer();
---
Classes RemoteMBeanServer and JMXAddress are from
mx4j.connector package. 
I dont now what value we should give for
Context.INITIAL_CONTEXT_FACTORY
And also JMXAddress constructor takes a String
parameter path. I dont know what exactly this means.
Has any one tried this out. Is this the proper way for
getting MBeanServer reference. If anybody has tried it
please get me a sample code for this. 

Santosh 

--- Bill Barker [EMAIL PROTECTED] wrote:
 You need to have the JkCoyote connector running
 (even if you are using 
 Tomcat stand-alone), and in your
 $CATALINA_HOME/conf/jk2.properties file
 add:
   mx.port=9000
 Of course, change '9000' to whatever port you want
 the JMX consol to listen
 to.
 
 Note:  There is a bug in Tomcat that is doesn't
 shutdown the consol properly
 if you use this option.  As a result, you will lose
 the ability to do a
 clean shutdown.
 
 s p [EMAIL PROTECTED] wrote in message

news:[EMAIL PROTECTED]
  Hi Purvis,
 
  Thanks for the reply.
  This code will give me the MBeanServers on the
 same
  JVM
  But in our case we want to get the MBeanServer of
 a
  remote Tomcat. The Tomat server may be running on
 any
  other machine. I would have the port number and
 the
  address of the machine where the Tomcat is
 running. So
  the problem is to get MBeanServer of this Tomcat.
  Do we have any APIs for doing this?
 
  Santosh
 
  --- Purvis Robert [EMAIL PROTECTED]
 wrote:
   I've done this just recently in fact! I was
 looking
   for a means of
   monitoring objects within our Tomcat and
 dicovered
   JMX. To get to Tomcats
   Mbean Server you use the following (I've got it
 in a
   GeneralJMX class in a
   static method for easy of reuse):
  
   public class GeneralJMX {
  
  /** Creates a new instance of GeneralJMX */
  public GeneralJMX() {
  }
  
  
  
 

/***
   *
   * Get the MBean server associated with
 Tomcat.
   *
   * @return the MBean server, or null if one
 canot
   be found.
   */
  
  public static MBeanServer
 getTomcatMBeanServer()
   {
 MBeanServer server = null;
 List myList =
   MBeanServerFactory.findMBeanServer(null);
 if (myList.toArray().length  0)
server =
 (MBeanServer)myList.toArray()[0];
  
 return server;
  }
  
   }
  
   -Original Message-
   From: s p [mailto:[EMAIL PROTECTED]
   Sent: 27 August 2003 03:59
   To: [EMAIL PROTECTED]
   Subject: How to get reference of MBeanServer in
   Tomcat
  
  
   I am using JMX technology to get information of
   Tomcat
   server. I am unable to get the reference of the
   MBeanServer in Tomcat. Has any one worked on
 this
   before. I am able get the information for other
   application servers like weblogic and webshere.
 But
   I
   did not find suitable APIs for Tomcat. Any help
 in
   this direction will be appreciated.
  
   Regards,
   Santosh
  
   __
   Do you Yahoo!?
   Yahoo! SiteBuilder - Free, easy-to-use web site
   design software
   http://sitebuilder.yahoo.com
  
  
 

-
   To unsubscribe, e-mail:
   [EMAIL PROTECTED]
   For additional commands, e-mail:
   [EMAIL PROTECTED]
   This e-mail is confidential and privileged.  If
 you
   are not the intended
   recipient please accept our apologies;  please
 do
   not disclose, copy or
   distribute information in this e-mail or take
 any
   action in reliance on its
   contents:  to do so is strictly prohibited and
 may
   be unlawful.  Please
   inform us that this message has gone astray
 before
   deleting it.  Thank you
   for your co-operation.
  
  
 

-
   To unsubscribe, e-mail:
   [EMAIL PROTECTED]
   For additional commands, e-mail:
   [EMAIL PROTECTED]
  
 
 
  __
  Do you Yahoo!?
  Yahoo! SiteBuilder - Free, easy-to-use web site
 design software
  http://sitebuilder.yahoo.com
 
 
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 


__
Do you Yahoo!?
Yahoo

How reference of MBeanServer

2003-08-27 Thread s p
I am using JMX technology to get information of Tomcat
server. I am unable to get the reference of the
MBeanServer in Tomcat. Has any one worked on this
before. I am able get the information for other
application servers like weblogic and webshere. But I
did not find suitable APIs for Tomcat. Any help in
this direction will be appreciated.

Regards,
Santosh

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to get reference of MBeanServer in Tomcat

2003-08-27 Thread s p
I am using JMX technology to get information of Tomcat
server. I am unable to get the reference of the
MBeanServer in Tomcat. Has any one worked on this
before. I am able get the information for other
application servers like weblogic and webshere. But I
did not find suitable APIs for Tomcat. Any help in
this direction will be appreciated.

Regards,
Santosh

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to get reference of MBeanServer in Tomcat

2003-08-27 Thread Kwok Peng Tuck
Have a look a  the source code for the Admin Webapp for tomcat. It uses 
JMX.

s p wrote:

I am using JMX technology to get information of Tomcat
server. I am unable to get the reference of the
MBeanServer in Tomcat. Has any one worked on this
before. I am able get the information for other
application servers like weblogic and webshere. But I
did not find suitable APIs for Tomcat. Any help in
this direction will be appreciated.
Regards,
Santosh
__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How to get reference of MBeanServer in Tomcat

2003-08-27 Thread Bill Barker
For (now somewhat outdated) security reasons, Tomcat ships the jmx jar in
server/lib so that it is only accessable to Tomcat internals (and trusted
webapps like 'admin').  It should be enough to move the jar to common/lib to
get access to the JMX server.  You may also have to move the
commons-modeler.jar to common/lib as well (don't know for sure, never tried
:)

s p [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I am using JMX technology to get information of Tomcat
 server. I am unable to get the reference of the
 MBeanServer in Tomcat. Has any one worked on this
 before. I am able get the information for other
 application servers like weblogic and webshere. But I
 did not find suitable APIs for Tomcat. Any help in
 this direction will be appreciated.

 Regards,
 Santosh

 __
 Do you Yahoo!?
 Yahoo! SiteBuilder - Free, easy-to-use web site design software
 http://sitebuilder.yahoo.com




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to get reference of MBeanServer in Tomcat

2003-08-27 Thread Purvis Robert
I've done this just recently in fact! I was looking for a means of
monitoring objects within our Tomcat and dicovered JMX. To get to Tomcats
Mbean Server you use the following (I've got it in a GeneralJMX class in a
static method for easy of reuse):

public class GeneralJMX {
   
   /** Creates a new instance of GeneralJMX */
   public GeneralJMX() {
   }
   
 
/***
*
* Get the MBean server associated with Tomcat.
*
* @return the MBean server, or null if one canot be found.
*/

   public static MBeanServer getTomcatMBeanServer() {
  MBeanServer server = null;
  List myList = MBeanServerFactory.findMBeanServer(null);
  if (myList.toArray().length  0)
 server = (MBeanServer)myList.toArray()[0];

  return server;
   }
   
}

-Original Message-
From: s p [mailto:[EMAIL PROTECTED] 
Sent: 27 August 2003 03:59
To: [EMAIL PROTECTED]
Subject: How to get reference of MBeanServer in Tomcat


I am using JMX technology to get information of Tomcat
server. I am unable to get the reference of the
MBeanServer in Tomcat. Has any one worked on this
before. I am able get the information for other
application servers like weblogic and webshere. But I
did not find suitable APIs for Tomcat. Any help in
this direction will be appreciated.

Regards,
Santosh

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This e-mail is confidential and privileged.  If you are not the intended
recipient please accept our apologies;  please do not disclose, copy or
distribute information in this e-mail or take any action in reliance on its
contents:  to do so is strictly prohibited and may be unlawful.  Please
inform us that this message has gone astray before deleting it.  Thank you
for your co-operation.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to get reference of MBeanServer in Tomcat

2003-08-27 Thread s p
Hi Purvis,

Thanks for the reply.
This code will give me the MBeanServers on the same
JVM
But in our case we want to get the MBeanServer of a
remote Tomcat. The Tomat server may be running on any
other machine. I would have the port number and the
address of the machine where the Tomcat is running. So
the problem is to get MBeanServer of this Tomcat. 
Do we have any APIs for doing this?

Santosh

--- Purvis Robert [EMAIL PROTECTED] wrote:
 I've done this just recently in fact! I was looking
 for a means of
 monitoring objects within our Tomcat and dicovered
 JMX. To get to Tomcats
 Mbean Server you use the following (I've got it in a
 GeneralJMX class in a
 static method for easy of reuse):
 
 public class GeneralJMX {

/** Creates a new instance of GeneralJMX */
public GeneralJMX() {
}

  

/***
 *
 * Get the MBean server associated with Tomcat.
 *
 * @return the MBean server, or null if one canot
 be found.
 */
 
public static MBeanServer getTomcatMBeanServer()
 {
   MBeanServer server = null;
   List myList =
 MBeanServerFactory.findMBeanServer(null);
   if (myList.toArray().length  0)
  server = (MBeanServer)myList.toArray()[0];
 
   return server;
}

 }
 
 -Original Message-
 From: s p [mailto:[EMAIL PROTECTED] 
 Sent: 27 August 2003 03:59
 To: [EMAIL PROTECTED]
 Subject: How to get reference of MBeanServer in
 Tomcat
 
 
 I am using JMX technology to get information of
 Tomcat
 server. I am unable to get the reference of the
 MBeanServer in Tomcat. Has any one worked on this
 before. I am able get the information for other
 application servers like weblogic and webshere. But
 I
 did not find suitable APIs for Tomcat. Any help in
 this direction will be appreciated.
 
 Regards,
 Santosh
 
 __
 Do you Yahoo!?
 Yahoo! SiteBuilder - Free, easy-to-use web site
 design software
 http://sitebuilder.yahoo.com
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 This e-mail is confidential and privileged.  If you
 are not the intended
 recipient please accept our apologies;  please do
 not disclose, copy or
 distribute information in this e-mail or take any
 action in reliance on its
 contents:  to do so is strictly prohibited and may
 be unlawful.  Please
 inform us that this message has gone astray before
 deleting it.  Thank you
 for your co-operation.
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to get reference of MBeanServer in Tomcat

2003-08-27 Thread Purvis Robert
I forgot to mention - you must also copy the mx4j-jmx.jar from server/lib to
common/lib so your web apps can use the Tomcat JMX classes.

Rob

-Original Message-
From: s p [mailto:[EMAIL PROTECTED] 
Sent: 27 August 2003 03:59
To: [EMAIL PROTECTED]
Subject: How to get reference of MBeanServer in Tomcat


I am using JMX technology to get information of Tomcat
server. I am unable to get the reference of the
MBeanServer in Tomcat. Has any one worked on this
before. I am able get the information for other
application servers like weblogic and webshere. But I
did not find suitable APIs for Tomcat. Any help in
this direction will be appreciated.

Regards,
Santosh

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This e-mail is confidential and privileged.  If you are not the intended
recipient please accept our apologies;  please do not disclose, copy or
distribute information in this e-mail or take any action in reliance on its
contents:  to do so is strictly prohibited and may be unlawful.  Please
inform us that this message has gone astray before deleting it.  Thank you
for your co-operation.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to get reference of MBeanServer in Tomcat

2003-08-27 Thread s p
I want to monitor Tomcat server using JMX from another
machine. I am not accessing the MBeanServer from an
webapplication deployed on the Tomcat. So I need have
mx4-jmx.jar in common/lib. 

Santosh

--- Purvis Robert [EMAIL PROTECTED] wrote:
 I forgot to mention - you must also copy the
 mx4j-jmx.jar from server/lib to
 common/lib so your web apps can use the Tomcat JMX
 classes.
 
 Rob
 
 -Original Message-
 From: s p [mailto:[EMAIL PROTECTED] 
 Sent: 27 August 2003 03:59
 To: [EMAIL PROTECTED]
 Subject: How to get reference of MBeanServer in
 Tomcat
 
 
 I am using JMX technology to get information of
 Tomcat
 server. I am unable to get the reference of the
 MBeanServer in Tomcat. Has any one worked on this
 before. I am able get the information for other
 application servers like weblogic and webshere. But
 I
 did not find suitable APIs for Tomcat. Any help in
 this direction will be appreciated.
 
 Regards,
 Santosh
 
 __
 Do you Yahoo!?
 Yahoo! SiteBuilder - Free, easy-to-use web site
 design software
 http://sitebuilder.yahoo.com
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 This e-mail is confidential and privileged.  If you
 are not the intended
 recipient please accept our apologies;  please do
 not disclose, copy or
 distribute information in this e-mail or take any
 action in reliance on its
 contents:  to do so is strictly prohibited and may
 be unlawful.  Please
 inform us that this message has gone astray before
 deleting it.  Thank you
 for your co-operation.
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



MBeanServer and mc4j

2003-06-10 Thread edgar . herrnstein
I am using tomcat 4.1.24 and want to connect mc4j to tomcats MBeans server.
Wich setting do I have to use to connect the console to the server???
(Connection Name, Initial Context Factory, JNDI Name, Server URL...)

greetinx, Edgar ;-)

-- 
+++ GMX - Mail, Messaging  more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: MBeanServer Fails - Admin Tool Won't Work

2003-06-10 Thread Michael Duffy

I don't see what it has to do with Windows.

It also has nothing to do with missing JMX jars.  The
mx4j-jmx.jar is in the TOMCAT_HOME/server/lib
directory along with its license file, as it should
be.  There doesn't appear to be anything wrong with
the installation exe.

But thanks for the thought, Bill.  Any other possible
explanations for this mystery? - MOD

--- Bill Barker [EMAIL PROTECTED] wrote:
 I'm not a Windows user myself, but it looks like you
 are missing the JMX
 jars.In your %CATALINA_HOME%\server\lib their should
 be either a
 'mx4j-jmx.jar' or a 'jmxri.jar'.  If missing, you
 can grab the first from
 http://mx4j.sourceforge.net, and the second from
 http://java.sun.com/products/JavaManagement/.
 
 Michael Duffy [EMAIL PROTECTED] wrote in message

news:[EMAIL PROTECTED]
  I've installed Tomcat 4.1.24 using the install
 .exe.
  I'm running Tomcat as a service on Windows 2000
 using
  JDK 1.4.1.
 
  The install was smooth, and Tomcat itself runs
 just
  fine. I can use the manager tool without problem,
 and
  my Web apps are running nicely.
 
  But I get this exception in stdout.log when I
 start
  the service:
 
  Bootstrap: Service started
  javax.servlet.UnavailableException: MBeanServer is
 not
  available
 
  The admin tool does not work.  I can bring it up
 and
  log in, but the UI doesn't show Tomcat Server.  If
 I
  click on Resources-Data Sources, I get an HTTP
 500 in
  the right frame.  From that point on, everything
 in
  the admin tool brings back an HTTP 500 response.
 
  I think the MBeanServer and the admin tool
 failures
  are related.  Does anyone have any advice for me
 on
  how to get the admin tool up and running?
 
 
 
  __
  Do you Yahoo!?
  Yahoo! Calendar - Free online calendar with sync
 to Outlook(TM).
  http://calendar.yahoo.com
 
 
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



MBeanServer Exception

2003-06-10 Thread Michael Duffy

I tried uninstalling Tomcat 4.1.24 and reinstalling
the LE version that is specific to JDK 1.4.1.  My
admin tool STILL isn't working.  

Here's the exception I get in stdout.log.  Anyone seen
anything like this?  Thanks - MOD


Bootstrap: Create Catalina server
Bootstrap: Starting service
ServerLifecycleListener: createMBeans: Throwable
javax.management.RuntimeOperationsException: Exception
occured in ModelMBeanOperationInfo setDescriptor
at
javax.management.modelmbean.ModelMBeanOperationInfo.setDescriptor(ModelMBeanOperationInfo.java:395)
at
org.apache.commons.modeler.OperationInfo.createOperationInfo(OperationInfo.java:270)
at
org.apache.commons.modeler.ManagedBean.createMBeanInfo(ManagedBean.java:455)
at
org.apache.commons.modeler.ManagedBean.createMBean(ManagedBean.java:387)
at
org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:704)
at
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:806)
at
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:372)
at
org.apache.catalina.mbeans.ServerLifecycleListener.lifecycleEvent(ServerLifecycleListener.java:226)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2183)
at
org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:273)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.catalina.startup.BootstrapService.start(BootstrapService.java:245)
at
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:307)
Caused by: java.lang.IllegalArgumentException: Invalid
descriptor passed in parameter
... 17 more
GlobalResourcesLifecycleListener: Exception creating
UserDatabase MBeans for UserDatabase
javax.management.MBeanException: Cannot instantiate
ModelMBean of class
org.apache.catalina.mbeans.MemoryUserDatabaseMBean
at
org.apache.commons.modeler.ManagedBean.createMBean(ManagedBean.java:393)
at
org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:788)
at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:261)
at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:223)
at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:181)
at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:149)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2183)
at
org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:273)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.catalina.startup.BootstrapService.start(BootstrapService.java:245)
at
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:307)
Caused by: java.lang.IllegalArgumentException: Not a
valid Java type name: java.lang.String[]
at
javax.management.MBeanInfo.mustBeValidJavaTypeName(MBeanInfo.java:470)
at
javax.management.MBeanAttributeInfo.init(MBeanAttributeInfo.java:105)
at
javax.management.modelmbean.ModelMBeanAttributeInfo.init(ModelMBeanAttributeInfo.java:231)
at
org.apache.commons.modeler.AttributeInfo.createAttributeInfo(AttributeInfo.java:236)
at
org.apache.commons.modeler.ManagedBean.createMBeanInfo(ManagedBean.java:427)
at
org.apache.commons.modeler.ManagedBean.createMBean(ManagedBean.java:387)
... 14 more
Starting service Tomcat-Standalone
Apache Tomcat/4.1.24-LE-jdk14
Bootstrap: Service started
javax.servlet.UnavailableException: MBeanServer is not
available
at
org.apache.webapp.admin.ApplicationServlet.initServer(ApplicationServlet.java:206)
at
org.apache.webapp.admin.ApplicationServlet.getServer(ApplicationServlet.java:138)
at
org.apache.webapp.admin.TomcatTreeBuilder.buildTree(TomcatTreeBuilder.java:129)
at
org.apache.webapp.admin.SetUpTreeAction.perform(SetUpTreeAction.java:165)
at
org.apache.struts.action.ActionServlet.processActionPerform

MBeanServer Fails - Admin Tool Won't Work

2003-06-09 Thread Michael Duffy
I've installed Tomcat 4.1.24 using the install .exe.
I'm running Tomcat as a service on Windows 2000 using
JDK 1.4.1. 

The install was smooth, and Tomcat itself runs just
fine. I can use the manager tool without problem, and
my Web apps are running nicely. 

But I get this exception in stdout.log when I start
the service: 

Bootstrap: Service started
javax.servlet.UnavailableException: MBeanServer is not
available

The admin tool does not work.  I can bring it up and
log in, but the UI doesn't show Tomcat Server.  If I
click on Resources-Data Sources, I get an HTTP 500 in
the right frame.  From that point on, everything in
the admin tool brings back an HTTP 500 response.

I think the MBeanServer and the admin tool failures
are related.  Does anyone have any advice for me on
how to get the admin tool up and running?



__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: MBeanServer Fails - Admin Tool Won't Work

2003-06-09 Thread Bill Barker
I'm not a Windows user myself, but it looks like you are missing the JMX
jars.In your %CATALINA_HOME%\server\lib their should be either a
'mx4j-jmx.jar' or a 'jmxri.jar'.  If missing, you can grab the first from
http://mx4j.sourceforge.net, and the second from
http://java.sun.com/products/JavaManagement/.

Michael Duffy [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I've installed Tomcat 4.1.24 using the install .exe.
 I'm running Tomcat as a service on Windows 2000 using
 JDK 1.4.1.

 The install was smooth, and Tomcat itself runs just
 fine. I can use the manager tool without problem, and
 my Web apps are running nicely.

 But I get this exception in stdout.log when I start
 the service:

 Bootstrap: Service started
 javax.servlet.UnavailableException: MBeanServer is not
 available

 The admin tool does not work.  I can bring it up and
 log in, but the UI doesn't show Tomcat Server.  If I
 click on Resources-Data Sources, I get an HTTP 500 in
 the right frame.  From that point on, everything in
 the admin tool brings back an HTTP 500 response.

 I think the MBeanServer and the admin tool failures
 are related.  Does anyone have any advice for me on
 how to get the admin tool up and running?



 __
 Do you Yahoo!?
 Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
 http://calendar.yahoo.com




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



StandardContextValve exception starting MBeanServer

2003-03-27 Thread Hans Wichman
Hi,
has anyone experienced this problem before (see detailed stacktrace below) 
and could tell me what on earth is happening ?
I know it is something in my server.xml because when I put back a backup 
without my application in it, tomcat starts normally, only I have trouble 
pinpointing the exact cause; is it an error in my server.xml or in the 
application I have defined in it?

Thanks a lot for any help on this.

I am running: tomcat 4.1.12, freebsd 4.7, java 1.2.2

Greetz,
Hans W
[INFO] Registry - -Creating MBeanServer
java.lang.IllegalAccessException: org/apache/catalina/core/StandardContextValve
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:241)
at 
org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java:253)
at 
org.apache.commons.digester.Digester.startElement(Digester.java:1237)
at 
org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:454)
at 
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:217)
at 
org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.java:594)
at 
org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:777)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:748)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.j
ava:1453)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)
at 
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:524)
at 
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at 
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1169)
at org.apache.commons.digester.Digester.parse(Digester.java:1495)
at org.apache.catalina.startup.Catalina.start(Catalina.java:449)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
[ERROR] Digester - -Begin event threw exception 
java.lang.IllegalAccessException: 
org/apache/catalina/core/StandardContextValve
Catalina.start: java.lang.IllegalAccessException: 
org/apache/catalina/core/StandardContextValve
java.lang.IllegalAccessException: org/apache/catalina/core/StandardContextValve
at 
org.apache.commons.digester.Digester.createSAXException(Digester.java:2312)
at 
org.apache.commons.digester.Digester.createSAXException(Digester.java:2332)
at 
org.apache.commons.digester.Digester.startElement(Digester.java:1240)
at 
org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:454)
at 
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:217)
at 
org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.java:594)
at 
org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:777)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:748)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.j
ava:1453)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)
at 
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:524)
at 
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at 
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1169)
at org.apache.commons.digester.Digester.parse(Digester.java:1495)
at org.apache.catalina.startup.Catalina.start(Catalina.java:449)Stan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Tomcat MBeanServer and Registry

2003-03-21 Thread dubstar 27
Hi,

I'm trying to get retrieve my JMX registry and MBeanServer in a Java 
servlet:

registry = (Registry) getServletContext().getAttribute 
(org.apache.catalina.Registry);

mBServer = 
(MBeanServer)getServletContext().getAttribute(org.apache.catalina.MBeanServer);

However, I get null for both registry and mBServer.

Is this how it's supose to be done? Are there steps before this that I 
should do in order for my code to work properly?

Regards,
Nicolas
_
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


MBeanServer

2003-01-23 Thread Felipe Schnack
  Anyone could explain me what's the purpose of the MBeanServer in
Tomcat 4.1.x? I'm just starting to study JMX and I'm very curious :-)

-- 

Felipe Schnack
Analista de Sistemas
[EMAIL PROTECTED]
Cel.: (51)91287530
Linux Counter #281893

Centro Universitário Ritter dos Reis
http://www.ritterdosreis.br
[EMAIL PROTECTED]
Fone/Fax.: (51)32303341


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: MBeanServer

2003-01-23 Thread Craig R. McClanahan


On 23 Jan 2003, Felipe Schnack wrote:

 Date: 23 Jan 2003 11:46:49 -0200
 From: Felipe Schnack [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: MBeanServer

   Anyone could explain me what's the purpose of the MBeanServer in
 Tomcat 4.1.x? I'm just starting to study JMX and I'm very curious :-)

In Tomcat 4.1, JMX MBeans are used by the administrative app to manage the
configuration of all Tomcat components.  The sources for all of this stuff
is in the org.apache.catalina.mbeans package, which also references the
commons-modeler package (utilities to help creating ModelMBeans).

In Tomcat 5, the use of JMX is going to be greatly extended -- it will be
built in to the component classes instead of being a bolt-on extra - and
we'll be able to provide things like performance metering statistics and
so on, through any client tool that speaks to the JMX server code.


 --

 Felipe Schnack

Craig



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




4.1.x MBeanServer is not available

2002-07-05 Thread Dom

Whenever I start tomcat 4.1.3 or 4.1.6 or 4.1.7 on NT and Linux, or trying
to launch admin, I get this error :

5 juil. 2002 20:11:50 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1.7-LE-jdk14
5 juil. 2002 20:12:20 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080
javax.servlet.UnavailableException: MBeanServer is not available
at
org.apache.webapp.admin.ApplicationServlet.initServer(ApplicationServlet.jav
a:206)
at
org.apache.webapp.admin.ApplicationServlet.getServer(ApplicationServlet.java
:138)
at
org.apache.webapp.admin.TomcatTreeBuilder.buildTree(TomcatTreeBuilder.java:1
28)
at org.apache.webapp.admin.SetUpTreeAction.perform(SetUpTreeAction.java:165)
at
org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.ja
va:1787)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
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(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:527)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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:2350)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:171
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.invok
eNext(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:405)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:380)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:533)
at java.lang.Thread.run(Thread.java:536)

And in the admin page :
HTTP Status 500 -




type Exception report

message

description The server encountered an internal error () that prevented it
from fulfilling this request.

exception

org.apache.jasper.JasperException: Cannot find message resources under key
org.apache.struts.action.MESSAGE
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
46)
...

But I don't get these problems with win2000
Dom





--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]