{"id":2717,"date":"2022-08-30T15:27:11","date_gmt":"2022-08-30T15:27:11","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/02\/08\/filedownload-component-of-primefaces-causes-exception-nullpointerexception-in-report-generation-with-jasperreports-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:27:11","modified_gmt":"2022-08-30T15:27:11","slug":"filedownload-component-of-primefaces-causes-exception-nullpointerexception-in-report-generation-with-jasperreports-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/filedownload-component-of-primefaces-causes-exception-nullpointerexception-in-report-generation-with-jasperreports-collection-of-common-programming-errors\/","title":{"rendered":"FileDownload Component of primefaces causes exception NullPointerException in report generation with JasperReports-Collection of common programming errors"},"content":{"rendered":"<p>I have an application for reporting. When I deploy and run locally, it generates the report and it downloads perfectly, no problems. (Creates the file in the application reports and file download is done)<\/p>\n<p>However, when I deployed the application on the company server, I tried to print the report and the exception occurred NullPointterException.<\/p>\n<p>Here&#8217;s the stack trace:<\/p>\n<pre><code>Aug 21, 2013 5:26:01 PM org.apache.catalina.core.StandardWrapperValve invoke\nSEVERE: Servlet.service() for servlet [FacesServlet] in context with path [\/WebMap] threw exception [javax.servlet.ServletException] with root cause\njava.lang.NullPointerException\n    at org.primefaces.component.filedownload.FileDownloadActionListener.processAction(FileDownloadActionListener.java:53)\n    at javax.faces.event.ActionEvent.processListener(ActionEvent.java:84)\n    at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:773)\n    at javax.faces.component.UICommand.broadcast(UICommand.java:296)\n    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:781)\n    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1246)\n    at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:77)\n    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)\n    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)\n    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:310)\n    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)\n    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)\n    at web.web.filter.ConexaoHibernateFilter.doFilter(ConexaoHibernateFilter.java:31)\n    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)\n    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)\n    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:344)\n    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:110)\n    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)\n    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)\n    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:98)\n    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)\n    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:95)\n    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)\n    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:79)\n    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)\n    at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:120)\n    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)\n    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:55)\n    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)\n    at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:36)\n    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)\n    at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:188)\n    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)\n    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:106)\n    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)\n    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\n    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)\n    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:150)\n    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)\n    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)\n    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)\n    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)\n    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)\n    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)\n    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)\n    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)\n    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)\n    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)\n    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)\n    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)\n    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)\n    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)\n    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852)\n    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)\n    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)\n    at java.lang.Thread.run(Thread.java:722)\n<\/code><\/pre>\n<p>The code portion of this application is the one below:<\/p>\n<p>Download Page<\/p>\n<pre><code>\n    \n    \n\n    \n        \n            M\u00f3dulo de Relat\u00f3rios\n        \n\n\n        \n\n            \n                \n                    \n\n                        \n                             Para realizar o download do relat\u00f3rio, clique em uma das\n                                op\u00e7\u00f5es de arquivo abaixo: \n                            <br \/>\n\n                            \n\n                            <br \/>\n\n                            \n                                \n                                \n                                \n                                Arquivo PDF\n                            \n\n                        \n                    \n\n                \n\n            \n\n\n    \n\n\n<\/code><\/pre>\n<p>RelatorioBean<\/p>\n<pre><code>import java.util.HashMap;\n\nimport javax.faces.application.FacesMessage;\nimport javax.faces.bean.ManagedBean;\nimport javax.faces.bean.RequestScoped;\nimport javax.faces.context.FacesContext;\n\nimport org.primefaces.model.StreamedContent;\n\nimport web.util.RelatorioUtil;\nimport web.util.UtilException;\n\n@ManagedBean(name = \"relatorioBean\")\n@RequestScoped\npublic class RelatorioBean {\n\n    private StreamedContent arquivoRetorno;\n    private int tipoRelatorio;\n\n    public StreamedContent getArquivoRetorno() {\n        FacesContext context = FacesContext.getCurrentInstance();\n        String nomeRelatorioJasper = \"relatorio\";\n        String nomeRelatorioSaida = \"Relat\u00f3rio_torres_de_transmiss\u00e3o\";      \n        RelatorioUtil relatorioUtil = new RelatorioUtil();\n        HashMap parametrosRelatorio = null;\n\n        try {\n            this.arquivoRetorno = relatorioUtil.geraRelatorio(\n                    parametrosRelatorio, nomeRelatorioJasper,\n                    nomeRelatorioSaida, this.tipoRelatorio);\n        } catch (UtilException e) {\n            context.addMessage(null, new FacesMessage(e.getMessage()));\n            return null;\n        }\n        return this.arquivoRetorno;\n    }\n\n    public void setArquivoRetorno(StreamedContent arquivoRetorno) {\n        this.arquivoRetorno = arquivoRetorno;\n    }\n\n    public int getTipoRelatorio() {\n        return tipoRelatorio;\n    }\n\n    public void setTipoRelatorio(int tipoRelatorio) {\n        this.tipoRelatorio = tipoRelatorio;\n    }\n\n}\n<\/code><\/pre>\n<p>RelatorioUtil<\/p>\n<pre><code>import java.io.File;\nimport java.io.FileInputStream;\nimport java.io.FileNotFoundException;\nimport java.io.InputStream;\nimport java.sql.Connection;\nimport java.sql.SQLException;\nimport java.util.HashMap;\n\nimport javax.faces.context.FacesContext;\nimport javax.naming.Context;\nimport javax.naming.InitialContext;\nimport javax.naming.NamingException;\n\nimport net.sf.jasperreports.engine.JRException;\nimport net.sf.jasperreports.engine.JRExporter;\nimport net.sf.jasperreports.engine.JRExporterParameter;\nimport net.sf.jasperreports.engine.JasperFillManager;\nimport net.sf.jasperreports.engine.JasperPrint;\nimport net.sf.jasperreports.engine.JasperReport;\nimport net.sf.jasperreports.engine.export.JRPdfExporter;\n\nimport net.sf.jasperreports.engine.util.JRLoader;\n\nimport org.primefaces.model.DefaultStreamedContent;\nimport org.primefaces.model.StreamedContent;\n\nimport web.util.UtilException;\n\npublic class RelatorioUtil {\n\n    public static final int RELATORIO_PDF = 1;\n\n\n    public StreamedContent geraRelatorio(HashMap parametrosRelatorio,\n            String nomeRelatorioJasper, String nomeRelatorioSaida,\n            int tipoRelatorio) throws UtilException {\n        StreamedContent arquivoRetorno = null;\n\n        try {\n            FacesContext context = FacesContext.getCurrentInstance();\n            Connection conexao = this.getConexao();\n            String caminhoRelatorio = context.getExternalContext().getRealPath(\n                    \"relatorios\");\n\n\n            String caminhoArquivoJasper = caminhoRelatorio + File.separator\n                    + \"relatorioTorres\" + \".jasper\";\n\n            String caminhoArquivoRelatorio = null;\n\n            JasperReport relatorioJasper = (JasperReport) JRLoader\n                    .loadObject(caminhoArquivoJasper);\n            JasperPrint impressoraJasper = JasperFillManager.fillReport(\n                    relatorioJasper, parametrosRelatorio, conexao);\n            JRExporter tipoArquivoExportado = null;\n            String extensaoArquivoExportado = \"\";\n            File arquivoGerado = null;\n\n            switch (tipoRelatorio) {\n            case RelatorioUtil.RELATORIO_PDF:\n                tipoArquivoExportado = new JRPdfExporter();\n                extensaoArquivoExportado = \"pdf\";\n                break;\n            default:\n                tipoArquivoExportado = new JRPdfExporter();\n                extensaoArquivoExportado = \"pdf\";\n                break;\n            }\n            caminhoArquivoRelatorio = caminhoRelatorio + File.separator\n                    + nomeRelatorioSaida + \".\" + extensaoArquivoExportado;\n            arquivoGerado = new java.io.File(caminhoArquivoRelatorio);\n            tipoArquivoExportado.setParameter(JRExporterParameter.JASPER_PRINT,\n                    impressoraJasper);\n            tipoArquivoExportado.setParameter(JRExporterParameter.OUTPUT_FILE,\n                    arquivoGerado);\n            tipoArquivoExportado.exportReport();\n            arquivoGerado.deleteOnExit();\n\n            InputStream conteudoRelatorio = new FileInputStream(arquivoGerado);\n            arquivoRetorno = new DefaultStreamedContent(conteudoRelatorio,\n                    \"application\/\" + extensaoArquivoExportado,\n                    nomeRelatorioSaida + \".\" + extensaoArquivoExportado);\n        } catch (JRException e) {\n            throw new UtilException(\"N\u00e3o foi poss\u00edvel gerar o relat\u00f3rio.\", e);\n        } catch (FileNotFoundException e) {\n            throw new UtilException(\"Arquivo do relat\u00f3rio n\u00e3o encontrado.\", e);\n        }\n        return arquivoRetorno;\n    }\n\n    private Connection getConexao() throws UtilException {\n        java.sql.Connection conexao = null;\n        try {\n            Context initContext = new InitialContext();\n            Context envContext = (Context) initContext\n                    .lookup(\"java:\/comp\/env\/\");\n            javax.sql.DataSource ds = (javax.sql.DataSource) envContext\n                    .lookup(\"jdbc\/WebConection\");\n            conexao = (java.sql.Connection) ds.getConnection();\n        } catch (NamingException e) {\n            throw new UtilException(\n                    \"N\u00e3o foi poss\u00edvel encontrar o nome da conex\u00e3o do banco.\", e);\n        } catch (SQLException e) {\n            throw new UtilException(\"Ocorreu um erro de SQL.\", e);\n        }\n        return conexao;\n    }\n}\n<\/code><\/pre>\n<p>Can anyone help me to solve this error? Why this locally generating the file and performing the download, but this problem occurs on the server?<\/p>\n<ol>\n<li>\n<p>Based on PrimeFaces 2.1 source code, a NPE on line 53 of <code>FileDownloadActionListener<\/code> suggests that <code>#{relatorioBean.arquivoRetorno}<\/code> actually returned <code>null<\/code>. Let&#8217;s look there:<\/p>\n<pre><code>} catch (UtilException e) {\n    context.addMessage(null, new FacesMessage(e.getMessage()));\n    return null;\n}\n<\/code><\/pre>\n<p>It look like that it&#8217;s returning <code>null<\/code> when an <code>UtilException<\/code> is been thrown. That adding of faces message is by the way completely pointless on a file download request. It won&#8217;t appear anywhere. You&#8217;d better print\/log the stack trace<\/p>\n<pre><code>} catch (UtilException e) {\n    e.printStackTrace();\n    return null;\n}\n<\/code><\/pre>\n<p>or, better, just remove that whole try-catch and throw that exception directly.<\/p>\n<pre><code>public StreamedContent getArquivoRetorno() throws UtilException {\n    \/\/ ...\n}\n<\/code><\/pre>\n<p>This way you&#8217;ll face the <em>real<\/em> exception instead of a <code>NullPointerException<\/code> which is hiding the real problem.<\/p>\n<\/li>\n<li>\n<pre><code>Aug 26, 2013 3:27:49 PM com.sun.faces.lifecycle.InvokeApplicationPhase execute\n    WARNING: \/restrito\/relatorio.xhtml @51,66 value=\"#{relatorioBean.arquivoRetorno}\": Error reading 'arquivoRetorno' on type webmap.web.RelatorioBean\n    javax.el.ELException: \/restrito\/relatorio.xhtml @51,66 value=\"#{relatorioBean.arquivoRetorno}\": Error reading 'arquivoRetorno' on type webmap.web.RelatorioBean\n        at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:111)\n        at org.primefaces.component.filedownload.FileDownloadActionListener.processAction(FileDownloadActionListener.java:50)\n        at javax.faces.event.ActionEvent.processListener(ActionEvent.java:84)\n        at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:773)\n        at javax.faces.component.UICommand.broadcast(UICommand.java:296)\n        at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:781)\n        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1246)\n        at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:77)\n        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)\n        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)\n        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:310)\n        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)\n        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)\n        at webmap.web.filter.ConexaoHibernateFilter.doFilter(ConexaoHibernateFilter.java:31)\n        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)\n        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)\n        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:344)\n        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:110)\n        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)\n        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)\n        at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:98)\n        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)\n        at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:95)\n        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)\n        at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:79)\n        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)\n        at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:120)\n        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)\n        at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:55)\n        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)\n        at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:36)\n        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)\n        at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:188)\n        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)\n        at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:106)\n        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)\n        at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\n        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)\n        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:150)\n        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)\n        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)\n        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)\n        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)\n        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)\n        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)\n        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)\n        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)\n        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)\n        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)\n        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)\n        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)\n        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)\n        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)\n        at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852)\n        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)\n        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)\n        at java.lang.Thread.run(Thread.java:722)\n    Caused by: java.lang.Error: Unresolved compilation problem: \n        Unhandled exception type UtilException\n\n        at webmap.web.RelatorioBean.getArquivoRetorno(RelatorioBean.java:42)\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n        at java.lang.reflect.Method.invoke(Method.java:601)\n        at javax.el.BeanELResolver.getValue(BeanELResolver.java:87)\n        at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:67)\n        at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:71)\n        at com.sun.el.parser.AstValue.getValue(AstValue.java:116)\n        at com.sun.el.parser.AstValue.getValue(AstValue.java:163)\n        at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:219)\n        at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:106)\n        ... 56 more\n<\/code><\/pre>\n<blockquote>\n<p>There is a new exception. This is some kind of permission error for writing the file?<\/p>\n<\/blockquote>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2014-02-08 03:35:12. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I have an application for reporting. When I deploy and run locally, it generates the report and it downloads perfectly, no problems. (Creates the file in the application reports and file download is done) However, when I deployed the application on the company server, I tried to print the report and the exception occurred NullPointterException. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2717","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2717","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2717"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2717\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2717"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2717"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2717"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}