Re: [fusionreactor] This method is not valid on a closed response

32 views
Skip to first unread message

David Stockton

unread,
Mar 12, 2013, 7:23:49 AM3/12/13
to fusion...@googlegroups.com
Hello Jo,

The setLocale() function sends a HTTP header response to the requesting browser. If this is in a normal request thread, it's likely the request is closed before the setLocale() is called. For example, I could open my browser, call a CFM page (which does some slow processing) and then close my browser (i.e. close the connection to the CF server) before CF generates the response. CF could still carry on processing and then come to a setLocale() command. This then throws an error because the client connection is closed. Of course on a website you don't typically have any control over the client and although this should be a rare occurence, there's not much that you can do about it.
However, from the look of your message, it may be that there's another explanation. Is the line of code (F:\CfGlobal\util\sendConfirmation.cfc line 57) being executed from within a cfthread? If so, there's no client browser so I'm wondering if this is something different you're seeing.

Can you provide some further details please?

Best regards,
David Stockton
Fusion Team


On 12 March 2013 11:02, Jo Corless <jcor...@etsos.co.uk> wrote:
We've just installed the trial version of FusionReactor on our Production server and now we keep seeing these errors in the coldfusion error log.

We are running Coldfusion 9 Standard on a Windows 2008 Server

"Error","cfthread-21","03/12/13","10:52:52",,"SENDMAILTHREAD: This method is not valid on a closed response."
java.lang.IllegalStateException: This method is not valid on a closed response.
        at com.intergral.fusionreactor.filter.surrogate.ShadowServletResponse.setLocale(ShadowServletResponse.java:160)
        at javax.servlet.ServletResponseWrapper.setLocale(ServletResponseWrapper.java:224)
        at javax.servlet.ServletResponseWrapper.setLocale(ServletResponseWrapper.java:224)
        at javax.servlet.ServletResponseWrapper.setLocale(ServletResponseWrapper.java:224)
        at coldfusion.jsp.ServletResponseWrapper.setLocale(ServletResponseWrapper.java:74)
        at coldfusion.jsp.ServletResponseWrapper.setLocale(ServletResponseWrapper.java:74)
        at coldfusion.jsp.ServletResponseWrapper.setLocale(ServletResponseWrapper.java:74)
        at coldfusion.runtime.CFPage.SetLocale(CFPage.java:4357)
        at cfsendConfirmation2ecfc1437989269$funcSENTIT.runFunction(F:\CfGlobal\util\sendConfirmation.cfc:57)

--
You received this message because you are subscribed to the Google Groups "FusionReactor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fusionreacto...@googlegroups.com.
To post to this group, send email to fusion...@googlegroups.com.
Visit this group at http://groups.google.com/group/fusionreactor?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



Jo Corless

unread,
Mar 12, 2013, 7:46:07 AM3/12/13
to fusion...@googlegroups.com
Hi David,

Thanks for getting back to me so quickly, yes the code is running inside a thread within a scheduled task, it's just sending a confirmation email to our clients when they have placed an order, listing the products they've ordered, as you can imagine, it's quite an old piece of code and probably hasn't been touched for atleast 5 years, probably longer and defintely pre-Coldfusion 8 - We don't usually set locales as we are a UK only based business and don't have to worry about internationalisation, so as it's obviously causing an issue, I've commented it out for the time being and hopefully the problem will go away

Thanks again for getting back to me - the results from Fusion Reactor have been very useful so far

Regards

Joanne

David Stockton

unread,
Mar 12, 2013, 7:47:14 AM3/12/13
to fusion...@googlegroups.com
Hello Joanne,

I'm glad you've got things working. Thanks for the kind words about FusionReactor!

Best regards,
David Stockton
Fusion Team
Reply all
Reply to author
Forward
0 new messages