commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luke Shannon" <lshan...@hypermedia.com>
Subject Re: Digester Help
Date Tue, 09 Nov 2004 17:01:40 GMT
That got it. Thanks a lot Marco!

----- Original Message ----- 
From: "Marco Mistroni" <mmistroni@waersystems.com>
To: "'Jakarta Commons Users List'" <commons-user@jakarta.apache.org>
Sent: Tuesday, November 09, 2004 11:50 AM
Subject: RE: Digester Help


> Hello,
> You have to have commons-beanutils in your classpath, along with
> commons-digester, commons-collection, commons-logging &
> commons-logging-api
> 
> Regards
> marco
> 
> -----Original Message-----
> From: Luke Shannon [mailto:lshannon@hypermedia.com] 
> Sent: 09 November 2004 16:40
> To: commons-user@jakarta.apache.org
> Subject: Digester Help
> 
> 
> I new to Digester and am having a little trouble. I am trying to parse
> an XML document to create a Lucene document. I get the following error
> when I run my digest method:
> 
> Below the error is my code and the XML document I am trying to parse.
> What am I doing wrong?
> 
> Thanks,
> 
> Luke
> 
> INFO: Server startup in 8202 ms
> 
> Nov 9, 2004 11:26:42 AM org.apache.commons.digester.Digester endElement
> 
> SEVERE: End event threw error
> 
> java.lang.NoClassDefFoundError: org/apache/commons/beanutils/MethodUtils
> 
> at
> org.apache.commons.digester.CallMethodRule.end(CallMethodRule.java:585)
> 
> at org.apache.commons.digester.Rule.end(Rule.java:228)
> 
> at org.apache.commons.digester.Digester.endElement(Digester.java:1067)
> 
> at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
> Source)
> 
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unk
> nown Source)
> 
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis
> patcher.dispatch(Unknown Source)
> 
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno
> wn Source)
> 
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 
> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> 
> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> 
> at org.apache.commons.digester.Digester.parse(Digester.java:1556)
> 
> at model.XMLParser.digest(XMLParser.java:40)
> 
> at model.XMLDocument.Document(XMLDocument.java:68)
> 
> at servlets.Update.indexDocs(Update.java:124)
> 
> at servlets.Update.indexDocs(Update.java:108)
> 
> at servlets.Update.doGet(Update.java:81)
> 
> 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(Applica
> tionFilterChain.java:237)
> 
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> erChain.java:157)
> 
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> e.java:214)
> 
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
> ntext.java:104)
> 
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
> 20)
> 
> at
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon
> textValve.java:198)
> 
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
> e.java:152)
> 
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
> ntext.java:104)
> 
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
> 20)
> 
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> :137)
> 
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
> ntext.java:104)
> 
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> :118)
> 
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
> ntext.java:102)
> 
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
> 20)
> 
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
> java:109)
> 
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
> ntext.java:104)
> 
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
> 20)
> 
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> 
> at
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> 
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:79
> 9)
> 
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
> onnection(Http11Protocol.java:705)
> 
> at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:57
> 7)
> 
> at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
> .java:683)
> 
> at java.lang.Thread.run(Unknown Source)
> 
> 
> public class XMLParser {
>  
>  public Vector items;
>  private Digester digester;
>  private File parseMe;
>  
>  public XMLParser(File file) {
>   parseMe = file;
>   items = new Vector();
>  }
>  
>  public XMLParser digest() throws IOException, SAXException {
>   digester = new Digester();
>   digester.push(this);
>   digester.setValidating(false);
>   digester.addObjectCreate("DATA/VERSION/ITEM", Item.class);
>   digester.addCallMethod("DATA/VERSION/ITEM", "setItem", 0);
>   digester.addSetNext("DATA/VERSION/ITEM", "addItems");
>   return (XMLParser)digester.parse(parseMe);  
>  }
>  
>  public void addItems(Item i) {
>   items.add(i);
>  } 
> }
> 
> The XML document:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <DATA>
>    <DEF>
>       <TYPE>138</TYPE>
>       <TYPES/>
>    </DEF>
>    <VERSION>
>       <ITEM NAME="provider" TYPE="text">me</ITEM>
>       <ITEM NAME="progress_ref" TYPE="text">1098818760440</ITEM>
>       <ITEM NAME="name" TYPE="text">file1folder1</ITEM>
>       <ITEM NAME="desc" TYPE="text">rg</ITEM>
>       <ITEM NAME="select" TYPE="text">Please Select...</ITEM>
>       <ITEM NAME="poster" TYPE="text">test</ITEM>
>       <ITEM NAME="sort" TYPE="text">3</ITEM>
>       <ITEM DIR="apache_config_command.txt" HEIGHT="-1"
> NAME="kcfileupload" SIZE="942" STYPE="file" TYPE="upload"
> WIDTH="-1">apache_config_command.txt</ITEM>
>    </VERSION>
> </DATA>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message