forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Williams <william...@gmail.com>
Subject jxpath problems
Date Sun, 29 Jan 2006 20:52:44 GMT
On 1/29/06, Thorsten Scherler <thorsten@apache.org> wrote:
> El dom, 29-01-2006 a las 12:57 +0100, Thorsten Scherler escribió:
> > El dom, 29-01-2006 a las 18:23 +1100, David Crossley escribió:
> > > Tim Williams wrote:
> > > > I've followed the quickstart[1] with the Photogallery plugin and get
> > > > either OutOfMemory exceptions or (if I get silly with a memory
> > > > increase) get a StackOverflowError exception.  I can use the
> > > > Dispacther successfully on a simple seed site though.  I'm not asking
> > > > for anyone to expend resources fully troubleshooting this but if
> > > > someone could confirm/deny the errors I'd appreciate it.
> > >
> > > I get the same error trying to Dispatcher-enable the
> > > PhotoGallery plugin's own website.
> > >
> > > I do have a site that actually uses the plugin.
> > > When i try to Dispatcher-enable that site, it fails on
> > > the Gallery parts with "No pipeline matched request: gallery/practice/index_1.xml"
> > >
> >
> > Actually that becomes a faq for v2. ;-)
> > http://marc.theaimsgroup.com/?l=forrest-dev&m=113775018214915&w=2
> >
> > and
> >
> > http://issues.apache.org/jira/browse/FOR-738
> >
> > First I thought that maybe as well FOR-725 but does not seems like it
> > (it worked for me after the following).
> >
> > When I commend
> > <!--<forrestPlugins label="Plugins Index" href="site:forrest/plugins"
> > description="Index of Forrest Plugins"/>-->
> >
> > Then it is working fine. I tried with the new plugins but the site: is
> > still broken there. Meaning the jx:stuff is again broken and we need to
> > fix Davids workaround. :(
> >
> > Help greatly appreciated.
> >
>
> Actually I played a bit with it but I guess it needs a real good debug.
>
> One observation I made is that:
> <forrestPlugins label="Plugins Index" href="site:forrest/plugins"
> description="Index of Forrest Plugins"/>
>
> should actually be
> <forrestPlugins label="Plugins Index" href="ext:forrest/plugins"
> description="Index of Forrest Plugins"/>
>
> because the referenced link is in the
> <external-refs>
>  <forrest href="http://forrest.apache.org/">
>   <plugins href="docs/plugins"/>
>  </forrest>
> </external-refs>
>
> but still I get an java.lang.OutOfMemoryError :(
>
> I removed all indirections and still java.lang.OutOfMemoryError.
>
> IMO this bug is related again to jx and the linkrewritter.
>
> salu2
> --
> thorsten
>
> "Together we stand, divided we fall!"
> Hey you (Pink Floyd)

Thanks for looking into this.  I've now had a look at the stack trace
for these errors and a significant portion relate to dispose() method
in TransformerAdapter.  It appears to have a bug in it by setting the
parserContext to null, then attempting to access it.  I wouldn't
imagine that this is our real problem but it certainly is a huge
portion of my core.log.  Unfortunately, Cocoon has recently made the
the build process too difficult for me to manage.  I've spent the last
hour just trying to build an out of the box Cocoon with m2 and it
tries to download half the internet before finally failing.  Anyway,
if you can get Cocoon compiled maybe you can try  applying the
following patch to the template block and see if it reduces the errors
a bit.

Index: trunk/java/org/apache/cocoon/template/TransformerAdapter.java
===================================================================
--- trunk/java/org/apache/cocoon/template/TransformerAdapter.java	(revision
366548)
+++ trunk/java/org/apache/cocoon/template/TransformerAdapter.java	(working copy)
@@ -61,9 +61,9 @@
         }

         public void dispose() {
-            setParsingContext( null );
             this.manager.release(this.parsingContext.getInstructionFactory());
             this.manager.release(this.parsingContext.getStringTemplateParser());
+            setParsingContext( null );
         }

         public void endDocument() throws SAXException {

I assume you've seen the comment?
/**
 * Adapter that makes this generator usable as a transformer (Note there is a
 * performance penalty for this however: you effectively recompile the template
 * for every instance document)
 *
 * @version SVN $Id: TransformerAdapter.java 325973 2005-10-17
19:59:39Z lgawron $
 */

I'll give a cocoon a little more time before I just give up.
--tim

Mime
View raw message