On Wed, 5 Sep 2001, Ted Husted wrote:

> Date: Wed, 05 Sep 2001 14:25:15 -0400
> From: Ted Husted <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: Re: RSSDigester / org.apache.commons.digester.rss
>
> Yes. Under Tomcat 4, I do need to keep crimson.jar out of the app's lib,
> and let it use its own.
>

Tomcat 4 does *not* expose an XML parser to the web app -- you'll need to
put the JAXP/1.1 jars into $CATALINA_HOME/lib if you don't have them under
WEB-INF/lib.

Craig


> But under either Resin or Tomcat, it finds the file, but returns a null
> channel.
>
> With the test program, a similar result was caused by a classloader
> conflict with crimson.jar
>
> No other errors or exceptions are logged. I just get back a null channel
> ;-(
>
>
> robert burrell donkin wrote:
> >
> > isn't there some sort of a problem with JAXP and tomcat?
> >
> > have you tried moving jaxp.jar and crimson.jar out of the web-application?
> >
> > - robert
> >
> > On Wednesday, September 5, 2001, at 06:29 PM, Ted Husted wrote:
> >
> > > Got it. The test.rss option exposed
> > >
> > > test.rss:
> > >      [echo] Running RSSDigester tests ...
> > >      [java] java.lang.NoClassDefFoundError: org/xml/sax/HandlerBase
> > >
> > > Since I finally traced back to a conflict between my jaxp1.1 home
> > > directory and the same files in the ant/dist/lib folder. I set my
> > > jaxp.home to use the ant copies, and now it's working.
> > >
> > > (Gotta love them classloaders ...)
> > >
> > > I put jaxp.jar and crimson.jar in my app's WEB-INF/lib, but it still
> > > returns null when it tries to parse the file.
> > >
> > >         response.setContentType("text/plain");
> > >         PrintWriter writer = response.getWriter();
> > >         try {
> > >           RSSDigester digester = new RSSDigester();
> > >           digester.setDebug(999);
> > >           Channel channel = (Channel)
> > >               digester.parse("/rss-example.xml");
> > >           if (channel!=null) channel.render(writer);
> > >           else writer.print("No data!");
> > >         }
> > >         catch (Throwable t) {
> > >             writer.print(t.toString());
> > >         }
> > >
> > > It does see the file, since if I use a non-existant name, it chokes.
> > >
> > > "Craig R. McClanahan" wrote:
> > >> Are you running "ant test.rss" or trying to execute the program directly?
> > >> The former sets up an appropriate class path, so make sure all your
> > >> properties are correctly configured.
> > >>
> > >>> -- Ted Husted, Husted dot Com, Fairport NY USA.
> > >>> -- Custom Software ~ Technical Services.
> > >>> -- Tel +1 716 737-3463
> > >>> -- http://www.husted.com/about/struts/
> > >>>
> > >>
> > >> Craig
> > >
>

Reply via email to