Skip to main content
Inspiring
October 8, 2020
Question

java.lang.IllegalStateException: Cannot create a session after the response has been committed

  • October 8, 2020
  • 1 reply
  • 2167 views

ColdFusion 2016,0,13,316217

Hi,

We have been getting this in our coldfusion-error.logs multiple a *minute*:

Oct 07, 2020 6:59:19 PM org.apache.catalina.core.StandardHostValve custom
SEVERE: Exception Processing ErrorPage[exceptionType=java.lang.Exception, location=/CFIDE/administrator/templates/errors.jsp]
org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.IllegalStateException: Cannot create a session after the response has been committed

"java.lang.IllegalStateException: Cannot create a session after the response has been committed"

 

This started showing up in our logs last month but only sporadically. ColdFusion has been restarted multiple times and these errors still exist.  If it only happend occasionally I wouldn't sweat it, but this is very concering.

 

I don't really know how to figure out what is happening in a ColdFusion context.  I found three other mentions of this error on the message boards but no real solutions.  I'm not normally a server admin but this is in my lap to solve.  Thanks for any help.

    This topic has been closed for replies.

    1 reply

    BKBK
    Community Expert
    Community Expert
    October 9, 2020

    I have a suggestion: update ColdFusion to the latest version, namely, Update 16. I shall say why.

     

    Some users reported an issue similar to yours in https://tracker.adobe.com/#/view/CF-4205821 .

    • Nov 12, 2019 1:07:43 PM org.apache.catalina.core.StandardHostValve custom SCHWERWIEGEND: Exception Processing ErrorPage[exceptionType=java.lang.Exception, location=/CFIDE/administrator/templates/errors.jsp] org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.IllegalStateException: Cannot create a session after the response has been committed

    As you can see in the comments, a hotfix helped some of the users. Hence my suggstion for you to update. In general, ColdFusion updates are cumulative.

     

    You are on currently on update 13. The relevant ColdFusion 2016 update pages are: 

    https://helpx.adobe.com/coldfusion/kb/coldfusion-2016-update-14.html

    https://helpx.adobe.com/coldfusion/kb/coldfusion-2016-update-15.html

    https://helpx.adobe.com/coldfusion/kb/coldfusion-2016-update-16.html

     

     

    Charlie Arehart
    Community Expert
    Community Expert
    October 10, 2020

    Adding a couple of points to BKBK's helpful suggestion, given that you report being on cf2016 update 13 (vs the current latest of u16), do beware of an important issue when you DO  update (to u14 or above). 

     

    If you use IIS or Apache to front CF, you will need to "upgrade" your cf/webserver connector. (Some people also need to add a related attribute or two to cf's server.xml file.) This is all covered in the u14 technote and pointed to in the subsequent ones, but many never read them or notice this.

     

    I will say that I elaborate more in a blog post here (https://coldfusion.adobe.com/2020/03/three-reasons-sites-may-break-fix-applying-mar-2020-update-cf2018-2016/), and that points to still another I did, if needed.

     

    As I say there, it's not a warning to NOT do the update, but just a warning that the connector update is REQUIRED as well for anyone on u13 or earlier moving to u14 or later.

     

    It would be helpful to hear if that may help with your original problem. 

    /Charlie (troubleshooter, carehart. org)
    TwoEdgeAuthor
    Inspiring
    June 1, 2023

    Thanks for the advice. I tried to update to u14 (2016), ran wsconfig -update but after I restarted everything (I had to manually do it) I got Service Unavailable errors on me sites (though CFAdmin loaded fine.). I assume this is related to the issue you talk about in the articles, but I could not figure out the problem.  I had to uninstall the update. I'm using Apache on the same machine as CF.