title: java.lang.IllegalStateException: CDATA tags may not nest
body: <p>I've got a problem with an ajax request in a JSF page. When I click on the button, I get this exception:</p>
  
  <pre><code>SEVERE: Servlet.service() for servlet Faces Servlet threw exception
  java.lang.IllegalStateException: CDATA tags may not nest
      at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.startCDATA(HtmlResponseWriter.java:630)
      at javax.faces.context.ResponseWriterWrapper.startCDATA(ResponseWriterWrapper.java:172)
      at javax.faces.context.PartialResponseWriter.startError(PartialResponseWriter.java:342)
      at org.primefaces.context.PrimePartialResponseWriter.startError(PrimePartialResponseWriter.java:210)
      at com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError(AjaxExceptionHandlerImpl.java:200)
      at com.sun.faces.context.AjaxExceptionHandlerImpl.handle(AjaxExceptionHandlerImpl.java:123)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
  </code></pre>
  
  <p>I think it's some problem with <code>String</code> objects, because when I hardcode the JPA entity properties which are shown on the site, then everything is OK. However when the entity is retrieved from the database (PostgreSQL), it throws the aforementioned exception.</p>
  
  <p>JSF code:</p>
  
  <pre><code>&lt;p:column&gt;
      &lt;f:facet name="header"&gt;
          Akcja
      &lt;/f:facet&gt;
      &lt;h:commandButton actionListener="#{mBDocumentMigration.actionEdit(object)}" value="Edytuj" rendered="#{mBDocumentMigration.editingObject == null}" &gt;
          &lt;f:ajax render="@form" execute="@form" /&gt;
      &lt;/h:commandButton&gt;
      &lt;h:commandButton action="#{mBDocumentMigration.actionZapisz}" value="Zapisz" rendered="#{mBDocumentMigration.editingObject != null}" &gt;
      &lt;f:ajax render="@form"  execute="@this" /&gt;
      &lt;/h:commandButton&gt;
  &lt;/p:column&gt;
  </code></pre>