Ir para conteúdo
Fórum Script Brasil
  • 0

Problemas ao exibir relatorio no Servidor Jelastic


smg.grotto

Pergunta

Ola pessoal !

Tenho um projeto java web hospedado gratis por 14 dias no Servidor LocaWeb Jelastic.

Estou fazendo testes, tudo funcionou bem ate tentar exibir um relatório pelo Ireport.

No log do TomCat apareceu o seguinte:


 

Hibernate: select this.codigo as codigo1_3_1, this.dataRegistro_rec as dataRegi2_3_1, this.memo_rec as memo_rec3_3_1, this.tipoReceita_rec_codigo as tipoRece7_3_1, this.valorbruto_rec as valorbru4_3_1, this.valorliquido_rec as valorliq5_3_1, this.valortaxa_rec as valortax6_3_1, tiporeceit1.codigo as codigo1_6_0, tiporeceit1.taxa_rec as taxa_rec2_6_0, tiporeceit1.tipo_rec as tipo_rec3_6_0 from Receita this inner join TipoReceita tiporeceit1 on this.tipoReceita_rec_codigo=tiporeceit1.codigo where not tiporeceit1.tipo_rec in (?) order by this.codigo asc 27-Jun-2017 23:21:33.233 INFO [http-nio-8080-exec-5] com.sun.faces.application.view.ViewScopeManager. CDI @ViewScoped bean functionality unavailable Hibernate: select this.codigo as codigo1_3_1, this.dataRegistro_rec as dataRegi2_3_1, this.memo_rec as memo_rec3_3_1, this.tipoReceita_rec_codigo as tipoRece7_3_1, this.valorbruto_rec as valorbru4_3_1, this.valorliquido_rec as valorliq5_3_1, this.valortaxa_rec as valortax6_3_1, tiporeceit1.codigo as codigo1_6_0, tiporeceit1.taxa_rec as taxa_rec2_6_0, tiporeceit1.tipo_rec as tipo_rec3_6_0 from Receita this inner join TipoReceita tiporeceit1 on this.tipoReceita_rec_codigo=tiporeceit1.codigo where not tiporeceit1.tipo_rec in (?) order by this.codigo asc Hibernate: select this.codigo as codigo1_3_1, this.dataRegistro_rec as dataRegi2_3_1, this.memo_rec as memo_rec3_3_1, this.tipoReceita_rec_codigo as tipoRece7_3_1, this.valorbruto_rec as valorbru4_3_1, this.valorliquido_rec as valorliq5_3_1, this.valortaxa_rec as valortax6_3_1, tiporeceit1.codigo as codigo1_6_0, tiporeceit1.taxa_rec as taxa_rec2_6_0, tiporeceit1.tipo_rec as tipo_rec3_6_0 from Receita this inner join TipoReceita tiporeceit1 on this.tipoReceita_rec_codigo=tiporeceit1.codigo where not tiporeceit1.tipo_rec in (?) order by this.dataRegistrorec asc Hibernate: select this.codigo as codigo16_0, this.taxa_rec as taxa_rec2_6_0, this.tipo_rec as tipo_rec3_6_0 from TipoReceita this where not this.tiporec in (?) order by this.tiporec asc Hibernate: select this.codigo as codigo16_0, this.taxa_rec as taxa_rec2_6_0, this.tipo_rec as tipo_rec3_6_0 from TipoReceita this where not this.tiporec in (?) order by this.tiporec asc Hibernate: select this.codigo as codigo16_0, this.taxa_rec as taxa_rec2_6_0, this.tipo_rec as tipo_rec3_6_0 from TipoReceita this where not this.tiporec in (?) order by this.tiporec asc Hibernate: select this.codigo as codigo13_1, this.dataRegistro_rec as dataRegi2_3_1, this.memo_rec as memo_rec3_3_1, this.tipoReceita_rec_codigo as tipoRece7_3_1, this.valorbruto_rec as valorbru4_3_1, this.valorliquido_rec as valorliq5_3_1, this.valortaxa_rec as valortax6_3_1, tiporeceit2.codigo as codigo1_6_0, tiporeceit2.taxa_rec as taxa_rec2_6_0, tiporeceit2.tipo_rec as tipo_rec3_6_0 from Receita this inner join TipoReceita tiporeceit2 on this.tipoReceita_rec_codigo=tiporeceit2.codigo order by this.dataRegistro_rec asc Hibernate: select this.codigo as codigo16_0, this.taxa_rec as taxa_rec2_6_0, this.tipo_rec as tipo_rec3_6_0 from TipoReceita this where not this.tiporec in (?) order by this.tipo_rec asc 27-Jun-2017 23:21:57.357 WARNING [http-nio-8080-exec-4] com.sun.faces.lifecycle.InvokeApplicationPhase.execute java.awt.HeadlessException javax.el.ELException: java.awt.HeadlessException at org.apache.el.parser.AstValue.invoke(AstValue.java:260) at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:267) at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:149) at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88) at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:814) at javax.faces.component.UICommand.broadcast(UICommand.java:300) 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.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:745) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1437) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: java.awt.HeadlessException at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204) at java.awt.Window.(Window.java:536) at java.awt.Frame.(Frame.java:420) at java.awt.Frame.(Frame.java:385) at javax.swing.JFrame.(JFrame.java:189) at net.sf.jasperreports.view.JasperViewer.(JasperViewer.java:267) at net.sf.jasperreports.view.JasperViewer.(JasperViewer.java:197) at net.sf.jasperreports.view.JasperViewer.(JasperViewer.java:142) at br.com.emporio.financeirocasatua.bean.ReceitaBean.analitico(ReceitaBean.java:459) at br.com.emporio.financeirocasatua.bean.ReceitaBean.imprimir(ReceitaBean.java:416) 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 org.apache.el.parser.AstValue.invoke(AstValue.java:247) ... 33 more

27-Jun-2017 23:21:57.640 SEVERE [http-nio-8080-exec-4] com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError java.awt.HeadlessException at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204) at java.awt.Window.(Window.java:536) at java.awt.Frame.(Frame.java:420) at java.awt.Frame.(Frame.java:385) at javax.swing.JFrame.(JFrame.java:189) at net.sf.jasperreports.view.JasperViewer.(JasperViewer.java:267) at net.sf.jasperreports.view.JasperViewer.(JasperViewer.java:197) at net.sf.jasperreports.view.JasperViewer.(JasperViewer.java:142) at br.com.emporio.financeirocasatua.bean.ReceitaBean.analitico(ReceitaBean.java:459) at br.com.emporio.financeirocasatua.bean.ReceitaBean.imprimir(ReceitaBean.java:416) 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 org.apache.el.parser.AstValue.invoke(AstValue.java:247) at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:267) at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:149) at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88) at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:814) at javax.faces.component.UICommand.broadcast(UICommand.java:300) 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.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:745) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1437) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)

 

Meu codigo para chamar o relatório:

 

public void analitico() {

    try {

         if (filtro.getDataInicial() == null || filtro.getDataFinal() == null || filtro.getTipo().equals("")) {
            Messages.addGlobalInfo("Favor preencher os campos");
            return;
        } else {

            receita = new Receita();
            ReceitaDAO receitaDAO = new ReceitaDAO();
            listaReceita = receitaDAO.listar("dataRegistro_rec");
            TipoReceitaDAO tipoReceitaDAO = new TipoReceitaDAO();
            listaTipoReceita = tipoReceitaDAO.listar("tipo_rec");

            String recDataInicial = filtro.getDataInicialFormatada();
            String recDataFinal = filtro.getDataFinalFormatada();
            String recTipo = filtro.getTipo();

            HashMap<String, Object> parametros = new HashMap<String, Object>();

            parametros.put("RECEITA_DATAINICIAL", recDataInicial);
            parametros.put("RECEITA_DATAFINAL", recDataFinal);
            parametros.put("RECEITA_TIPO", recTipo + "%");

            String caminho = Faces.getRealPath("/reports/Receita_AnaliticoPorData.jasper");

            Connection conexao = HibernateUtil.getConexao();


            JasperPrint relatorio = JasperFillManager.fillReport(caminho, parametros, conexao);
            JasperViewer jv = new JasperViewer(relatorio, false);
            jv.setVisible(true);
...
        }
    } catch (JRException erro) {
        Messages.addGlobalError("Ocorreu um erro ao tentar gerar o relatório de Receita");
        erro.printStackTrace();
    } }

 

Link para o comentário
Compartilhar em outros sites

0 respostass a esta questão

Posts Recomendados

Até agora não há respostas para essa pergunta

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,3k
    • Posts
      652,4k
×
×
  • Criar Novo...