NoClassDefFoundError and I have all the right jar files

Angela Day <[email protected]> Thu, 22 Apr 2010 13:39:29 -0700 (PDT)
Newsgroups gmane.comp.web.maverick.general
Message-ID <[email protected]>
--===============0668904073481487617==
Content-Type: multipart/alternative; boundary="0-960989817-1271968769=:72756"

--0-960989817-1271968769=:72756
Content-Type: text/plain; charset=us-ascii

It looks like it is failing on a call to a jdom Document or Element but I have jdom in the lib directory with maverick and everything else.  Element and Document are definitely classes in the jar file.  I am really stuck.  It is failing on line 140.  I would really appreciate some more ideas.  What am I missing?
Thanks,
Angela

/*     */ package org.infohazard.maverick.flow;
/*     */ 
/*     */ import java.util.HashMap;
/*     */ import java.util.Iterator;
/*     */ import java.util.List;
/*     */ import java.util.Map;
/*     */ import javax.servlet.ServletConfig;
/*     */ import org.apache.commons.logging.Log;
/*     */ import org.apache.commons.logging.LogFactory;
/*     */ import org.infohazard.maverick.transform.DocumentTransformFactory;
/*     */ import org.infohazard.maverick.transform.XSLTransformFactory;
/*     */ import org.infohazard.maverick.util.XML;
/*     */ import org.infohazard.maverick.view.DocumentViewFactory;
/*     */ import org.infohazard.maverick.view.NullViewFactory;
/*     */ import org.infohazard.maverick.view.RedirectViewFactory;
/*     */ import org.infohazard.maverick.view.TrivialViewFactory;
/*     */ import org.jdom.Document;
/*     */ import org.jdom.Element;
/*     */ 
/*     */ public class Loader
/*     */ {
/*     */   protected static final String TAG_MODULES = "modules";
/*     */   protected static final String TAG_VIEWFACTORY = "view-factory";
/*     */   protected static final String TAG_CONTROLLERFACTORY = "controller-factory";
/*     */   protected static final String TAG_TRANSFORMFACTORY = "transform-factory";
/*     */   protected static final String TAG_SHUNTFACTORY = "shunt-factory";
/*     */   protected static final String ATTR_PROVIDER = "provider";
/*     */   protected static final String TAG_COMMANDS = "commands";
/*     */   protected static final String TAG_COMMAND = "command";
/*     */   protected static final String ATTR_COMMAND_NAME = "name";
/*     */   protected static final String TAG_VIEWS = "views";
/*     */   protected static final String PARAM_DEFAULT_VIEW_TYPE = "default-view-type";
/*     */   protected static final String PARAM_DEFAULT_TRANSFORM_TYPE = "default-transform-type";
/*  57 */   private static Log log = LogFactory.getLog(Loader.class);
/*     */ 
/*  60 */   protected Map commands = new HashMap();
/*     */   protected ServletConfig servletCfg;
/*     */   protected MasterFactory masterFact;
/*     */   protected ViewRegistry viewReg;
/*     */   protected CommandFactory commandFact;
/*     */ 
/*     */   public Loader(Document doc, ServletConfig dispatcherConfig)
/*     */     throws ConfigException
/*     */   {
/*  82 */     this.servletCfg = dispatcherConfig;
/*  83 */     this.masterFact = new MasterFactory(dispatcherConfig);
/*     */ 
/*  87 */     this.viewReg = new ViewRegistrySimple(this.masterFact);
/*  88 */     this.commandFact = new CommandFactory(this.viewReg);
/*     */ 
/*  90 */     setupCoreModules();
/*     */ 
/*  92 */     loadDocument(doc);
/*     */   }
/*     */ 
/*     */   public Map getCommands()
/*     */   {
/* 101 */     return this.commands;
/*     */   }
/*     */ 
/*     */   protected void setupCoreModules()
/*     */     throws ConfigException
/*     */   {
/* 111 */     TransformFactory docTrans = new DocumentTransformFactory();
/* 112 */     docTrans.init(null, this.servletCfg);
/* 113 */     this.masterFact.defineTransformFactory("document", docTrans);
/*     */ 
/* 115 */     TransformFactory xsltTrans = new XSLTransformFactory();
/* 116 */     xsltTrans.init(null, this.servletCfg);
/* 117 */     this.masterFact.defineTransformFactory("xslt", xsltTrans);
/*     */ 
/* 120 */     ViewFactory document = new DocumentViewFactory();
/* 121 */     document.init(null, this.servletCfg);
/* 122 */     this.masterFact.defineViewFactory("document", document);
/*     */ 
/* 124 */     ViewFactory redirect = new RedirectViewFactory();
/* 125 */     redirect.init(null, this.servletCfg);
/* 126 */     this.masterFact.defineViewFactory("redirect", redirect);
/*     */ 
/* 128 */     ViewFactory trivial = new TrivialViewFactory();
/* 129 */     trivial.init(null, this.servletCfg);
/* 130 */     this.masterFact.defineViewFactory("trivial", trivial);
/*     */ 
/* 132 */     ViewFactory nullViewFact = new NullViewFactory();
/* 133 */     nullViewFact.init(null, this.servletCfg);
/* 134 */     this.masterFact.defineViewFactory("null", nullViewFact);
/*     */   }
/*     */ 
/*     */   protected void loadDocument(Document doc)
/*     */     throws ConfigException
/*     */   {
/* 144 */     Element root = doc.getRootElement();
/*     */ 
/* 147 */     String defaultTransformType = XML.getValue(root, "default-transform-type");
/* 148 */     if (defaultTransformType != null) {
/* 149 */       this.masterFact.setDefaultTransformType(defaultTransformType);
/*     */     }
/*     */ 
/* 152 */     String defaultViewType = XML.getValue(root, "default-view-type");
/* 153 */     if (defaultViewType != null) {
/* 154 */       this.masterFact.setDefaultViewType(defaultViewType);
/*     */     }
/*     */ 
/* 158 */     Iterator allModulesIt = root.getChildren("modules").iterator();
/* 159 */     while (allModulesIt.hasNext())
/*     */     {
/* 161 */       Element modules = (Element)allModulesIt.next();
/* 162 */       loadModules(modules);
/*     */     }
/*     */ 
/* 166 */     Iterator allViewsIt = root.getChildren("views").iterator();
/* 167 */     while (allViewsIt.hasNext())
/*     */     {
/* 169 */       Element viewsNode = (Element)allViewsIt.next();
/* 170 */       this.viewReg.defineGlobalViews(viewsNode);
/*     */     }
/*     */ 
/* 174 */     Iterator allCommandsIt = root.getChildren("commands").iterator();
/* 175 */     while (allCommandsIt.hasNext())
/*     */     {
/* 177 */       Element commandsNode = (Element)allCommandsIt.next();
/*     */ 
/* 179 */       Iterator commandIt = commandsNode.getChildren("command").iterator();
/* 180 */       while (commandIt.hasNext())
/*     */       {
/* 182 */         Element commandNode = (Element)commandIt.next();
/*     */ 
/* 184 */         String commandName = commandNode.getAttributeValue("name");
/*     */ 
/* 186 */         log.info("Creating command:  " + commandName);
/*     */ 
/* 188 */         Command cmd = this.commandFact.createCommand(commandNode);
/*     */ 
/* 190 */         this.commands.put(commandName, cmd);
/*     */       }
/*     */     }
/*     */   }
/*     */ 
/*     */   protected void loadModules(Element modulesNode)
/*     */     throws ConfigException
/*     */   {
/* 202 */     ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
/* 203 */     if (classLoader == null)
/*     */     {
/* 205 */       classLoader = DefaultControllerFactory.class.getClassLoader();
/*     */     }
/*     */ 
/* 209 */     this.masterFact.defineTransformFactories(modulesNode.getChildren("transform-factory"));
/* 210 */     this.masterFact.defineViewFactories(modulesNode.getChildren("view-factory"));
/*     */ 
/* 212 */     Element shuntFactoryNode = modulesNode.getChild("shunt-factory");
/* 213 */     if (shuntFactoryNode != null)
/*     */     {
/* 215 */       String providerName = shuntFactoryNode.getAttributeValue("provider");
/*     */ 
/* 217 */       if (providerName == null) {
/* 218 */         throw new ConfigException("Not a valid shunt factory node:  " + XML.toString(shuntFactoryNode));
/*     */       }
/*     */ 
/*     */       ShuntFactory instance;
/*     */       try
/*     */       {
/* 225 */         Class providerClass = classLoader.loadClass(providerName);
/* 226 */         instance = (ShuntFactory)providerClass.newInstance();
/*     */       }
/*     */       catch (Exception ex)
/*     */       {
/* 230 */         throw new ConfigException("Unable to define shunt factory " + providerName, ex);
/*     */       }
/*     */ 
/* 234 */       log.info("Using shunt factory " + providerName);
/*     */ 
/* 236 */       instance.init(shuntFactoryNode, this.servletCfg);
/*     */ 
/* 239 */       this.viewReg = new ViewRegistryShunted(this.masterFact, instance);
/* 240 */       this.commandFact.setViewRegistry(this.viewReg);
/*     */     }
/* 242 */     Element controllerFactoryNode = modulesNode.getChild("controller-factory");
/* 243 */     if (controllerFactoryNode == null)
/*     */       return;
/* 245 */     String providerName = controllerFactoryNode.getAttributeValue("provider");
/*     */ 
/* 247 */     if (providerName == null) {
/* 248 */       throw new ConfigException("Not a valid controller factory node: " + XML.toString(controllerFactoryNode));
/*     */     }
/*     */ 
/*     */     ControllerFactory instance;
/*     */     try
/*     */     {
/* 255 */       Class providerClass = classLoader.loadClass(providerName);
/* 256 */       instance = (ControllerFactory)providerClass.newInstance();
/*     */     }
/*     */     catch (Exception ex)
/*     */     {
/* 260 */       throw new ConfigException("Unable to define controller factory " + providerName, ex);
/*     */     }
/*     */ 
/* 264 */     log.info("Using controller factory " + providerName);
/*     */ 
/* 267 */     instance.init(controllerFactoryNode, this.servletCfg);
/*     */ 
/* 269 */     this.commandFact.setControllerFactory(instance);
/*     */   }
/*     */ }

/* Location:           C:\workspace\contract\lib\maverick-2.2.4.jar
 * Qualified Name:     org.infohazard.maverick.flow.Loader
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.5.3
--0-960989817-1271968769=:72756
Content-Type: text/html; charset=us-ascii

<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:bookman old style,new york,times,serif;font-size:12pt">It looks like it is failing on a call to a jdom Document or Element but I have jdom in the lib directory with maverick and everything else.&nbsp; Element and Document are definitely classes in the jar file.&nbsp; I am really stuck.&nbsp; It is failing on line 140.&nbsp; I would really appreciate some more ideas.&nbsp; What am I missing?<br>Thanks,<br>Angela<br><br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ package org.infohazard.maverick.flow;<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ import java.util.HashMap;<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ import java.util.Iterator;<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ import java.util.L
 ist;<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ import java.util.Map;<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ import javax.servlet.ServletConfig;<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ import
 org.apache.commons.logging.Log;<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ import org.apache.commons.logging.LogFactory;<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ import org.infohazard.maverick.transform.DocumentTransformFactory;<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ import org.infohazard.maverick.transform.XSLTransformFactory;<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ import org.infohazard.maverick.util.XML;<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ import org.infohazard.maverick.view.DocumentViewFactory;<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ import org.infohazard.maverick.view.NullViewFactory;<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ import org.infohazard.maverick.view.RedirectViewFactory;<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ import org.infohazard.maverick.view.TrivialViewFactory;<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ import org.jdom.Document;<br>/*
 &nbsp;&nbsp;&nbsp;&nbsp; */ import org.jdom.Element;<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ public class
 Loader<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ {<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; protected static final String TAG_MODULES = "modules";<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; protected static final String TAG_VIEWFACTORY = "view-factory";<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; protected static final String TAG_CONTROLLERFACTORY = "controller-factory";<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; protected static final String TAG_TRANSFORMFACTORY = "transform-factory";<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; protected static final String TAG_SHUNTFACTORY = "shunt-factory";<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; protected static final String ATTR_PROVIDER = "provider";<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; protected static final String TAG_COMMANDS = "com
 mands";<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; protected static final String TAG_COMMAND = "command";<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; protected
 static final String ATTR_COMMAND_NAME = "name";<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; protected static final String TAG_VIEWS = "views";<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; protected static final String PARAM_DEFAULT_VIEW_TYPE = "default-view-type";<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; protected static final String PARAM_DEFAULT_TRANSFORM_TYPE = "default-transform-type";<br>/*&nbsp; 57 */&nbsp;&nbsp; private static Log log = LogFactory.getLog(Loader.class);<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/*&nbsp; 60 */&nbsp;&nbsp; protected Map commands = new HashMap();<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; protected ServletConfig servletCfg;<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; protected MasterFactory masterFact;<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; pr
 otected ViewRegistry viewReg;<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; protected CommandFactory commandFact;<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */
 <br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; public Loader(Document doc, ServletConfig dispatcherConfig)<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp; throws ConfigException<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; {<br>/*&nbsp; 82 */&nbsp;&nbsp;&nbsp;&nbsp; this.servletCfg = dispatcherConfig;<br>/*&nbsp; 83 */&nbsp;&nbsp;&nbsp;&nbsp; this.masterFact = new MasterFactory(dispatcherConfig);<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/*&nbsp; 87 */&nbsp;&nbsp;&nbsp;&nbsp; this.viewReg = new ViewRegistrySimple(this.masterFact);<br>/*&nbsp; 88 */&nbsp;&nbsp;&nbsp;&nbsp; this.commandFact = new CommandFactory(this.viewReg);<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/*&nbsp; 90 */&nbsp;&nbsp;&nbsp;&nbsp; setupCoreModules();<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/*&nbsp; 92 */&nbsp;&nbsp;&nbsp
 ;&nbsp; loadDocument(doc);<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; }<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; public Map
 getCommands()<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; {<br>/* 101 */&nbsp;&nbsp;&nbsp;&nbsp; return this.commands;<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; }<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; protected void setupCoreModules()<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp; throws ConfigException<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; {<br>/* 111 */&nbsp;&nbsp;&nbsp;&nbsp; TransformFactory docTrans = new DocumentTransformFactory();<br>/* 112 */&nbsp;&nbsp;&nbsp;&nbsp; docTrans.init(null, this.servletCfg);<br>/* 113 */&nbsp;&nbsp;&nbsp;&nbsp; this.masterFact.defineTransformFactory("document", docTrans);<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/* 115 */&nbsp;&nbsp;&nbsp;&nbsp; TransformFactory xsltTrans = new XSLTransformFacto
 ry();<br>/* 116 */&nbsp;&nbsp;&nbsp;&nbsp; xsltTrans.init(null, this.servletCfg);<br>/* 117 */&nbsp;&nbsp;&nbsp;&nbsp; this.masterFact.defineTransformFactory("xslt",
 xsltTrans);<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/* 120 */&nbsp;&nbsp;&nbsp;&nbsp; ViewFactory document = new DocumentViewFactory();<br>/* 121 */&nbsp;&nbsp;&nbsp;&nbsp; document.init(null, this.servletCfg);<br>/* 122 */&nbsp;&nbsp;&nbsp;&nbsp; this.masterFact.defineViewFactory("document", document);<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/* 124 */&nbsp;&nbsp;&nbsp;&nbsp; ViewFactory redirect = new RedirectViewFactory();<br>/* 125 */&nbsp;&nbsp;&nbsp;&nbsp; redirect.init(null, this.servletCfg);<br>/* 126 */&nbsp;&nbsp;&nbsp;&nbsp; this.masterFact.defineViewFactory("redirect", redirect);<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/* 128 */&nbsp;&nbsp;&nbsp;&nbsp; ViewFactory trivial = new TrivialViewFactory();<br>/* 129 */&nbsp;&nbsp;&nbsp;&nbsp; trivial.init(null, this.servletCfg);<br>/* 130 */&n
 bsp;&nbsp;&nbsp;&nbsp; this.masterFact.defineViewFactory("trivial", trivial);<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/* 132 */&nbsp;&nbsp;&nbsp;&nbsp; ViewFactory
 nullViewFact = new NullViewFactory();<br>/* 133 */&nbsp;&nbsp;&nbsp;&nbsp; nullViewFact.init(null, this.servletCfg);<br>/* 134 */&nbsp;&nbsp;&nbsp;&nbsp; this.masterFact.defineViewFactory("null", nullViewFact);<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; }<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; protected void loadDocument(Document doc)<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp; throws ConfigException<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; {<br>/* 144 */&nbsp;&nbsp;&nbsp;&nbsp; Element root = doc.getRootElement();<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/* 147 */&nbsp;&nbsp;&nbsp;&nbsp; String defaultTransformType = XML.getValue(root, "default-transform-type");<br>/* 148 */&nbsp;&nbsp;&nbsp;&nbsp; if (defaultTransformType != null) {
 <br>/* 149 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.masterFact.setDefaultTransformType(defaultTransformType);<br>/*&nbsp;&nbsp;&nbsp;&nbsp;
 */&nbsp;&nbsp;&nbsp;&nbsp; }<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/* 152 */&nbsp;&nbsp;&nbsp;&nbsp; String defaultViewType = XML.getValue(root, "default-view-type");<br>/* 153 */&nbsp;&nbsp;&nbsp;&nbsp; if (defaultViewType != null) {<br>/* 154 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.masterFact.setDefaultViewType(defaultViewType);<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp; }<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/* 158 */&nbsp;&nbsp;&nbsp;&nbsp; Iterator allModulesIt = root.getChildren("modules").iterator();<br>/* 159 */&nbsp;&nbsp;&nbsp;&nbsp; while (allModulesIt.hasNext())<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp; {<br>/* 161 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Element modules = (Element)allModulesIt.next();<br>/* 162 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
 sp; loadModules(modules);<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp; }<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/* 166 */&nbsp;&nbsp;&nbsp;&nbsp; Iterator
 allViewsIt = root.getChildren("views").iterator();<br>/* 167 */&nbsp;&nbsp;&nbsp;&nbsp; while (allViewsIt.hasNext())<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp; {<br>/* 169 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Element viewsNode = (Element)allViewsIt.next();<br>/* 170 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.viewReg.defineGlobalViews(viewsNode);<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp; }<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/* 174 */&nbsp;&nbsp;&nbsp;&nbsp; Iterator allCommandsIt = root.getChildren("commands").iterator();<br>/* 175 */&nbsp;&nbsp;&nbsp;&nbsp; while (allCommandsIt.hasNext())<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp; {<br>/* 177 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Element commandsNode = (Element)allCommandsIt.next();<br>/*&n
 bsp;&nbsp;&nbsp;&nbsp; */ <br>/* 179 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Iterator commandIt = commandsNode.getChildren("command").iterator();<br>/* 180
 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while (commandIt.hasNext())<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>/* 182 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Element commandNode = (Element)commandIt.next();<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/* 184 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String commandName = commandNode.getAttributeValue("name");<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/* 186 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; log.info("Creating command:&nbsp; " + commandName);<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/* 188 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Command cmd = this.commandFact.createCommand(commandNode);<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/* 190 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
 this.commands.put(commandName, cmd);<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp;
 }<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; }<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; protected void loadModules(Element modulesNode)<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp; throws ConfigException<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; {<br>/* 202 */&nbsp;&nbsp;&nbsp;&nbsp; ClassLoader classLoader = Thread.currentThread().getContextClassLoader();<br>/* 203 */&nbsp;&nbsp;&nbsp;&nbsp; if (classLoader == null)<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp; {<br>/* 205 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; classLoader = DefaultControllerFactory.class.getClassLoader();<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp; }<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/* 209 */&nbsp;&nbsp;&nbsp;&nbsp; this.masterFact.define
 TransformFactories(modulesNode.getChildren("transform-factory"));<br>/* 210 */&nbsp;&nbsp;&nbsp;&nbsp;
 this.masterFact.defineViewFactories(modulesNode.getChildren("view-factory"));<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/* 212 */&nbsp;&nbsp;&nbsp;&nbsp; Element shuntFactoryNode = modulesNode.getChild("shunt-factory");<br>/* 213 */&nbsp;&nbsp;&nbsp;&nbsp; if (shuntFactoryNode != null)<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp; {<br>/* 215 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String providerName = shuntFactoryNode.getAttributeValue("provider");<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/* 217 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (providerName == null) {<br>/* 218 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; throw new ConfigException("Not a valid shunt factory node:&nbsp; " + XML.toString(shuntFactoryNode));<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
 sp; }<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ShuntFactory instance;<br>/*&nbsp;&nbsp;&nbsp;&nbsp;
 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>/* 225 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Class providerClass = classLoader.loadClass(providerName);<br>/* 226 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; instance = (ShuntFactory)providerClass.newInstance();<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; catch (Exception ex)<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>/* 230 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; throw new ConfigException("Unable to define shunt factory " + providerName, ex);<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>/*
 &nbsp;&nbsp;&nbsp;&nbsp; */ <br>/* 234 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; log.info("Using shunt factory " + providerName);<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/*
 236 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; instance.init(shuntFactoryNode, this.servletCfg);<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/* 239 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.viewReg = new ViewRegistryShunted(this.masterFact, instance);<br>/* 240 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.commandFact.setViewRegistry(this.viewReg);<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp; }<br>/* 242 */&nbsp;&nbsp;&nbsp;&nbsp; Element controllerFactoryNode = modulesNode.getChild("controller-factory");<br>/* 243 */&nbsp;&nbsp;&nbsp;&nbsp; if (controllerFactoryNode == null)<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br>/* 245 */&nbsp;&nbsp;&nbsp;&nbsp; String providerName = controllerFactoryNode.getAttributeValue("provider");<br>/*&nbsp;&nbsp;&nbsp;&nb
 sp; */ <br>/* 247 */&nbsp;&nbsp;&nbsp;&nbsp; if (providerName == null) {<br>/* 248 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; throw new ConfigException("Not a valid
 controller factory node: " + XML.toString(controllerFactoryNode));<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp; }<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp; ControllerFactory instance;<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp; try<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp; {<br>/* 255 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Class providerClass = classLoader.loadClass(providerName);<br>/* 256 */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; instance = (ControllerFactory)providerClass.newInstance();<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp; }<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp; catch (Exception ex)<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp;&nbsp;&nbsp; {<br>/* 260 */&nbsp;&nbs
 p;&nbsp;&nbsp;&nbsp;&nbsp; throw new ConfigException("Unable to define controller factory " + providerName, ex);<br>/*&nbsp;&nbsp;&nbsp;&nbsp;
 */&nbsp;&nbsp;&nbsp;&nbsp; }<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/* 264 */&nbsp;&nbsp;&nbsp;&nbsp; log.info("Using controller factory " + providerName);<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/* 267 */&nbsp;&nbsp;&nbsp;&nbsp; instance.init(controllerFactoryNode, this.servletCfg);<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ <br>/* 269 */&nbsp;&nbsp;&nbsp;&nbsp; this.commandFact.setControllerFactory(instance);<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */&nbsp;&nbsp; }<br>/*&nbsp;&nbsp;&nbsp;&nbsp; */ }<br><br>/* Location:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C:\workspace\contract\lib\maverick-2.2.4.jar<br>&nbsp;* Qualified Name:&nbsp;&nbsp;&nbsp;&nbsp; org.infohazard.maverick.flow.Loader<br>&nbsp;* Java Class Version: 5 (49.0)<br>&nbsp;* JD-Core Version:&nbsp;&nbsp;&nbsp; 0.5.3<br><br><div s
 tyle="font-family: bookman old style,new york,times,serif; font-size: 12pt;"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div
 style="font-family: bookman old style,new york,times,serif; font-size: 12pt;">
</div></div></div>
</div></body></html>
--0-960989817-1271968769=:72756--


--===============0668904073481487617==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------

--===============0668904073481487617==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
%(real_name)s mailing list
%(real_name)s@%(host_name)s
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
Archives are available at http://www.mail-archive.com/mav-user%40lists.sourceforge.net/
--===============0668904073481487617==--