主报告中的子报告 - iReport4.5.1和JasperReport 4.5

时间:2012-04-18 21:43:51

标签: jasper-reports ireport jasperserver

我使用iReport 4.5.1设计师设计了一个包含2个子报告的报告,这两个子报告都从父报告中获取参数。从iReport设计师执行时,该报告正常工作。执行JasperReports Server 4.5中部署的报告时,我收到以下错误消息:

net.sf.jasperreports.engine.JRRuntimeException: Error loading object from : repo:SUB_REPORT_NAME

Error Trace
net.sf.jasperreports.engine.JRRuntimeException: Error loading object from : repo:SUB_REPORT_NAME 
at net.sf.jasperreports.repo.DefaultRepositoryService.loadObject(DefaultRepositoryService.java:207) 
at net.sf.jasperreports.repo.DefaultRepositoryService.getResource(DefaultRepositoryService.java:168) 
at net.sf.jasperreports.repo.RepositoryUtil.getResource(RepositoryUtil.java:146) 
at net.sf.jasperreports.repo.RepositoryUtil.getReport(RepositoryUtil.java:126) 
at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateReport(JRFillSubreport.java:317) 
at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateSubreport(JRFillSubreport.java:347) 
at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluate(JRFillSubreport.java:275) 
at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:257) 
at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:473) 
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummaryNoLastFooterSamePage(JRVerticalFiller.java:1067) 
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummary(JRVerticalFiller.java:1032) 
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportEnd(JRVerticalFiller.java:296) 
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:135) 
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:836) 
at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:118) 
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:435) 
at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:773) 
at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:731) 
at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:389) 
at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.executeReport(EngineServiceImpl.java:890) 
at com.jaspersoft.jasperserver.api.engine.jasperreports.domain.impl.ReportUnitRequest.execute(ReportUnitRequest.java:57) 
at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.execute(EngineServiceImpl.java:320) 
at com.jaspersoft.jasperserver.war.action.ViewReportAction.executeReport(ViewReportAction.java:499) 
at com.jaspersoft.jasperserver.war.action.ViewReportAction.executeReport(ViewReportAction.java:489) 
at com.jaspersoft.jasperserver.war.action.ViewReportAction.runReport(ViewReportAction.java:322) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
at java.lang.reflect.Method.invoke(Method.java:597) 
at org.springframework.webflow.action.DispatchMethodInvoker.invoke(DispatchMethodInvoker.java:98) 
at org.springframework.webflow.action.MultiAction.doExecute(MultiAction.java:123)
at org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188) 
at org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51) 
at org.springframework.webflow.action.EvaluateAction.doExecute(EvaluateAction.java:79) 
at org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188) 
at org.springframework.webflow.execution.AnnotatedAction.execute(AnnotatedAction.java:145) 
at org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51) 
at org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:101) 
at org.springframework.webflow.engine.State.enter(State.java:194) 
at org.springframework.webflow.engine.Transition.execute(Transition.java:227) 
at org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:391) 
at org.springframework.webflow.engine.impl.RequestControlContextImpl.execute(RequestControlContextImpl.java:214) 
at org.springframework.webflow.engine.TransitionableState.handleEvent(TransitionableState.java:119) 
at org.springframework.webflow.engine.Flow.handleEvent(Flow.java:555) 
at org.springframework.webflow.engine.impl.FlowExecutionImpl.handleEvent(FlowExecutionImpl.java:386) 
at org.springframework.webflow.engine.impl.RequestControlContextImpl.handleEvent(RequestControlContextImpl.java:210) 
at org.springframework.webflow.engine.ViewState.handleEvent(ViewState.java:230) 
at org.springframework.webflow.engine.ViewState.resume(ViewState.java:196) 
at org.springframework.webflow.engine.Flow.resume(Flow.java:545) 
at org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:259) 
at org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:163) 
at sun.reflect.GeneratedMethodAccessor234.invoke(Unknown Source) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
at java.lang.reflect.Method.invoke(Method.java:597) 
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) 
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) 
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) 
at org.springframework.security.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:66) 
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) 
at $Proxy19.resumeExecution(Unknown Source) 
at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183) 
at org.springframework.webflow.mvc.servlet.FlowController.handleRequest(FlowController.java:174) 
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) 
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875) 
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807) 
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571) 
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:399) 
at com.jaspersoft.jasperserver.api.security.IPadSupportFilter.doFilter(IPadSupportFilter.java:67) 
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) 
at com.jaspersoft.jasperserver.api.security.JSSwitchUserProcessingFilter.doFilterHttp(JSSwitchUserProcessingFilter.java:154) 
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) 
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) 
at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) 
at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) 
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) 
at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101) 
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) 
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) 
at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105) 
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) 
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) 
at com.jaspersoft.jasperserver.api.metadata.user.service.impl.MetadataAuthenticationProcessingFilter.doFilter(MetadataAuthenticationProcessingFilter.java:139) 
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)
at com.jaspersoft.jasperserver.war.util.RequestParameterAuthenticationFilter.doFilter(RequestParameterAuthenticationFilter.java:97) 
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) 
at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174) 
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) 
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) 
at com.jaspersoft.jasperserver.war.UserPreferencesFilter.doFilter(UserPreferencesFilter.java:184) 
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) 
at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) 
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) 
at com.jaspersoft.jasperserver.war.UserPreferencesFilter.doFilter(UserPreferencesFilter.java:184) 
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) 
at com.jaspersoft.jasperserver.api.logging.filter.BasicLoggingFilter.doFilter(BasicLoggingFilter.java:53) 
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) 
at com.jaspersoft.jasperserver.api.security.JSCsrfGuardFilter.doFilter(JSCsrfGuardFilter.java:81) 
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) 
at com.jaspersoft.jasperserver.api.security.WebAppSecurityFilter.doFilter(WebAppSecurityFilter.java:83) 
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) 
at com.jaspersoft.jasperserver.war.MultipartRequestWrapperFilter.doFilter(MultipartRequestWrapperFilter.java:90) 
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) 
at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235) 
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) 
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) 
at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:188) 
at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99) 
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
at com.jaspersoft.jasperserver.war.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:67) 
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236) 
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) 
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) 
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) 
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:558) 
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) 
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859) 
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579) 
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555) 
at java.lang.Thread.run(Thread.java:619) Caused by: java.io.StreamCorruptedException: invalid stream header: 3C3F786D 
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:783) 
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280) 
at net.sf.jasperreports.engine.util.ContextClassLoaderObjectInputStream.<init>(ContextClassLoaderObjectInputStream.java:53) 
at net.sf.jasperreports.repo.DefaultRepositoryService.loadObject(DefaultRepositoryService.java:202) ... 131 more

1 个答案:

答案 0 :(得分:0)

您是否已将子报告部署到Jasper报告服务器?

Error loading object from : repo:SUB_REPORT_NAME

这意味着主报告无法在Jasper Server存储库中找到名为“SUB_REPORT_NAME”的子报表,看起来您没有将子报表部署到主报表中的资源作为资源。

在iReport JS Repository Navigator中你应该这样:

我的报告   - Main.jrxml   - 输入控件(文件夹)   - 资源     - 子报告-1.jrxml     - Sub-Report-2.jrxml

在主报告的内部,您应该将您的子报告称为:

<subreport isUsingCache="true">
    ....
    <subreportExpression><![CDATA["repo:Sub-report-1.jrxml"]]></subreportExpression>
    .....