论坛首页 Java企业应用论坛

报表工具

浏览 2199 次
锁定老帖子 主题:报表工具
该帖已经被评为隐藏帖
作者 正文
   发表时间:2008-07-24  
   我前一段时间自己做了一个小项目,用到了打印报表。我当时看来了Jfreechar和Ireporter,Ireporter是英文的而且还要自己画图所以没有采用,而Jfreechar的帮助很少,而且都是英文的,我最后在网上找到了一个国内产的报表工具——快逸报表,这个工具有免费版和收费版。我用的是免费版,我先用报表软件将报表设计好后,可以在网页中显示出效果,包括从数据库中取出的结果。我想将其集成到我的WEB项目的JSP网页上去,于是我按帮助上的步骤将项目与WEB项目集成,但是我无法看到报表,在tomcat启动的时候返回了一个输入流为空的异常异常代码如下:
  Report System initing......
[2008-07-24 20:39:30] runqianReportLogger : [ERROR]  - Name business is not bound in this Context
javax.naming.NameNotFoundException: Name business is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at com.runqian.report4.dataset.JNDIConnectionFactory.<init>(Unknown Source:13)
at com.runqian.report4.view.ReportServlet._$1(Unknown Source:416)
at com.runqian.report4.view.ReportServlet._$1(Unknown Source:370)
at com.runqian.report4.view.ReportServlet.loadConfig(Unknown Source:188)
at com.runqian.report4.view.ReportServlet.init(Unknown Source:70)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4044)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1023)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
[2008-07-24 20:39:30] runqianReportLogger : [DEBUG]  - : InputStream cannot be null
错误来源:InputStream cannot be null
: InputStream cannot be null
错误来源:InputStream cannot be null
at com.runqian.report4.semantics.SemanticsManager.readXMLStream(Unknown Source:175)
at com.runqian.report4.view.ReportServlet.loadConfig(Unknown Source:344)
at com.runqian.report4.view.ReportServlet.init(Unknown Source:70)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4044)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1023)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.IllegalArgumentException: InputStream cannot be null
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:120)
at com.runqian.report4.semantics.SemanticsManager.readXMLStream(Unknown Source:172)
... 29 more
Report System initialized......
web.xml文件的相关部分如下:
  <servlet>
    <servlet-name>reportServlet</servlet-name>
    <servlet-class>com.runqian.report4.view.ReportServlet</servlet-class>
    <init-param>
      <param-name>configFile</param-name>
      <param-value>/WEB-INF/reportConfig.xml</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>
 
  <servlet-mapping>
    <servlet-name>reportServlet</servlet-name>
    <url-pattern>/reportServlet</url-pattern>
  </servlet-mapping>
reportConfig.xml文件的相关部分如下:
  <?xml version="1.0" encoding="UTF-8"?>
<reportConfig>
<config>
<name>logConfig</name>
<value>/WEB-INF/runqianReportLog.properties</value>
</config>
<config>
<name>license</name>
<value>/WEB-INF/quieeWindowServer.lic</value>
</config>
<config>
<name>reportFileHome</name>
<value>/reportFiles</value>
</config>
<config>
<name>semanticsFile</name>
<value>/WEB-INF/demo.xml</value>
</config>
<config>
<name>JNDIPrefix</name>
<value>java:comp/env</value>
</config>
<config>
<name>dataSource</name>
<value> business,GBK;</value>
</config>
<config>
<name>cachedToDiskOnly</name>
<value>no</value>
</config>
<config>
<name>jspCharset</name>
<value>GBK</value>
</config>
<config>
<name>alwaysReloadDefine</name>
<value>yes</value>
</config>
<config>
<name>cachedParamsTimeout</name>
<value>120</value>
</config>
<config>
<name>cachedReportDir</name>
<value>E:\work\report\cached</value>
</config>
<config>
<name>cachedIdPrefix</name>
<value>A</value>
</config>
<config>
<name>cachedReportTimeout</name>
<value>120</value>
</config>
<config>
<name>maxCellNum</name>
<value />
</config>
<config>
<name>maxConcurrentForReport</name>
<value>9999</value>
</config>
<config>
<name>maxWaitForReport</name>
<value>9999</value>
</config>
<config>
<name>maxWaitTimeForReport</name>
<value>9999</value>
</config>
<config>
<name>appUrlPrefix</name>
<value />
</config>
<config>
<name>errorPage</name>
<value>/myErrorPage.jsp</value>
</config>
</reportConfig>

求各位大虾给我推荐一个解决方案,也请大家帮忙解决这个问题。
论坛首页 Java企业应用版

跳转论坛:
Global site tag (gtag.js) - Google Analytics