Pessoal, estou com um problema ao tentar gerar um relatório no formato pdf utilizando um projeto java web com maven e o jasperReports/ireport. A principio seguir um video tutorial de um rapaz. https://www.youtube.com/watch?v=fEwB7JWa7DE
A principio meu erro era que o commandbutton não chamava o método para que pudesse ser gerado o relatório, depois notei que o command só chama o método se estiver “tudo ok” na pagina. Então em um certo fórum vi que “não é correto colocar um form dentro de outro” que no meu caso eu tinha. Eis que removi um form de dentro do outro, mas agora o dialog (para confirmação e que repassa as informações para a lista que posteriormente é utilizada para gerar o pdf de um unico objeto) não consegue receber as informações e caio em um nullpointer.
Agradeço quem puder me ajudar.
Estou repassando o código da página, o bean e a classe que gera o relatório.
Página
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
template="/WEB-INF/template/Adm_Layout.xhtml">
<ui:define name="content">
<h1 class="aw-page-title">Portarias</h1>
<p:growl id="growl"/>
<f:metadata>
<f:viewAction action="#{MBportaria.listarTodasPortarias()}"> </f:viewAction>
</f:metadata>
<p:messages id="messages" autoUpdate="true" closable="true" showDetail="true" />
<p:panelGrid columns="1" layout="grid" styleClass="panelgrid-noborder" >
<h:form id="Portarias" >
<p:dataTable var="portaria" value="#{MBportaria.listaPDFPortaria}"
paginator="true" selectionMode="single" selection="#{MBportaria.portaria}" rowKey="#{portaria.pkPortaria}" >
<f:facet name="header">
Portarias
</f:facet>
<p:ajax event="rowSelect" update=":Portarias" />
<p:column headerText="Número" width="50" >
<p:outputLabel value="#{portaria.numeroPortaria}" />
</p:column>
<p:column headerText="Ementa" >
<p:outputLabel value="#{portaria.ementaPortaria}" />
</p:column>
<p:column headerText="Título do Projeto" >
<p:outputLabel value="#{portaria.tituloProjetoPortaria}" />
</p:column>
<p:column headerText="Projeto" >
<p:outputLabel value="#{portaria.projetoPortaria}" />
</p:column>
<p:column headerText="Professor Coordenador" >
<p:outputLabel value="#{portaria.professorCoordenador}" />
</p:column>
<p:column headerText="Professor Coordenador" >
<p:outputLabel value="#{portaria.siapeCoordenador}"/>
</p:column>
<p:column headerText="Vigêcia Início" >
<p:outputLabel value="#{portaria.inicioVigencia}" />
</p:column>
<p:column headerText="Vigêcia Fim" >
<p:outputLabel value="#{portaria.fimVigencia}" />
</p:column>
<p:column headerText="Status">
<p:outputLabel value="#{portaria.statusPortaria}"/>
</p:column>
<!--BOTÃO PARA gerar o pdf para uma unica linha da tabela :D -->
<p:column headerText="Ações" style="width: 120px; text-align: center;" >
<p:commandButton icon="ui-icon-print" oncomplete="PF('portariaDialog').show()" update=":formPortaria" title="Gerar PDF">
<f:setPropertyActionListener value="#{portaria}" target="#{MBportaria.portaria}"/>
</p:commandButton>
<!--BOTÃO PARA EDIÇÃO-->
<p:commandButton icon="fa fa-pencil-square-o" oncomplete="PF('portariaEditDialog').show()" update=":formEditPortaria" title="Editar">
<f:setPropertyActionListener value="#{portaria}" target="#{MBportaria.portaria}"/>
</p:commandButton>
<!--BOTÃO DE EXCLUSÃO-->
<p:commandButton icon="fa fa-trash-o" title="Deletar" action="#{MBportaria.deletarPortaria()}" update="@form, :Portarias, :growl"/>
</p:column>
</p:dataTable>
</h:form>
<!--DIALOG PARA GERAR O PDF-->
<p:dialog widgetVar="portariaDialog" header="Gerar PDF" modal="true" dynamic="true" resizable="false" width="600">
<h:form id="formPortaria">
<p:panelGrid columns="2">
<p:outputLabel value="Numero Portaria"/>
<p:inputText value="#{portaria.numeroPortaria}" disabled="true"/>
<p:outputLabel value="Ementa Portaria"/>
<p:inputText value="#{portaria.ementaPortaria}" disabled="true"/>
<p:outputLabel value="Título"/>
<p:inputText value="#{portaria.tituloProjetoPortaria}" disabled="true"/>
<p:outputLabel value="Projeto"/>
<p:inputText value="#{portaria.projetoPortaria}" disabled="true"/>
<p:outputLabel value="Professor Coordenador"/>
<p:inputText value="#{portaria.professorCoordenador}" disabled="true"/>
<p:outputLabel value="Siape Prof. Coord."/>
<p:inputText value="#{portaria.siapeCoordenador}" disabled="true"/>
<p:outputLabel value="Vigência Inicio"/>
<p:inputText value="#{portaria.inicioVigencia}" disabled="true"/>
<p:outputLabel value="Vigência Fim"/>
<p:inputText value="#{portaria.fimVigencia}" disabled="true"/>
<p:outputLabel value="Status"/>
<p:inputText value="#{portaria.statusPortaria}" disabled="true"/>
</p:panelGrid>
<p:fieldset>
<p:commandButton value="Imprimir" ajax="false" action="#{MBportaria.imprimirUnicoItem()}" oncomplete="PF('portariaDialog').hide()"
update="@form, :Portarias" onclick="this.form.target = '_blank'"/>
<p:commandButton value="Fechar" oncomplete="PF('portariaDialog').hide()" update="@form, :Portarias" />
</p:fieldset>
</h:form>
</p:dialog>
<!--DIALOG PARA EDIÇÃO-->
<p:dialog widgetVar="portariaEditDialog" header="EDITAR PORTARIA" modal="true" dynamic="true" resizable="false" width="600">
<h:form id="formEditPortaria">
<p:panelGrid columns="2">
<p:outputLabel value="Numero Portaria"/>
<p:inputText value="#{portaria.numeroPortaria}"/>
<p:outputLabel value="Ementa Portaria"/>
<p:inputText value="#{portaria.ementaPortaria}" />
<p:outputLabel value="Título"/>
<p:inputText value="#{portaria.tituloProjetoPortaria}" />
<p:outputLabel value="Projeto"/>
<p:inputText value="#{portaria.projetoPortaria}" />
<p:outputLabel value="Professor Coordenador"/>
<p:inputText value="#{portaria.professorCoordenador}" />
<p:outputLabel value="Siape Prof. Coord."/>
<p:inputText value="#{portaria.siapeCoordenador}" />
<p:outputLabel value="Vigência Inicio"/>
<p:inputText value="#{portaria.inicioVigencia}" />
<p:outputLabel value="Vigência Fim"/>
<p:inputText value="#{portaria.fimVigencia}" />
<p:outputLabel value="Status"/>
<p:inputText value="#{portaria.statusPortaria}" />
</p:panelGrid>
<p:fieldset>
<p:commandButton value="Editar" ajax="false" action="#{MBportaria.editarPortaria()}" oncomplete="PF('portariaEditDialog').hide()"
update="@form, :Portarias"/>
<p:commandButton value="Fechar" oncomplete="PF('portariaEditDialog').hide()" update="@form, :Portarias" />
</p:fieldset>
</h:form>
</p:dialog>
</p:panelGrid>
</ui:define>
</ui:composition>
Bean
package com.ufpa.scontroleportaria.bean;
import com.ufpa.scontroleportaria.model.Portaria;
import com.ufpa.scontroleportaria.controller.PortariaList;
import com.ufpa.scontroleportaria.relatorio.GerarPDFPortaria;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
/**
*
* @author andreismiths
*/
@ManagedBean(name = "MBportaria")
@ViewScoped
public class MBportaria extends AbstractBean implements Serializable {
private Portaria portaria;
private PortariaList objListPortaria;
private List<Portaria> listaPDFPortaria = new ArrayList<Portaria>();
public void cadastrarPortaria() {
try {
getDaoGenerico().save(portaria);
getObjMessage().info("Cadastro efetuado!", "Portaria cadastrada com sucesso!");
} catch (Exception e) {
getObjMessage().warn("Cadastro não efetuado!", "O cadastro não foi realizado");
}
}
public void editarPortaria() {
try {
getDaoGenerico().update(portaria);
getObjMessage().info("Portaria Atualizada!", "Com sucesso!");
listarTodasPortarias();
} catch (Exception e) {
getObjMessage().warn("ERRO na Atualização Efetuada!", "Erro na atualização!");
}
}
public void deletarPortaria() {
try {
getDaoGenerico().remove(portaria);
getObjMessage().info("Portaria Excluída!", "Com sucesso!");
listarTodasPortarias();
} catch (Exception e) {
getObjMessage().warn("ERRO na Exclusão Efetuada!", "Erro na Exclusão!");
}
}
public void listarTodasPortarias() {
try {
listaPDFPortaria = getDaoGenerico().list("SELECT p FROM Portaria p");
getObjMessage().info("Exibindo Portarias", "Todas as Portarias estão sendo listadas!");
} catch (Exception e) {
getObjMessage().warn("Lista Inexistente", "Adicione Itens realizando um Novo Cadastro");
}
}
//gera pdf de todas as portarias do banco
public void gerarPDF() {
GerarPDFPortaria gerarPDFPortaria = new GerarPDFPortaria();
gerarPDFPortaria.getRelatorio(listaPDFPortaria);
}
//gera pdf de uma portaria apenas, uma unica linha
public void imprimirUnicoItem() {
System.out.println("1111111111");
GerarPDFPortaria gerarPDFPortaria = new GerarPDFPortaria();
System.out.println("2222222222");
List<Portaria> item = new ArrayList<>();
System.out.println("3333333333");
item.add(portaria);
System.out.println("4444444444");
gerarPDFPortaria.getRelatorio(item);
System.out.println("5555555555");
}
public Portaria getPortaria() {
if (portaria == null) {
portaria = new Portaria();
}
return portaria;
}
public void setPortaria(Portaria portaria) {
this.portaria = portaria;
}
public PortariaList getObjListPortaria() {
if (objListPortaria == null) {
objListPortaria = new PortariaList();
}
return objListPortaria;
}
public List<Portaria> getListaPDFPortaria() {
return listaPDFPortaria;
}
public void setListaPDFPortaria(List<Portaria> listaPDFPortaria) {
this.listaPDFPortaria = listaPDFPortaria;
}
}
Classe que gera o relatório
package com.ufpa.scontroleportaria.relatorio;
import com.ufpa.scontroleportaria.model.Portaria;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.faces.context.FacesContext;
import javax.servlet.http.HttpServletResponse;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperExportManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
import net.sf.jasperreports.engine.util.JRLoader;
/**
*
* @author andreismiths
*/
public class GerarPDFPortaria {
private HttpServletResponse response;
private FacesContext context;
private ByteArrayOutputStream baos;
private InputStream stream;
private Connection con;
public void gerarPDFPortaria() {
System.out.println("Entrou no GerarPortaria");
this.context = FacesContext.getCurrentInstance();
this.response = (HttpServletResponse) context.getExternalContext().getResponse();
}
/*
defina um parametro: List<Objeto> lista, se usar JavaBean DataSource
*/
public void getRelatorio(List<Portaria> listaPDFPortaria){
System.out.println("Entrou no GetRelatorio");
stream = this.getClass().getResourceAsStream("/report/PortariaPDF_scontroleportaria_19_Maio_2017.jasper");
System.out.println("Passou do Stream");
Map<String, Object> params = new HashMap<String, Object>();
System.out.println("Passou do Map<string, object>");
baos = new ByteArrayOutputStream();
System.out.println("Passou do baos");
try {
System.out.println("Entrou no try");
JasperReport report = (JasperReport) JRLoader.loadObject(stream);
System.out.println("Passou do JasperReport");
/*Para usar JavaBeanDataSource defina: new JRBeanCollectionDataSource(lista)
mude a string do getResourceAsStream("/report/reportPessoaJavaBeanDS.jasper")
*/
JasperPrint print = JasperFillManager.fillReport(report, params, new JRBeanCollectionDataSource(listaPDFPortaria));
System.out.println("Passou do JasperPrint nova Lista");
JasperExportManager.exportReportToPdfStream(print, baos);
System.out.println("Passou do exportar para pdf");
response.reset();
System.out.println("Passou do reset");
response.setContentType("application/pdf");
System.out.println("Passou do content type");
response.setContentLength(baos.size());
System.out.println("Passou do content length");
response.setHeader("Content-disposition", "inline; filename=Portaria.pdf");
System.out.println("Passou do setheader");
response.getOutputStream().write(baos.toByteArray());
response.getOutputStream().flush();
response.getOutputStream().close();
context.responseComplete();
fecharConexao();
} catch (JRException ex) {
System.out.println("Entrou no catch 1");
Logger.getLogger(GerarPDFPortaria.class.getName()).log(Level.SEVERE, null, ex);
} catch (IOException ex) {
System.out.println("Entrou no catch 2");
Logger.getLogger(GerarPDFPortaria.class.getName()).log(Level.SEVERE, null, ex);
}
}
public Connection getConexao(){
try {
Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection("jdbc:mysql://localhost:3306/SControlePortaria?zeroDateTimeBehavior=convertToNull", "root", "root");
return con;
} catch (SQLException ex) {
Logger.getLogger(GerarPDFPortaria.class.getName()).log(Level.SEVERE, null, ex);
} catch (ClassNotFoundException ex) {
Logger.getLogger(GerarPDFPortaria.class.getName()).log(Level.SEVERE, null, ex);
}
return con;
}
public void fecharConexao(){
try {
con.close();
} catch (SQLException ex) {
Logger.getLogger(GerarPDFPortaria.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
LOG do Servidor (Esses “prints” eu coloquei para verificar até qual parte do método está passando)
Informações: 1111111111
Informações: 2222222222
Informações: 3333333333
Informações: 4444444444
Informações: Entrou no GetRelatorio
Informações: Passou do Stream
Informações: Passou do Map<string, object>
Informações: Passou do baos
Informações: Entrou no try
Advertência: #{MBportaria.imprimirUnicoItem()}: java.lang.NullPointerException
javax.faces.FacesException: #{MBportaria.imprimirUnicoItem()}: java.lang.NullPointerException
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
at javax.faces.component.UICommand.broadcast(UICommand.java:315)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:658)
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:416)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
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:206)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
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:283)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
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:591)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:101)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
... 35 more
Caused by: java.lang.NullPointerException
at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2338)
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2351)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2822)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:804)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:301)
at net.sf.jasperreports.engine.util.ContextClassLoaderObjectInputStream.<init>(ContextClassLoaderObjectInputStream.java:57)
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:277)
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:262)
at com.ufpa.scontroleportaria.relatorio.GerarPDFPortaria.getRelatorio(GerarPDFPortaria.java:62)
at com.ufpa.scontroleportaria.bean.MBportaria.imprimirUnicoItem(MBportaria.java:82)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at javax.el.ELUtil.invokeMethod(ELUtil.java:332)
at javax.el.BeanELResolver.invoke(BeanELResolver.java:537)
at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:256)
at com.sun.el.parser.AstValue.invoke(AstValue.java:283)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:304)
at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)
at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87)
... 36 more
Advertência: StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
java.lang.NullPointerException
at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2338)
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2351)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2822)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:804)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:301)
at net.sf.jasperreports.engine.util.ContextClassLoaderObjectInputStream.<init>(ContextClassLoaderObjectInputStream.java:57)
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:277)
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:262)
at com.ufpa.scontroleportaria.relatorio.GerarPDFPortaria.getRelatorio(GerarPDFPortaria.java:62)
at com.ufpa.scontroleportaria.bean.MBportaria.imprimirUnicoItem(MBportaria.java:82)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at javax.el.ELUtil.invokeMethod(ELUtil.java:332)
at javax.el.BeanELResolver.invoke(BeanELResolver.java:537)
at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:256)
at com.sun.el.parser.AstValue.invoke(AstValue.java:283)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:304)
at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)
at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at javax.faces.component.UICommand.broadcast(UICommand.java:315)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:658)
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:416)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
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:206)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
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:283)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
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:591)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
at java.lang.Thread.run(Thread.java:745)
Qualquer informação necessária a mais, podem pedir. Agradeço caso alguém possa e queira me ajudar.