javax.portlet.PortletException

Cannot set character encoding after HTTP body is accessed.

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web52

  • via grokbase.com by Unknown author, 10 months ago
    Cannot set character encoding after HTTP body is accessed.
  • via Liferay Issues by Antonio Ortega, 3 weeks ago
    org.springframework.dao.DataIntegrityViolationException: could not update: [com.liferay.portal.model.impl.ResourceBlockImpl#34]; SQL [update ResourceBlock set mvccVersion=?, permissionsHash=? where resourceBlockId=? and mvccVersion=?]; constraint
  • via Liferay Issues by Narahari, 1 year ago
    org.apache.jasper.JasperException: com.liferay.portal.kernel.bean.BeanLocatorException: BeanLocator has not been set
  • Stack trace

    • javax.portlet.PortletException: Cannot set character encoding after HTTP body is accessed. at org.apache.myfaces.portlet.MyFacesGenericPortlet.handleExceptionFromLifecycle(MyFacesGenericPortlet.java:253) at org.apache.myfaces.portlet.MyFacesGenericPortlet.processAction(MyFacesGenericPortlet.java:232) at org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:214) at org.apache.pluto.core.PortletServlet.doPost(PortletServlet.java:145) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499) at org.apache.pluto.core.PortletInvoker.invoke(PortletInvoker.java:169) at org.apache.pluto.core.PortletInvoker.action(PortletInvoker.java:92) at org.apache.pluto.core.PortletContainerImpl.doAction(PortletContainerImpl.java:192) at org.apache.pluto.driver.PortalDriverServlet.doGet(PortalDriverServlet.java:103) at org.apache.pluto.driver.PortalDriverServlet.doPost(PortalDriverServlet.java:143) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.IllegalStateException: Cannot set character encoding after HTTP body is accessed. at org.apache.pluto.internal.impl.PortletRequestImpl.setCharacterEncoding(PortletRequestImpl.java:594) at org.apache.myfaces.tobago.util.RequestUtils.ensureEncoding(RequestUtils.java:45) at org.apache.myfaces.tobago.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:165) at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:140) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:65) at org.apache.myfaces.portlet.MyFacesGenericPortlet.processAction(MyFacesGenericPortlet.java:220) ... 30 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You’re the first here who have seen this exception.