title: "EntityManagerSetupException", This web container has not yet been started, What is this?
body: <p>In my <code>jpa/eclipselink</code> application, running under <code>Glassfish 4.1</code>, I'm trying to debug the following exception, but without success:</p>
  
  <pre><code>Informações:   [EL Finest]: jpa: 2015-04-30 15:36:29.386--ServerSession(148703580)--Thread(Thread[http-listener-1(2),5,main])--Begin deploying Persistence Unit syscond_PU; session file:/D:/Leo/Java/SysCondProj/Syscond/target/Syscond-1.0.2/WEB-INF/classes/_syscond_PU; state Predeployed; factoryCount 2
  Grave:   Error Rendering View[/financeiro/viewSaldo.xhtml]
  javax.el.ELException: /financeiro/viewSaldo.xhtml @22,69 value="#{contabilMB.listaSaldo}": javax.persistence.PersistenceException: Exception [EclipseLink-28019] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.EntityManagerSetupException
  Exception Description: Deployment of PersistenceUnit [syscond_PU] failed. Close all factories for this PersistenceUnit.
  Internal Exception: java.lang.IllegalStateException: This web container has not yet been started
      at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:114)
      at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
      at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182)
      at javax.faces.component.UIData.getValue(UIData.java:732)
      at org.primefaces.component.api.UIData.getDataModel(UIData.java:629)
      at javax.faces.component.UIData.getRowCount(UIData.java:356)
      at org.primefaces.component.datatable.DataTableRenderer.encodeTbody(DataTableRenderer.java:758)
      at org.primefaces.component.datatable.DataTableRenderer.encodeTbody(DataTableRenderer.java:740)
      at org.primefaces.component.datatable.DataTableRenderer.encodeRegularTable(DataTableRenderer.java:264)
      at org.primefaces.component.datatable.DataTableRenderer.encodeMarkup(DataTableRenderer.java:226)
      at org.primefaces.component.datatable.DataTableRenderer.encodeEnd(DataTableRenderer.java:85)
      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863)
      at javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:889)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:456)
      at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133)
      at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
      at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
      at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
      at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:415)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
      at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
      at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
      at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
      at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
      at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
      at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
      at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
      at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
      at java.lang.Thread.run(Thread.java:745)
  Caused by: javax.el.ELException: javax.persistence.PersistenceException: Exception [EclipseLink-28019] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.EntityManagerSetupException
  Exception Description: Deployment of PersistenceUnit [syscond_PU] failed. Close all factories for this PersistenceUnit.
  Internal Exception: java.lang.IllegalStateException: This web container has not yet been started
  </code></pre>
  
  <p>I could see that's something related to the deployment of my persistence unit, as follows:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"&gt;
    &lt;persistence-unit name="syscond_PU" transaction-type="JTA"&gt;
      &lt;jta-data-source&gt;jdbc/syscond&lt;/jta-data-source&gt;
      &lt;class&gt;br.com.syscond.core.jpa.model.GeneroLancamento&lt;/class&gt;
      &lt;class&gt;br.com.syscond.core.jpa.model.Apto&lt;/class&gt;
      &lt;class&gt;br.com.syscond.core.jpa.model.Lancamento&lt;/class&gt;
      &lt;class&gt;br.com.syscond.core.jpa.model.TaxaCondominio&lt;/class&gt;
      &lt;class&gt;br.com.syscond.core.jpa.model.Contabil&lt;/class&gt;
      &lt;class&gt;br.com.syscond.core.jpa.model.CategoriaFuncionario&lt;/class&gt;
      &lt;class&gt;br.com.syscond.core.jpa.model.Funcionario&lt;/class&gt;
      &lt;exclude-unlisted-classes&gt;true&lt;/exclude-unlisted-classes&gt;
      &lt;properties&gt;
        &lt;property name="eclipselink.logging.level" value="FINEST"/&gt;
        &lt;property name="eclipselink.logging.level.sql" value="FINE"/&gt;
        &lt;property name="eclipselink.logging.parameters" value="TRUE"/&gt;
      &lt;/properties&gt;
    &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  </code></pre>
  
  <p>Someone can help?</p>