You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Torsten Stolpmann <To...@verit.de> on 2005/12/26 21:38:05 UTC

OutOfMemoryException with customized project sitemap. Was: linkmap customization

Hi,

while enabling a similar modification in the project sitemap I 
consistently run into OutOfMemory exceptions. I am using forrest 0.7 
with the war option.

As a crosscheck I copied an existing, unmodified forrest sitemap.xmap 
into the documentation folder which gives me exactly the same results.

When applying my intended changes to the forrest sitemap.xmap i am able 
to achieve what i want. Any attempt to incorporate those changes in the 
project sitemap fails with OutOfMemory Exceptions.

What am I doing wrong here? What parts of the original sitemap.xmap 
would I need to implement in the project sitemap?

My current assumptions are:
<map:match pattern="*.html">...
<map:match pattern="**/*.html">...
And (out of necessity, cocoon would else complain about the missing 
resource definition):
   <map:resources>
     <map:resource name="skinit">...

But again this gives me OutOfMemoryExceptions.

Helena: Did you succeed incorporating your changes in the project sitemap?

Regards,

	Torsten

Ross Gardler wrote:
>>> If one wishes to add a third linkmap (if one refers to site.xml and
>>> tabs.xml being first two)),
>>> would one need to modify the forrest 7 src in:
>>> apache-forrest-0.7/main/webapp
>>> to accept a third,
>>> then customize the xslt's? to handle the custom rules?
>>
>>
>>
>> forrest sitemap:
>>  <map:match pattern="*.html">
>>         <map:aggregate element="site">
>>           <map:part src="cocoon:/skinconf.xml"/>
>>           <map:part src="cocoon:/build-info"/>
>>           <map:part src="cocoon:/tab-{0}"/>
>>           <map:part src="cocoon:/menu-{0}"/>
>>           <map:part src="cocoon:/body-{0}"/>
>>         </map:aggregate>
>>
>>> ...
>>
>>
>>
>> Just change to:
> 
> 
> Don't change it in the Forrest source files. Use a project sitemap to 
> override that pattern.
> 
> Ross
> 


Re: OutOfMemoryException with customized project sitemap. Was: linkmap customization

Posted by David Crossley <cr...@apache.org>.
Torsten Stolpmann wrote:
> I crosschecked that by increasing maxmemory to 256Meg to no avail. This 
> seems not to be related to FOR-591 but is a plain recursion:
> 
> at 
> org.apache.cocoon.environment.wrapper.EnvironmentWrapper.getAttribute(EnvironmentWrapper.java:228)
> at 
> org.apache.cocoon.environment.wrapper.MutableEnvironmentFacade.getAttribute(MutableEnvironmentFacade.java:176)
> at 
> org.apache.cocoon.environment.wrapper.EnvironmentWrapper.getAttribute(EnvironmentWrapper.java:228)
> at 
> org.apache.cocoon.environment.wrapper.MutableEnvironmentFacade.getAttribute(MutableEnvironmentFacade.java:176)
> ...
> 
> which ends in an OutOfMemoryException.
> 
> The possibility is that cocoon is not handling the given situation 
> gracefully. Since the stacktrace occcupies 128 kb I currently refrain 
> from posting it here.

Use our jira issue tracker. Attach anything that you reckon
helps to demonstrate your issue.

We prefer that people do not put attachments into
the email archives.

http://forrest.apache.org/issues.html

-David

Re: OutOfMemoryException with customized project sitemap. Was: linkmap customization

Posted by Torsten Stolpmann <To...@verit.de>.
I crosschecked that by increasing maxmemory to 256Meg to no avail. This 
seems not to be related to FOR-591 but is a plain recursion:

at 
org.apache.cocoon.environment.wrapper.EnvironmentWrapper.getAttribute(EnvironmentWrapper.java:228)
at 
org.apache.cocoon.environment.wrapper.MutableEnvironmentFacade.getAttribute(MutableEnvironmentFacade.java:176)
at 
org.apache.cocoon.environment.wrapper.EnvironmentWrapper.getAttribute(EnvironmentWrapper.java:228)
at 
org.apache.cocoon.environment.wrapper.MutableEnvironmentFacade.getAttribute(MutableEnvironmentFacade.java:176)
...

which ends in an OutOfMemoryException.

The possibility is that cocoon is not handling the given situation 
gracefully. Since the stacktrace occcupies 128 kb I currently refrain 
from posting it here.

Citing from the docs:

"If a project has a sitemap.xmap file in it's documentation dir, that 
gets mounted automatically by Forrest and becomes part of the 
processing: it is a preprocessing step, and is the first one to handle 
the request."

I am suspecting that there is a subtle difference in the handling of a 
project sitemap vs. handling of the forrest sitemap. The exception above 
seems more like the symptom than the cause of the problem.

Any ideas?

Regards,

	Torsten


Ross Gardler wrote:
> Torsten Stolpmann wrote:
> 
>> while enabling a similar modification in the project sitemap I 
>> consistently run into OutOfMemory exceptions. I am using forrest 0.7 
>> with the war option.
> 
> 
> There is a memory leak in Cocoon that is affecting Forrest. The 
> workaround is to set the maxmemory of the JVM in forrest.properties to a 
> higher value.
> 
> If you want to track this issue then add yourself to the watchlist on 
> the issue at http://issues.apache.org/jira/browse/FOR-591 (it is 
> scheduled to be fixed for the next release).
> 
> Ross

Re: OutOfMemoryException with customized project sitemap. Was: linkmap customization

Posted by Ross Gardler <rg...@apache.org>.
Torsten Stolpmann wrote:
> while enabling a similar modification in the project sitemap I 
> consistently run into OutOfMemory exceptions. I am using forrest 0.7 
> with the war option.

There is a memory leak in Cocoon that is affecting Forrest. The 
workaround is to set the maxmemory of the JVM in forrest.properties to a 
higher value.

If you want to track this issue then add yourself to the watchlist on 
the issue at http://issues.apache.org/jira/browse/FOR-591 (it is 
scheduled to be fixed for the next release).

Ross

Re: OutOfMemoryException with customized project sitemap. Was: linkmap customization

Posted by Ross Gardler <rg...@apache.org>.
David Crossley wrote:
> Ross Gardler wrote:
> 
>>Tim Williams wrote:
>>
>>>I think you're going to run into problems overriding only the **.html
>>>and **/*.html pipes.  I played around a bit yesterday with this but
>>>didn't have time to come to any real solution.  I *think* what's
>>>happening is that it is recursively calling itself when it gets to the
>>>body-*.html, menu-*.html, etc matches since **.html is such a greedy
>>>match.  I confirmed there's no major problem with your sitemap by
>>>changing the extension to html2 and manually putting in an .html
>>>extension in the aggregation section.  
>>
>>Yes, that is a good point.
>>
>>The solution is therefore to use a regexp matcher in the project sitemap 
>>so that it does not match body-* and menu-* etc. This will allow you to 
>>use the sitemap extension mechanism without touching the core sitemap. I 
>>*strongly* advise against touching any of the core Forrest files as it 
>>will cause problems for you in upgrading Forrest in the future.
> 
> 
> So will copying a swag of stuff into a project sitemap.

Only the "skinit" resource and the two *.html matchers. Nothing else 
needs to be copied across. At least I don't think so ;-)

Ross

Re: OutOfMemoryException with customized project sitemap. Was: linkmap customization

Posted by David Crossley <cr...@apache.org>.
Ross Gardler wrote:
> Tim Williams wrote:
> >
> >I think you're going to run into problems overriding only the **.html
> >and **/*.html pipes.  I played around a bit yesterday with this but
> >didn't have time to come to any real solution.  I *think* what's
> >happening is that it is recursively calling itself when it gets to the
> >body-*.html, menu-*.html, etc matches since **.html is such a greedy
> >match.  I confirmed there's no major problem with your sitemap by
> >changing the extension to html2 and manually putting in an .html
> >extension in the aggregation section.  
> 
> Yes, that is a good point.
> 
> The solution is therefore to use a regexp matcher in the project sitemap 
> so that it does not match body-* and menu-* etc. This will allow you to 
> use the sitemap extension mechanism without touching the core sitemap. I 
> *strongly* advise against touching any of the core Forrest files as it 
> will cause problems for you in upgrading Forrest in the future.

So will copying a swag of stuff into a project sitemap.

-David

Fun with Regular expressions. Was: OutOfMemoryException with customized project sitemap

Posted by Torsten Stolpmann <To...@verit.de>.
>> There are examples of regexp matchers in the core sitemap. I'm pretty 
>> poor with regular expressions, if you don't know what to put in the 
>> pattern ask here, I'm sure there will be someone who can tell you how 
>> to match
>>
>> **.html but not (**/menu-*.html or **/body-*.html or **/tabs-*.html)
>>
>> (I think they are the only ones you need to avoid).
>>
> 
> So this would be something like ^(?!tab-|menu-|body-).*.html$ and 
> ^.*/(?!tab-|menu-|body-).*.html$ respectivly.
> 
> Unfortunatly jakarta-regexp (which is used inside cocoon) doesn't seem 
> to support the negative lookahead (?!...) and gives me a 
> 'RESyntaxException: Syntax error: Missing operand to closure'.
> 
> This already been reported on the regexp mailing list (See: 
> http://permalink.gmane.org/gmane.comp.jakarta.regexp.user/168).
> 
> Too bad - jakarta-oro supports perl5 regexps.
> 
> I'll go hunting for a supported regexp and will report in later.
> 

Since I promised an update:

A working regular expression (without negative lookahead) is the following:

^(([^t^m^b].*)|((t[^a].*)|(ta[^b].*)|(tab[^\-].*))|((m[^e].*)|(me[^n].*)|(men[^u].*)|(menu[^\-].*))|((b[^o].*)|(bo[^d].*)|(bod[^y].*)|(body[^\-].*)))\.html$

But then again jakarta-regexp leaves me standing in the cold with:

java.lang.StackOverflowError
at org.apache.regexp.RE.matchNodes(Unknown Source)
at org.apache.regexp.RE.matchNodes(Unknown Source)
...
at 
org.apache.cocoon.matching.AbstractRegexpMatcher.preparedMatch(AbstractRegexpMatcher.java:86)

Again jakarta-oro matches this without problems.

*sigh*

Torsten

Re: OutOfMemoryException with customized project sitemap. Was: linkmap customization

Posted by Torsten Stolpmann <To...@verit.de>.
> The solution is therefore to use a regexp matcher in the project sitemap 
> so that it does not match body-* and menu-* etc. This will allow you to 
> use the sitemap extension mechanism without touching the core sitemap. I 
> *strongly* advise against touching any of the core Forrest files as it 
> will cause problems for you in upgrading Forrest in the future.
> 
> There are examples of regexp matchers in the core sitemap. I'm pretty 
> poor with regular expressions, if you don't know what to put in the 
> pattern ask here, I'm sure there will be someone who can tell you how to 
> match
> 
> **.html but not (**/menu-*.html or **/body-*.html or **/tabs-*.html)
> 
> (I think they are the only ones you need to avoid).
>

So this would be something like ^(?!tab-|menu-|body-).*.html$ and 
^.*/(?!tab-|menu-|body-).*.html$ respectivly.

Unfortunatly jakarta-regexp (which is used inside cocoon) doesn't seem 
to support the negative lookahead (?!...) and gives me a 
'RESyntaxException: Syntax error: Missing operand to closure'.

This already been reported on the regexp mailing list (See: 
http://permalink.gmane.org/gmane.comp.jakarta.regexp.user/168).

Too bad - jakarta-oro supports perl5 regexps.

I'll go hunting for a supported regexp and will report in later.

A big thanks to all who were replying so far!

Torsten

Re: OutOfMemoryException with customized project sitemap. Was: linkmap customization

Posted by Ross Gardler <rg...@apache.org>.
Tim Williams wrote:
> On 12/29/05, Ross Gardler <rg...@apache.org> wrote:
> 
>>David Crossley wrote:
>>
>>>Torsten Stolpmann wrote:
>>>
>>>
>>>>David Crossley wrote:
>>>>
>>
>>...
>>
>>

...

>>>>For the <map:match pattern="*.html"> and
>>>>the <map:match pattern="**/*.html"> blocks the changes consist of an
>>>>additional <map:part src="cocoon:/news/news.xml"/> statement.
>>>
>>>
>>>For that sort of change, i recommend that you
>>>make your adjustments directly to the core sitemap.
>>
>>I disagree. Modifying the core sitemap will create problems upgrading to
>>future versions of Forrest as the changes will have to be merged, and
>>there are *lots* of changes in the next release. By doing it in a
>>project sitemap there should be no need to edit the extension.
>>
>>I think you will also need to copy the "skinit" resource into your
>>project sitemap to make this work, but try it without first (less
>>maintenance when upgrading).
>>
>>An alternative approach would be to use an internal plugin. However, in
>>this case since the Dispatcher will make doing this kind of thing much
>>easier the plugin is unlikely to be reused. Therefore I wouldn't bother
>>with the extra overhead.
>>
>>
>>>The project sitemap is not really intended to over-ride
>>>the core in this way. See comments by Tim earlier in this
>>>thread.
>>
>>There is no problem with the project sitemap overriding core. In fact it
>>is designed to do so. Just make sure the only matches in your sitemap
>>are for the pipelines you want to override. In this case the "**.html"
>>ones.
>>
>>Ross
> 
> 
> I think you're going to run into problems overriding only the **.html
> and **/*.html pipes.  I played around a bit yesterday with this but
> didn't have time to come to any real solution.  I *think* what's
> happening is that it is recursively calling itself when it gets to the
> body-*.html, menu-*.html, etc matches since **.html is such a greedy
> match.  I confirmed there's no major problem with your sitemap by
> changing the extension to html2 and manually putting in an .html
> extension in the aggregation section.  

Yes, that is a good point.

The solution is therefore to use a regexp matcher in the project sitemap 
so that it does not match body-* and menu-* etc. This will allow you to 
use the sitemap extension mechanism without touching the core sitemap. I 
*strongly* advise against touching any of the core Forrest files as it 
will cause problems for you in upgrading Forrest in the future.

There are examples of regexp matchers in the core sitemap. I'm pretty 
poor with regular expressions, if you don't know what to put in the 
pattern ask here, I'm sure there will be someone who can tell you how to 
match

**.html but not (**/menu-*.html or **/body-*.html or **/tabs-*.html)

(I think they are the only ones you need to avoid).

Ross

Re: OutOfMemoryException with customized project sitemap. Was: linkmap customization

Posted by Tim Williams <wi...@gmail.com>.
On 12/29/05, Ross Gardler <rg...@apache.org> wrote:
> David Crossley wrote:
> > Torsten Stolpmann wrote:
> >
> >>David Crossley wrote:
> >>
>
> ...
>
> >>>Or as Tim suggested, your copying of the core sitemap needs
> >>>some tweaks to point to resources in the parent sitemap.
> >>>
> >>
> >>Exactly this is what I like to find out. The naive approach of
> >>duplicating and modifying the content of the core sitemap (or relevant
> >>parts thereof) does not seem to hold. But even with the much improved
> >>documentation regarding sitemaps I'm pretty much clueless on how to
> >>proceed from here.
>
> http://forrest.apache.org/docs_0_70/your-project.html#sitemap.xmap
>
> If you can provide a patch that improves on the docs (via Jira) it will
> be most welcome.
>
> >>>Would you please explain what you are trying to achieve
> >>>with your "intended changes". Perhaps there is a better way.
> >>>
> >>
> >>Sure. Nothing fancy actually. We implemented a 'news'-box in our skin
> >>which displays below the menu the last n items from an RSS feed we will
> >>provide. So besides the usual tab, menu and body stuff we need another
> >>pipeline providing the rss content. Since this has to be present on
> >>every page the skinning process appears to be the right place.
> >>
> >>This is already implemented and works very well but only if the changes
> >>to the sitemap are present in the forrest core sitemap.
>
> Slightly off topic. We have a plugin in the whiteboard that processes
> RSS feeds. It doesn't include the results in the skin like yours does,
> unless you use the new Dispatcher features in 0.8-dev. However, I wonder
> if any of your work would be useful in that plugin? In particular I am
> thinking about the RSS to XDoc stylesheets.
>
> See
> http://forrest.apache.org/pluginDocs/plugins_0_70/org.apache.forrest.plugin.input.feeder/
>
> >>For the <map:match pattern="*.html"> and
> >> the <map:match pattern="**/*.html"> blocks the changes consist of an
> >>additional <map:part src="cocoon:/news/news.xml"/> statement.
> >
> >
> > For that sort of change, i recommend that you
> > make your adjustments directly to the core sitemap.
>
> I disagree. Modifying the core sitemap will create problems upgrading to
> future versions of Forrest as the changes will have to be merged, and
> there are *lots* of changes in the next release. By doing it in a
> project sitemap there should be no need to edit the extension.
>
> I think you will also need to copy the "skinit" resource into your
> project sitemap to make this work, but try it without first (less
> maintenance when upgrading).
>
> An alternative approach would be to use an internal plugin. However, in
> this case since the Dispatcher will make doing this kind of thing much
> easier the plugin is unlikely to be reused. Therefore I wouldn't bother
> with the extra overhead.
>
> > The project sitemap is not really intended to over-ride
> > the core in this way. See comments by Tim earlier in this
> > thread.
>
> There is no problem with the project sitemap overriding core. In fact it
> is designed to do so. Just make sure the only matches in your sitemap
> are for the pipelines you want to override. In this case the "**.html"
> ones.
>
> Ross

I think you're going to run into problems overriding only the **.html
and **/*.html pipes.  I played around a bit yesterday with this but
didn't have time to come to any real solution.  I *think* what's
happening is that it is recursively calling itself when it gets to the
body-*.html, menu-*.html, etc matches since **.html is such a greedy
match.  I confirmed there's no major problem with your sitemap by
changing the extension to html2 and manually putting in an .html
extension in the aggregation section.  I'm inclined to agree with
David that such a greedy match isn't good for the project sitemap.  To
help with upgrade issues you could always create a new sitemap in the
webapp folder and mount that one right before these two matches. 
Anyway, that's what I *think* is going on...

--tim

Re: OutOfMemoryException with customized project sitemap. Was: linkmap customization

Posted by Ross Gardler <rg...@apache.org>.
David Crossley wrote:
> Torsten Stolpmann wrote:
> 
>>David Crossley wrote:
>>

...

>>>Or as Tim suggested, your copying of the core sitemap needs
>>>some tweaks to point to resources in the parent sitemap.
>>>
>>
>>Exactly this is what I like to find out. The naive approach of 
>>duplicating and modifying the content of the core sitemap (or relevant 
>>parts thereof) does not seem to hold. But even with the much improved 
>>documentation regarding sitemaps I'm pretty much clueless on how to 
>>proceed from here.

http://forrest.apache.org/docs_0_70/your-project.html#sitemap.xmap

If you can provide a patch that improves on the docs (via Jira) it will 
be most welcome.

>>>Would you please explain what you are trying to achieve
>>>with your "intended changes". Perhaps there is a better way.
>>>
>>
>>Sure. Nothing fancy actually. We implemented a 'news'-box in our skin 
>>which displays below the menu the last n items from an RSS feed we will 
>>provide. So besides the usual tab, menu and body stuff we need another 
>>pipeline providing the rss content. Since this has to be present on 
>>every page the skinning process appears to be the right place.
>>
>>This is already implemented and works very well but only if the changes 
>>to the sitemap are present in the forrest core sitemap.

Slightly off topic. We have a plugin in the whiteboard that processes 
RSS feeds. It doesn't include the results in the skin like yours does, 
unless you use the new Dispatcher features in 0.8-dev. However, I wonder 
if any of your work would be useful in that plugin? In particular I am 
thinking about the RSS to XDoc stylesheets.

See 
http://forrest.apache.org/pluginDocs/plugins_0_70/org.apache.forrest.plugin.input.feeder/

>>For the <map:match pattern="*.html"> and
>> the <map:match pattern="**/*.html"> blocks the changes consist of an 
>>additional <map:part src="cocoon:/news/news.xml"/> statement.
> 
> 
> For that sort of change, i recommend that you
> make your adjustments directly to the core sitemap.

I disagree. Modifying the core sitemap will create problems upgrading to 
future versions of Forrest as the changes will have to be merged, and 
there are *lots* of changes in the next release. By doing it in a 
project sitemap there should be no need to edit the extension.

I think you will also need to copy the "skinit" resource into your 
project sitemap to make this work, but try it without first (less 
maintenance when upgrading).

An alternative approach would be to use an internal plugin. However, in 
this case since the Dispatcher will make doing this kind of thing much 
easier the plugin is unlikely to be reused. Therefore I wouldn't bother 
with the extra overhead.

> The project sitemap is not really intended to over-ride
> the core in this way. See comments by Tim earlier in this
> thread.

There is no problem with the project sitemap overriding core. In fact it 
is designed to do so. Just make sure the only matches in your sitemap 
are for the pipelines you want to override. In this case the "**.html" 
ones.

Ross

Re: OutOfMemoryException with customized project sitemap. Was: linkmap customization

Posted by David Crossley <cr...@apache.org>.
Torsten Stolpmann wrote:
> David Crossley wrote:
> >
> >It sounds to me like you have unnecessary matches in
> >your project sitemap that are interfering with Forrest core.
> >
> See my other post containing the sitemap. Sorry for the attachment.

No worries. I did see it. That is why i made the comment.

> >Or as Tim suggested, your copying of the core sitemap needs
> >some tweaks to point to resources in the parent sitemap.
> >
> Exactly this is what I like to find out. The naive approach of 
> duplicating and modifying the content of the core sitemap (or relevant 
> parts thereof) does not seem to hold. But even with the much improved 
> documentation regarding sitemaps I'm pretty much clueless on how to 
> proceed from here.
> 
> >Would you please explain what you are trying to achieve
> >with your "intended changes". Perhaps there is a better way.
> >
> Sure. Nothing fancy actually. We implemented a 'news'-box in our skin 
> which displays below the menu the last n items from an RSS feed we will 
> provide. So besides the usual tab, menu and body stuff we need another 
> pipeline providing the rss content. Since this has to be present on 
> every page the skinning process appears to be the right place.
> 
> This is already implemented and works very well but only if the changes 
> to the sitemap are present in the forrest core sitemap.
> 
> For the <map:match pattern="*.html"> and
>  the <map:match pattern="**/*.html"> blocks the changes consist of an 
> additional <map:part src="cocoon:/news/news.xml"/> statement.

For that sort of change, i recommend that you
make your adjustments directly to the core sitemap.

The project sitemap is not really intended to over-ride
the core in this way. See comments by Tim earlier in this
thread.

The new Dispatcher, still in development, will solve that
type of need: Add pieces of content from other pipelines.

-David


Re: OutOfMemoryException with customized project sitemap. Was: linkmap customization

Posted by Torsten Stolpmann <To...@verit.de>.
David Crossley wrote:
> 
> It sounds to me like you have unnecessary matches in
> your project sitemap that are interfering with Forrest core.
>
See my other post containing the sitemap. Sorry for the attachment.

> Or as Tim suggested, your copying of the core sitemap needs
> some tweaks to point to resources in the parent sitemap.
> 
Exactly this is what I like to find out. The naive approach of 
duplicating and modifying the content of the core sitemap (or relevant 
parts thereof) does not seem to hold. But even with the much improved 
documentation regarding sitemaps I'm pretty much clueless on how to 
proceed from here.

> Would you please explain what you are trying to achieve
> with your "intended changes". Perhaps there is a better way.
> 
Sure. Nothing fancy actually. We implemented a 'news'-box in our skin 
which displays below the menu the last n items from an RSS feed we will 
provide. So besides the usual tab, menu and body stuff we need another 
pipeline providing the rss content. Since this has to be present on 
every page the skinning process appears to be the right place.

This is already implemented and works very well but only if the changes 
to the sitemap are present in the forrest core sitemap.

For the <map:match pattern="*.html"> and
  the <map:match pattern="**/*.html"> blocks the changes consist of an 
additional <map:part src="cocoon:/news/news.xml"/> statement.

> -David

Thanks,

Torsten


Re: OutOfMemoryException with customized project sitemap. Was: linkmap customization

Posted by David Crossley <cr...@apache.org>.
Torsten Stolpmann wrote:
> Tim Williams wrote:
> >Torsten Stolpmann wrote:
> >
> >>while enabling a similar modification in the project sitemap I
> >>consistently run into OutOfMemory exceptions. I am using forrest 0.7
> >>with the war option.
> >>
> >>As a crosscheck I copied an existing, unmodified forrest sitemap.xmap
> >>into the documentation folder which gives me exactly the same results.
> >
> >I would imagine that would lead to some strange results.  Since this
> >is where project sitemaps are mounted, it's probably just continuously
> >mounting itself.
> >
> Sounds reasonable.

It sounds to me like you have unnecessary matches in
your project sitemap that are interfering with Forrest core.

Or as Tim suggested, your copying of the core sitemap needs
some tweaks to point to resources in the parent sitemap.

Would you please explain what you are trying to achieve
with your "intended changes". Perhaps there is a better way.

-David

Re: OutOfMemoryException with customized project sitemap. Was: linkmap customization

Posted by Torsten Stolpmann <To...@verit.de>.
Tim Williams wrote:
> On 12/26/05, Torsten Stolpmann <To...@verit.de> wrote:
> 
>>Hi,
>>
>>while enabling a similar modification in the project sitemap I
>>consistently run into OutOfMemory exceptions. I am using forrest 0.7
>>with the war option.
>>
>>As a crosscheck I copied an existing, unmodified forrest sitemap.xmap
>>into the documentation folder which gives me exactly the same results.
> 
> 
> I would imagine that would lead to some strange results.  Since this
> is where project sitemaps are mounted, it's probably just continuously
> mounting itself.
> 
Sounds reasonable.

> 
>>When applying my intended changes to the forrest sitemap.xmap i am able
>>to achieve what i want. Any attempt to incorporate those changes in the
>>project sitemap fails with OutOfMemory Exceptions.
>>
>>What am I doing wrong here? What parts of the original sitemap.xmap
>>would I need to implement in the project sitemap?
>>
>>My current assumptions are:
>><map:match pattern="*.html">...
>><map:match pattern="**/*.html">...
>>And (out of necessity, cocoon would else complain about the missing
>>resource definition):
>>   <map:resources>
>>     <map:resource name="skinit">...
> 
> 
> Have you tried using what Thorsten posted in the other thread and
> changing cocoon:/ to cocoon://  ?  By using cocoon:// it should go all
> the way back to the root sitemap looking for the match and not need
> copying into the project sitemap.
> 
I have to do some investigation to understand what you are suggesting 
here. I have tried exchanging cocoon:/ with cocoon:// but that gives me 
the same exception. Probably you meant something different here?

> I wonder if you can send your attempt at the project sitemap and let
> someone have a look?

Sure, you find it attached. It just contains the parts taken from the 
forrest sitemap.xmap I needed to modify (which i haven't done here to 
keep things simple). So this is the minimum broken example I could 
provide at the moment.

> 
> --tim

Thanks,

Torsten


Re: OutOfMemoryException with customized project sitemap. Was: linkmap customization

Posted by Tim Williams <wi...@gmail.com>.
On 12/26/05, Torsten Stolpmann <To...@verit.de> wrote:
> Hi,
>
> while enabling a similar modification in the project sitemap I
> consistently run into OutOfMemory exceptions. I am using forrest 0.7
> with the war option.
>
> As a crosscheck I copied an existing, unmodified forrest sitemap.xmap
> into the documentation folder which gives me exactly the same results.

I would imagine that would lead to some strange results.  Since this
is where project sitemaps are mounted, it's probably just continuously
mounting itself.

> When applying my intended changes to the forrest sitemap.xmap i am able
> to achieve what i want. Any attempt to incorporate those changes in the
> project sitemap fails with OutOfMemory Exceptions.
>
> What am I doing wrong here? What parts of the original sitemap.xmap
> would I need to implement in the project sitemap?
>
> My current assumptions are:
> <map:match pattern="*.html">...
> <map:match pattern="**/*.html">...
> And (out of necessity, cocoon would else complain about the missing
> resource definition):
>    <map:resources>
>      <map:resource name="skinit">...

Have you tried using what Thorsten posted in the other thread and
changing cocoon:/ to cocoon://  ?  By using cocoon:// it should go all
the way back to the root sitemap looking for the match and not need
copying into the project sitemap.

I wonder if you can send your attempt at the project sitemap and let
someone have a look?

--tim