我可以更改配置,以便jasper报告不会超时吗?

时间:2016-03-02 22:19:44

标签: java web-services jasper-reports jasperserver

生产系统中的用户每隔一段时间就为报告选择一个大日期范围,这会在一段时间后超时。

我不知道这个配置的位置,但这是我得到的错误:

03/02/2016 11:29:23 [ajp-apr-8009-exec-21] ERROR - Exception thrown while calling web service.
jasper.wsclient.WSException
    at jasper.wsclient.JasperServerWSClient.get(JasperServerWSClient.java:65)
    at jasper.wsclient.JasperServerWSClient.get(JasperServerWSClient.java:95)
    at jasper.JasperReportServiceImpl.getReports(JasperReportServiceImpl.java:93)
    at web.bean.ReportListBean.getReports(ReportListBean.java:47)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:400)
    at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:71)
    at org.apache.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate(ELParserHelper.java:532)
    at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
    at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:378)
    at javax.faces.component.UIData.getValue(UIData.java:779)
    at org.apache.myfaces.component.html.ext.HtmlDataTableHack.createDataModel(HtmlDataTableHack.java:350)
    at org.apache.myfaces.component.html.ext.HtmlDataTableHack.getDataModel(HtmlDataTableHack.java:333)
    at org.apache.myfaces.component.html.ext.HtmlDataTable.getDataModel(HtmlDataTable.java:428)
    at org.apache.myfaces.component.html.ext.HtmlDataTableHack.getRowCount(HtmlDataTableHack.java:75)
    at org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeInnerHtml(HtmlTableRendererBase.java:124)
    at org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeChildren(HtmlTableRendererBase.java:94)
    at org.apache.myfaces.renderkit.html.ext.HtmlTableRenderer.encodeChildren(HtmlTableRenderer.java:57)
    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:319)
    at javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:343)
    at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:251)
    at org.apache.myfaces.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTagBase.java:55)
    at org.apache.jsp.web.reports_jsp._jspx_meth_t_005fdataTable_005f0(reports_jsp.java:191)
    at org.apache.jsp.web.reports_jsp._jspx_meth_h_005fform_005f0(reports_jsp.java:124)
    at org.apache.jsp.web.reports_jsp._jspService(reports_jsp.java:88)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:604)
    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:543)
    at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:954)
    at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:656)
    at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:101)
    at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:137)
    at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:758)
    at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:890)
    at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:460)
    at org.apache.jsp.WEB_002dINF.jsp.layouts.BodyLayoutNoStatusBar_jsp._jspx_meth_tiles_005finsert_005f0(BodyLayoutNoStatusBar_jsp.java:207)
    at org.apache.jsp.WEB_002dINF.jsp.layouts.BodyLayoutNoStatusBar_jsp._jspx_meth_f_005fsubview_005f0(BodyLayoutNoStatusBar_jsp.java:181)
    at org.apache.jsp.WEB_002dINF.jsp.layouts.BodyLayoutNoStatusBar_jsp._jspService(BodyLayoutNoStatusBar_jsp.java:102)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:604)
    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:543)
    at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:954)
    at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:656)
    at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:101)
    at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:137)
    at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:758)
    at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:890)
    at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:460)
    at org.apache.jsp.WEB_002dINF.jsp.layouts.ClassicLayout_jsp._jspx_meth_tiles_005finsert_005f1(ClassicLayout_jsp.java:459)
    at org.apache.jsp.WEB_002dINF.jsp.layouts.ClassicLayout_jsp._jspx_meth_f_005fsubview_005f1(ClassicLayout_jsp.java:433)
    at org.apache.jsp.WEB_002dINF.jsp.layouts.ClassicLayout_jsp._jspx_meth_f_005ffacet_005f1(ClassicLayout_jsp.java:402)
    at org.apache.jsp.WEB_002dINF.jsp.layouts.ClassicLayout_jsp._jspx_meth_f_005fview_005f0(ClassicLayout_jsp.java:207)
    at org.apache.jsp.WEB_002dINF.jsp.layouts.ClassicLayout_jsp._jspService(ClassicLayout_jsp.java:106)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:486)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:411)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338)
    at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
    at org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.dispatch(JspTilesViewHandlerImpl.java:233)
    at org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.renderView(JspTilesViewHandlerImpl.java:219)
    at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at web.AuthorizationFilter.doFilter(AuthorizationFilter.java:80)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
    at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:188)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2476)
    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2465)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Unknown Source)

web.bean.ReportListBean.java

39  public List getReports()
40  {       
41      List<JasperReportInfo> reports = new ArrayList<JasperReportInfo>();
42      ValueBinding visitBinding = FacesContext.getCurrentInstance().getApplication().createValueBinding("#{"+Constants.VISIT_KEY_SCOPE+Constants.VISIT_KEY+"}");
43      
44      try 
45      {
46          JasperReportService service = new JasperReportServiceImpl(PropertiesManager.load("jasper.properties"), securityCode);
47          reports = service.getReports("/organization/reports");
48      } catch (WSException e) {
49          log.error("Exception thrown while calling web service.",e);
50      } catch (InvalidPropertiesFormatException e) {
51          log.error("Exception thrown while instantiating web service.",e);
52      }
53      return reports;
54  }

jasper.JasperReportServiceImpl.java

    @SuppressWarnings("unchecked")
72  public List<JasperReportInfo> getReports(String folder) throws WSException 
73  {
74      List<JasperReportInfo> reports = new ArrayList<JasperReportInfo>();
75  
76      List<ResourceDescriptor> results = wsclient.list(folder);
.       
80      for(ResourceDescriptor descriptor : results)
81      {
82          JasperReportInfo info = new JasperReportInfo();
83          info.setName(descriptor.getLabel());
84          info.setUri(descriptor.getUriString());
85          info.setParentFolder(descriptor.getParentFolder());
86          info.setDescription(descriptor.getDescription());
87          info.setControls(new ArrayList<InputControl>());
.           
93          ResourceDescriptor reportUnit = wsclient.get(descriptor.getUriString());
94          List<ResourceDescriptor> children = reportUnit.getChildren();
            ...
        }
        return reports;
    }

jasper.wsclient.JasperServerWSClient.java

58  public ResourceDescriptor get(String uri, List args) throws WSException{
59      ResourceDescriptor descriptor = new ResourceDescriptor();
60      descriptor.setWsType(ResourceDescriptor.TYPE_REPORTUNIT);
61      descriptor.setUriString(uri);
62      try {
63          return server.getWSClient().get(descriptor, null, args);
64      } catch (Exception e) {
65          throw new WSException("Exception called during list.", e.getCause());
66      }
67  }
.   
94  public ResourceDescriptor get(String uri) throws WSException{
95      return get(uri, null);
96  }

这就是我在web.xml中看到的所有内容:

<servlet>
  <servlet-name>Report Servlet</servlet-name>
  <servlet-class>web.servlet.ReportServlet</servlet-class>
  <load-on-startup>3</load-on-startup>
 </servlet>
<servlet-mapping>
  <servlet-name>Report Servlet</servlet-name>
  <url-pattern>/servlet/report</url-pattern>
 </servlet-mapping>
<session-config>
  <session-timeout>30</session-timeout>
 </session-config>

有谁知道我可以在哪里配置这个属性?

0 个答案:

没有答案