tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Smirnoff" <>
Subject Problem with WebApp Classloader using remote Jmx initialization of the Web module.
Date Sun, 29 Aug 2004 12:57:02 GMT
I'm trying to create the WebAppContext remotely with JMX (Tomcat 5.0.27, JDK
1.5)and doing something like this:

public void deployApplication(String context, String path) throws
CoreException {
  try {
   ObjectName webmodule =
   mbsc.createMBean("org.apache.commons.modeler.BaseModelMBean", webmodule,
     new Object[] {"org.apache.catalina.core.StandardContext"}, new String[]
   mbsc.setAttribute(webmodule, new Attribute("docBase", path));
   mbsc.setAttribute(webmodule, new Attribute("defaultWebXml", "web.xml"));
   mbsc.setAttribute(webmodule, new Attribute("engineName", DOMAIN));
   mbsc.setAttribute(webmodule, new Attribute("delegate", new
   mbsc.invoke(webmodule, "init", new Object[] {}, new String[] {});
   //mbsc.invoke(webmodule, "start", new Object[] {}, new String[] {});
  } catch (Throwable e){
   throw new CoreException(new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID,
IStatus.ERROR, "Cannot create the application context for "+context, e));

This code initialize, but does not starting the WebContext. When I force the
startup from JConsole it fails on NoClassDefFoundError. The class it fails
to find is in WEB-INF/lib directory.

I see that the classloader is initialized as well. But I'm not sure how to
assing it to Web App module.

Do I have to explicitly set loader atribute?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message