Rob Gonda's Blog

cflocation vs getPageContext().forward() = java.lang.OutOfMemoryError

How can help me with this? My home page was throwing some "java.lang.OutOfMemoryError : Java heap space" errors and I traced it down to a getPageContext().forward("/blog")...

It turns out that after I switched it per a <cflocation url = "/blog"> the error went away.

I also used the CF8 built-in monitor and confirmed that my jrun never ran out of memory; I've always had at least 100-200mb of available JVM memory ...

So, is it so wrong to use server-side relocation? I've been using it for years and never ran into this problem...

Can anyone shed some light?

TrackBacks
There are no trackbacks for this entry.

Trackback URL for this entry:
http://www.robgonda.com/blog/trackback.cfm?5030C114-B0B6-537E-73FD44EE4FED3C8C

Comments
Rob, try adding a <cfabort> immediately after your getPageContext.forward(). This prevents any further content being generated which is the cause of the issue: http://kb.adobe.com/selfservice/viewContent.do?ext...
# Posted By Julian Halliwell | 4/15/08 3:54 AM
Julian, great link, thanks for the info.
# Posted By Rob Gonda | 4/15/08 11:31 AM
This blog is running version 5.9.003. Contact Blog Owner