Re: ClassCastException and Server Crash when using MruCacheStorage

Ram Palagummi <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Hi,

We verified the possibility of multiple versions and I can guarantee that there 
is only one version (2.3.10) deployed in production. 
I did respond with stack trace we currently have. Could you please let me know 
what error handler could help provide additional stack trace on FreeMarker class 
files? 

Regarding the 404s, I agree that FreeMarker doesn't throw 404s but the 
application is. However, the root cause seems to be with FreeMarker when it is 
looking up for requested template (in our case its the html file) within the 
MruCacheStorage and throwing the error which the application interprets as 404 
to the end user.  

Regards
Ram 




________________________________
From: Daniel Dekany <[email protected]>
To: Ram Palagummi <[email protected]>
Cc: [email protected]
Sent: Tue, March 22, 2011 10:20:09 AM
Subject: Re: [FreeMarker-user] ClassCastException and Server Crash when using 
MruCacheStorage

Monday, March 21, 2011, 7:32:35 PM, Ram Palagummi wrote:

> Hi,
>
> I am an architect from EMC corporation and we have been using
> FreeMarker for rendering our emc.com and few other application web
> pages. We deployed new EMC.com towards the end of 2007 and the
> FreeMarker version we went live with is 2.3.10.
>
> We have been noticing that anytime  MruCacheStorage (strong = 0 and
> soft=500 or any other settings) is turned on for template caching,
> we are getting the following error and the servers have to be
> bounced in order to fix the problem. 
>
> ERROR while processing freemarker
> template:java.lang.CLassCastException :
> freemarker.cache.MruCacheStorage$MruReference.

Rather strange. So, as Attila said, you should send a full
stack-trace. Any change that you have multiple freemarker.jar-s of
different versions in your class path?

> Additionally, we are seeing the intermittent 404 issues when
> freemarker is trying to load template from its cache causing panic within our 
>user community.

There is something strange about the Web application framework there.
FreeMarker itself doesn't generate 404 or any other HTTP error
message, it just throws exceptions. In most situations an issue with a
template should result in 500. Thus the visitors know that the page
haven't been removed or something, "only" there's some problem on the
server.

> Its critical that we resolve this issue right away. Please let us
> know if this is a known issue and has a fix. 
>
> Thanks
> Solution Architect 
> EMC Corporation
>

-- 
Best regards,
Daniel Dekany

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar

_______________________________________________
FreeMarker-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemarker-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.