Ola boa tarde a todos, estou com um problema não achei a solução, nem sei se existe essa solução. Seguinte no ireport tenho um report que chama um subreport e esse subreport chama um outro subreport. O problema é que quando passo o caminho como parâmetro para o segundo nível de subreport ele se perde. Segue o código.
Método para criação do report
@Transactional(readOnly=true)
public byte[] gerarPlanilhaDeContratoEmpresaPDF(FiltroPesquisaNotafiscalRelatorioVO filtro, List<FormatarContratoAditivoVO> listaVigencia){
filtro = gerarValoresProcessoPagamento(filtro, listaVigencia);
HashMap<String, Object> parametros = new HashMap<String, Object>();
parametros.put("REPORT_LOCALE", new Locale("pt", "BR"));
parametros.put("notaFiscalSubreport", getClass().getClassLoader().getResourceAsStream(Constantes.CAMINHO_SUB_RELATORIO_NOTA_FISCAL_PDF.getValor()));
parametros.put("notaFiscalTituloSubreport",getClass().getClassLoader()
.getResourceAsStream(Constantes.CAMINHO_SUB_RELATORIO_NOTA_FISCAL_TITULO_PDF.getValor()));
return gerarRelatorioService.gerarPDF(Constantes.CAMINHO_RELATORIO_NOTA_FISCAL_PDF.getValor(), parametros,
new JRBeanArrayDataSource(new FiltroPesquisaNotafiscalRelatorioVO[]{filtro}));
}
Constantes
CAMINHO_RELATORIO_NOTA_FISCAL_PDF("/br/gov/saude/resources/relatorio/nota_fiscal_pdf.jasper"),
CAMINHO_SUB_RELATORIO_NOTA_FISCAL_PDF("/br/gov/saude/resources/relatorio/nota_fiscal_pdf_subreport.jasper"), CAMINHO_SUB_RELATORIO_NOTA_FISCAL_TITULO_PDF("/br/gov/saude/resources/relatorio/nota_fiscal_pdf_titulo_subreport.jasper");
Os caminhos são passados por parametros, e estou na dúvida porque ocorre o seguinte erro:
17:19:46,438 ERROR [net.sf.jasperreports.engine.fill.JRFillSubreport] (http-localhost/127.0.0.1:8080-3) Fill 2121994918: exception: net.sf.jasperreports.engine.JRException: Error loading object from InputStream
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:215) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateReport(JRFillSubreport.java:302) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateSubreport(JRFillSubreport.java:344) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluate(JRFillSubreport.java:272) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:257) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:468) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2037) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:761) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:291) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:133) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:903) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:832) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:631) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:205) [jasperreports-4.1.1.jar:4.1.1]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_43]
Caused by: java.io.EOFException
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2284) [rt.jar:1.6.0_43]
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2753) [rt.jar:1.6.0_43]
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:777) [rt.jar:1.6.0_43]
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:277) [rt.jar:1.6.0_43]
at net.sf.jasperreports.engine.util.ContextClassLoaderObjectInputStream.<init>(ContextClassLoaderObjectInputStream.java:53) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:210) [jasperreports-4.1.1.jar:4.1.1]
... 15 more
17:19:46,449 WARNING [javax.enterprise.resource.webcontainer.jsf.lifecycle] (http-localhost/127.0.0.1:8080-3) /pagina/notaFiscal/relatorio.xhtml @182,102 value="#{notaFiscalRelatorioMB.emitir}": br.gov.saude.infra.core.exception.SaudeException: Ocorreu um erro inesperado! Os responsáveis pelo sistema já foram notificados. Por favor, tente novamente.: javax.el.ELException: /pagina/notaFiscal/relatorio.xhtml @182,102 value="#{notaFiscalRelatorioMB.emitir}": br.gov.saude.infra.core.exception.SaudeException: Ocorreu um erro inesperado! Os responsáveis pelo sistema já foram notificados. Por favor, tente novamente.
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:114) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
at org.primefaces.component.filedownload.FileDownloadActionListener.processAction(FileDownloadActionListener.java:53) [primefaces-4.0.jar:4.0]
at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88) [jboss-jsf-api_2.1_spec-2.1.19.1.Final-redhat-1.jar:2.1.19.1.Final-redhat-1]
at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:775) [jboss-jsf-api_2.1_spec-2.1.19.1.Final-redhat-1.jar:2.1.19.1.Final-redhat-1]
at javax.faces.component.UICommand.broadcast(UICommand.java:300) [jboss-jsf-api_2.1_spec-2.1.19.1.Final-redhat-1.jar:2.1.19.1.Final-redhat-1]
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:786) [jboss-jsf-api_2.1_spec-2.1.19.1.Final-redhat-1.jar:2.1.19.1.Final-redhat-1]
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1251) [jboss-jsf-api_2.1_spec-2.1.19.1.Final-redhat-1.jar:2.1.19.1.Final-redhat-1]
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) [jboss-jsf-api_2.1_spec-2.1.19.1.Final-redhat-1.jar:2.1.19.1.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at br.gov.saude.portfolio.filter.NoCacheFilter.doFilter(NoCacheFilter.java:36) [classes:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-3.2.6.RELEASE.jar:3.2.6.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) [spring-web-3.2.6.RELEASE.jar:3.2.6.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) [spring-web-3.2.6.RELEASE.jar:3.2.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at br.gov.saude.portfolio.filter.AutenticadorFilter.doFilter(AutenticadorFilter.java:46) [classes:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) [spring-web-3.2.6.RELEASE.jar:3.2.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-3.2.6.RELEASE.jar:3.2.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:389) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_43]
Caused by: br.gov.saude.infra.core.exception.SaudeException: Ocorreu um erro inesperado! Os responsáveis pelo sistema já foram notificados. Por favor, tente novamente.
at br.gov.saude.portfolio.core.service.AbstractService.prepararException(AbstractService.java:23) [portfoliodatasus-core-5.4.0_rc03.jar:]
at br.gov.saude.portfolio.core.service.GerarRelatorioService.gerarPDF(GerarRelatorioService.java:87) [portfoliodatasus-core-5.4.0_rc03.jar:]
at br.gov.saude.portfolio.core.service.NotaFiscalService.gerarPlanilhaDeContratoEmpresaPDF(NotaFiscalService.java:382) [portfoliodatasus-core-5.4.0_rc03.jar:]
at br.gov.saude.portfolio.core.service.NotaFiscalService$$FastClassByCGLIB$$70508ecb.invoke(<generated>) [spring-core-3.2.6.RELEASE.jar:]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) [spring-core-3.2.6.RELEASE.jar:3.2.6.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:701) [spring-aop-3.2.6.RELEASE.jar:3.2.6.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) [spring-aop-3.2.6.RELEASE.jar:3.2.6.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96) [spring-tx-3.2.6.RELEASE.jar:3.2.6.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260) [spring-tx-3.2.6.RELEASE.jar:3.2.6.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94) [spring-tx-3.2.6.RELEASE.jar:3.2.6.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.2.6.RELEASE.jar:3.2.6.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:634) [spring-aop-3.2.6.RELEASE.jar:3.2.6.RELEASE]
at br.gov.saude.portfolio.core.service.NotaFiscalService$$EnhancerByCGLIB$$a9d4afa0.gerarPlanilhaDeContratoEmpresaPDF(<generated>) [spring-core-3.2.6.RELEASE.jar:]
at br.gov.saude.portfolio.controller.NotaFiscalRelatorioController.getEmitir(NotaFiscalRelatorioController.java:174) [classes:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_43]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_43]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_43]
at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_43]
at javax.el.BeanELResolver.getValue(BeanELResolver.java:302) [jboss-el-api_2.2_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
at org.apache.el.parser.AstValue.getValue(AstValue.java:166) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
... 67 more
Caused by: net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: Error loading object from InputStream
at net.sf.jasperreports.engine.fill.JRFillSubreport.prepare(JRFillSubreport.java:729) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:328) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:388) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:347) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2039) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:761) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:271) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:129) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:903) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:832) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:84) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:624) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:605) [jasperreports-4.1.1.jar:4.1.1]
at br.gov.saude.portfolio.core.service.GerarRelatorioService.preencherRelatorio(GerarRelatorioService.java:145) [portfoliodatasus-core-5.4.0_rc03.jar:]
at br.gov.saude.portfolio.core.service.GerarRelatorioService.gerarPDF(GerarRelatorioService.java:76) [portfoliodatasus-core-5.4.0_rc03.jar:]
... 89 more
Caused by: net.sf.jasperreports.engine.JRException: Error loading object from InputStream
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:215) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateReport(JRFillSubreport.java:302) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateSubreport(JRFillSubreport.java:344) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluate(JRFillSubreport.java:272) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:257) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:468) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2037) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:761) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:291) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:133) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:903) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:832) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:631) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:205) [jasperreports-4.1.1.jar:4.1.1]
... 1 more
Caused by: java.io.EOFException
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2284) [rt.jar:1.6.0_43]
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2753) [rt.jar:1.6.0_43]
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:777) [rt.jar:1.6.0_43]
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:277) [rt.jar:1.6.0_43]
at net.sf.jasperreports.engine.util.ContextClassLoaderObjectInputStream.<init>(ContextClassLoaderObjectInputStream.java:53) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:210) [jasperreports-4.1.1.jar:4.1.1]
... 15 more
17:19:46,457 ERROR [br.gov.saude.exception.DefaultExceptionHandler] (http-localhost/127.0.0.1:8080-3) : java.io.EOFException
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2284) [rt.jar:1.6.0_43]
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2753) [rt.jar:1.6.0_43]
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:777) [rt.jar:1.6.0_43]
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:277) [rt.jar:1.6.0_43]
at net.sf.jasperreports.engine.util.ContextClassLoaderObjectInputStream.<init>(ContextClassLoaderObjectInputStream.java:53) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:210) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateReport(JRFillSubreport.java:302) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateSubreport(JRFillSubreport.java:344) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluate(JRFillSubreport.java:272) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:257) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:468) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2037) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:761) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:291) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:133) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:903) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:832) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:631) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59) [jasperreports-4.1.1.jar:4.1.1]
at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:205) [jasperreports-4.1.1.jar:4.1.1]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_43]
Não sei se existe solução para uso de subrelatórios aninhados com mais de dois níveis. Ninguém aqui da empresa achou uma solução, se alguém tiver uma ideia, solução, uma pista do que pode ser já ajudaria bastante.
Dese já agradeço a ajuda de todos.