Another observation I forgot: it appears to be very very important to clear out your cache (Tomcat/work) directory after switching jars and before restarting, otherwise you get null pointer exceptions. Probably obvious to a lot of people but it wasn't to me....
> -----Original Message----- > From: Stephen Ng [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 21, 2002 10:32 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Problems with Saxon (6.5.2) and resolver (Cocoon 2.0.2) > > > I've been struggling with getting Saxon 6.5.2 and Cocoon > 2.0.2 working together for a couple of days now.... > > Here's what I did and what I found: > > 1. I replaced xalan-2.3.1 with saxon.jar. > 2. I grabbed v1.9 of xsp.xsl > (http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/java/org/ap > ache/cocoo > n/components/language/markup/xsp/java/xsp.xsl) > > I started getting (intermittent) null pointer errors trying > to resolve static files. I had a sub-sitemap with: > > "context://dir/data.xml" > > Changing these to just > > "dir/data.xml" > > made a set of them go away. (Does this make any sense?) > > But I continue to get NPE's in the resolver code. They came from > > XSLTProcessorImpl::resolve() { > //... > > File parent = new File(base.substring(5)); > File parent2 = new File(parent.getParentFile(), href); > xslSource = resolver.resolve(parent2.toURL().toExternalForm()); > > } > > Turns out "resolver" was null. > > I looked in CVS, and the whole mechanism for getting a > resolver appears to have been rewritten. So, as a hack, I > just check for null in setSourceResolver. (I have *no idea* > what I'm doing here, folks). > > public void setSourceResolver(SourceResolver resolver) { > if (resolver!=null) > this.resolver = resolver; > } > > Now I have no more NPE's, but I still have a resolver problem > somewhere--one of my pipelines is failing because it can't > locate a stylesheet. Still have to figure that one out. > > But, now my app is running enough that I can time it. Well, > I'm getting it's between 10% to 25% faster, which is not > nearly as much as I'd hoped. (A quick test showed Saxon 7 to > be a tad slower, but it might just be noise.) (My app is > currently taking about 2.2 seconds to serve a page (1.7 Ghz > P4, 512MB Ram, WinXP), of which I figure no more than .5 sec > is due to database access, and the rest I think is Cocoon > time. I'm really gunning for sub-second response for a demo > next week.) > > Should I upgrade to CVS 2.0.3 and try again? (I know this is > a stupid question, but how close is it to being soup?) Or > keep plugging at 2.0.2? Or wait for 2.0.3 to ship? Best > thing would be XSLTC! > > Steve > > > > > --------------------------------------------------------------------- > Please check that your question has not already been answered > in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]