Summary: | admin app throwing struts exceptions | ||
---|---|---|---|
Product: | Tomcat 5 | Reporter: | Blake Binkley <blake> |
Component: | Webapps:Administration | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | major | ||
Priority: | P3 | ||
Version: | 5.0.28 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Attachments: | use the domain parameter instead of TomcatTreeBuilder.DEFAULT_DOMAIN |
Description
Blake Binkley
2004-09-21 12:07:55 UTC
This is a bit mysterious, as neither host.jsp nor the Edit/Add/SaveHostAction.java files have changed in more than six months. I'll have to dig a bit deeper it seems ;) You must have some weird configuration error, because it works for me. I'm unable to reproduce your issue. Here are the steps I took and other details: - Download jakarta-tomcat-5.0.28.zip from the Jakarta binaries download page, unzip to c:\ (I'm running Windows XP SP2, Sun JDK 1.4.2_04). - Edit conf/tomcat-users.xml to add an admin user, startup the server using statup.bat. - Go to the Administration link, login to the admin webapp, click around server, service, host (in fact I clicked on every link I could find, all worked). - I even add a brand new host, saved, committed changed, then deleted, no problem. Same with adding a service. I suggest you use the tomcat-user mailing list to ask for help if you do a clean installation and still get this issue. Created attachment 17533 [details]
use the domain parameter instead of TomcatTreeBuilder.DEFAULT_DOMAIN
this bug is caused by the following method in
org.apache.webapp.admin.Lists.java class
The method is :
public static String getAdminAppService (MBeanServer mbserver, String domain,
HttpServletRequest
request)
throws Exception {
String adminDomain = TomcatTreeBuilder.DEFAULT_DOMAIN;
// Get the admin app's service name
StringBuffer sb = new StringBuffer(adminDomain);
sb.append(":type=Service,*");
ObjectName search = new ObjectName(sb.toString());
// other parts
return service;
}
as you can see it always uses the TomcatTreeBuilder.DEFAULT_DOMAIN to find the
service. but this value is hard coded as "Catalina"
so if someone rename the Engine name(defuaul Catalina) in server.xml it causes
this error.
some we have to use the domain paramenter as follows
StringBuffer sb = new StringBuffer(domain);
Blake, does Amila's patch fix your issue? The relevant code is still intact in the 5.5 branch as of 5.5.16, so this is not just a 5.0 issue. This has been fixed in 5.5.x and will be included in 5.5.19 onwards. Thanks for the report and the patch. |