设为首页收藏本站

birt家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 18566|回复: 29

BIRT学习日志之一(与项目集成)

[复制链接]
发表于 2013-5-9 21:29:01 | 显示全部楼层 |阅读模式
BIRT学习日志之一(与项目集成)


从项目要用到BIRT工具开始在坛子里泡了好久,从0开始慢慢琢磨现在终于可以把BIRT集成到项目中来运行了,当中的过程还真有点艰难,但这也是每个学习BIRT工具的人都遇到的,现在把中间的些许过程贴出来,希望对初次学习BIRT的人有些帮助。


一、BIRT与工程的集成。
        1、从eclipse官网下载birt的运行包(地址:http://www.eclipse.org/birt/),解压缩,先拷贝WebViewerExample\WEB-INF下如下文件到工程的WEB-INF目录下:
                jrun.web.xml
                server-config.wsdd
                viewer.properties
        2、将WebViewerExample\WEB-INF\tlds下的birt.tld文件拷贝到工程的\WEB-INF\tlds下。
        3、在工程的WEB-INF下建立report-engine的文件夹,在report-engine下新建如下四个文件夹
                documents
                images
                logs
                scriptlib
        4、将WebViewerExample\ webcontent文件夹拷贝到要集成的WEB应用的根目录下(如果工程的web目录也叫WebContent的话会很奇怪,可以将webcontent改名,改名方法另开贴说明)。
        5、在web应用的根目录下建立reportFiles文件夹,用来存放报表文件。


        6、将web.xml中的如下内容拷贝到工程的web.xml中:


    <display-name>Eclipse BIRT Report Viewer</display-name>


        <!-- Default locale setting.
        -->
        <context-param>
                <param-name>BIRT_VIEWER_LOCALE</param-name>
                <param-value>en-US</param-value>
        </context-param>


        <!--
                Default timezone setting.
                Examples: "Europe/Paris", "GMT+1".
                Defaults to the container's timezone.               
         -->
        <context-param>
                <param-name>BIRT_VIEWER_TIMEZONE</param-name>
                <param-value></param-value>
        </context-param>
       
        <!--
                Report resources directory for preview. Defaults to ${birt home}
        -->
        <context-param>
                <param-name>BIRT_VIEWER_WORKING_FOLDER</param-name>
                <param-value></param-value>
        </context-param>
       
        <!--
                Temporary document files directory. Defaults to ${birt home}/documents
        -->
        <context-param>
                <param-name>BIRT_VIEWER_DOCUMENT_FOLDER</param-name>
                <param-value></param-value>
        </context-param>


        <!--
                Flag whether the report resources can only be accessed under the
                working folder. Defaults to true
        -->
        <context-param>
                <param-name>WORKING_FOLDER_ACCESS_ONLY</param-name>
                <param-value>true</param-value>
        </context-param>


        <!--
                Settings for how to deal with the url report path. e.g. "http://host/repo/test.rptdesign".
               
                Following values are supported:
               
                <all>                 - All paths.
                <domain>        - Only the paths with host matches current domain. Note the comparison is literal, "127.0.0.1" and "localhost" are considered as different hosts.
                <none>                 - URL paths are not supported.
               
                Defaults to "domain".
        -->
        <context-param>
                <param-name>URL_REPORT_PATH_POLICY</param-name>
                <param-value>domain</param-value>
        </context-param>


        <!--
                Temporary image/chart directory. Defaults to ${birt home}/report/images
        -->
        <context-param>
                <param-name>BIRT_VIEWER_IMAGE_DIR</param-name>
                <param-value></param-value>
        </context-param>


        <!-- Engine log directory. Defaults to ${birt home}/logs -->
        <context-param>
                <param-name>BIRT_VIEWER_LOG_DIR</param-name>
                <param-value></param-value>
        </context-param>


        <!-- Report engine log level -->
        <context-param>
                <param-name>BIRT_VIEWER_LOG_LEVEL</param-name>
                <param-value>WARNING</param-value>
        </context-param>


        <!--
                Directory where to store all the birt report script libraries (JARs).
                Defaults to ${birt home}/scriptlib
        -->
        <context-param>
                <param-name>BIRT_VIEWER_SCRIPTLIB_DIR</param-name>
                <param-value></param-value>
        </context-param>
       
        <!-- Resource location directory. Defaults to ${birt home} -->
        <context-param>
                <param-name>BIRT_RESOURCE_PATH</param-name>
                <param-value></param-value>
        </context-param>


        <!-- Preview report rows limit. An empty value means no limit. -->
        <context-param>
                <param-name>BIRT_VIEWER_MAX_ROWS</param-name>
                <param-value></param-value>
        </context-param>


        <!--
                Max cube fetch levels limit for report preview (Only used when
                previewing a report design file using the preview pattern)
        -->
        <context-param>
                <param-name>BIRT_VIEWER_MAX_CUBE_ROWLEVELS</param-name>
                <param-value></param-value>
        </context-param>
        <context-param>
                <param-name>BIRT_VIEWER_MAX_CUBE_COLUMNLEVELS</param-name>
                <param-value></param-value>
        </context-param>


        <!-- Memory size in MB for creating a cube. -->
        <context-param>
                <param-name>BIRT_VIEWER_CUBE_MEMORY_SIZE</param-name>
                <param-value></param-value>
        </context-param>


        <!-- Defines the BIRT viewer configuration file -->
        <context-param>
                <param-name>BIRT_VIEWER_CONFIG_FILE</param-name>
                <param-value>WEB-INF/viewer.properties</param-value>
        </context-param>


        <!--
                Flag whether to allow server-side printing. Possible values are "ON"
                and "OFF". Defaults to "ON".
        -->
        <context-param>
                <param-name>BIRT_VIEWER_PRINT_SERVERSIDE</param-name>
                <param-value>ON</param-value>
        </context-param>


        <!--
                Flag whether to force browser-optimized HTML output. Defaults to true
        -->
        <context-param>
                <param-name>HTML_ENABLE_AGENTSTYLE_ENGINE</param-name>
                <param-value>true</param-value>
        </context-param>


        <!--
                Filename generator class/factory to use for the exported reports.
        -->
        <context-param>
                <param-name>BIRT_FILENAME_GENERATOR_CLASS</param-name>
                <param-value>org.eclipse.birt.report.utility.filename.DefaultFilenameGenerator</param-value>
        </context-param>


        <!--
                Viewer Filter used to set the request character encoding to UTF-8.
        -->
        <filter>
            <filter-name>ViewerFilter</filter-name>
        <filter-class>org.eclipse.birt.report.filter.ViewerFilter</filter-class>
        </filter>
    <filter-mapping>
        <filter-name>ViewerFilter</filter-name>
        <servlet-name>ViewerServlet</servlet-name>
    </filter-mapping>
    <filter-mapping>
        <filter-name>ViewerFilter</filter-name>
        <servlet-name>EngineServlet</servlet-name>
    </filter-mapping>
                                   
        <!-- Viewer Servlet Context Listener -->
        <listener>
                <listener-class>org.eclipse.birt.report.listener.ViewerServletContextListener</listener-class>
        </listener>


        <!-- Viewer HttpSession Listener -->
        <listener>
                <listener-class>org.eclipse.birt.report.listener.ViewerHttpSessionListener</listener-class>
        </listener>
       
        <!-- Viewer Servlet, Supports SOAP -->
        <servlet>
                <servlet-name>ViewerServlet</servlet-name>
                <servlet-class>org.eclipse.birt.report.servlet.ViewerServlet</servlet-class>
        </servlet>


        <!-- Engine Servlet -->
        <servlet>
                <servlet-name>EngineServlet</servlet-name>
                <servlet-class>org.eclipse.birt.report.servlet.BirtEngineServlet</servlet-class>
        </servlet>


        <servlet-mapping>
                <servlet-name>ViewerServlet</servlet-name>
                <url-pattern>/frameset</url-pattern>
        </servlet-mapping>
       
        <servlet-mapping>
                <servlet-name>ViewerServlet</servlet-name>
                <url-pattern>/run</url-pattern>
        </servlet-mapping>
       
        <servlet-mapping>
                <servlet-name>EngineServlet</servlet-name>
                <url-pattern>/preview</url-pattern>
        </servlet-mapping>


        <servlet-mapping>
                <servlet-name>EngineServlet</servlet-name>
                <url-pattern>/download</url-pattern>
        </servlet-mapping>


        <servlet-mapping>
                <servlet-name>EngineServlet</servlet-name>
                <url-pattern>/parameter</url-pattern>
        </servlet-mapping>       


        <servlet-mapping>
                <servlet-name>EngineServlet</servlet-name>
                <url-pattern>/document</url-pattern>
        </servlet-mapping>       


        <servlet-mapping>
                <servlet-name>EngineServlet</servlet-name>
                <url-pattern>/output</url-pattern>
        </servlet-mapping>       
       
        <servlet-mapping>
                <servlet-name>EngineServlet</servlet-name>
                <url-pattern>/extract</url-pattern>
        </servlet-mapping>


        <jsp-config>
                <taglib>
                        <taglib-uri>/birt.tld</taglib-uri>
                        <taglib-location>/WEB-INF/tlds/birt.tld</taglib-location>
                </taglib>
        </jsp-config>
       
                其中web.xml文件需做如下修改:
                        a、修改BIRT_VIEWER_WORKING_FOLDER项的值为reportFiles;
                        b、修改BIRT_VIEWER_DOCUMENT_FOLDER项的值为WEB-INF/report-engine/documents;
                        c、修改BIRT_VIEWER_IMAGE_DIR项的值为WEB-INF/report-engine/images;
                        d、修改BIRT_VIEWER_LOG_DIR项的值为WEB-INF/report-engine/logs;
                        e、修改BIRT_VIEWER_SCRIPTLIB_DIR项的值为WEB-INF/report-engine/scriptlib;
                       
                        f、如果需调整日志级别可修改BIRT_VIEWER_LOG_LEVEL的值为ALL;
                                可选的值有:ALL|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST|OFF。级别由高到低。

        7、拷贝jar包,这一步放最后是因为我对示例工程中的jar包进行了清理。
                我用的是最新版的BIRT 4.2.2,从官网下的部署包,论坛里的大部分人的集成方法是将“WebViewerExample\WEB-INF\lib”中的jar包全部拷到工程的lib目录下,说实话,这里的包实在是太多了,4.2.2 runtime下的jar包有86个47.8兆,这么多的jar包全部拷贝到工程下的话造成工程里面有很多冗余的jar包,也造成了工程的庞大,相信中也是很多人在项目中遇到的问题,工程中有很多冗余的jar包,但是有不敢删除。
        我用最土的办法将birt集成到项目中的办法就是,先将配置文件配置好,不拷贝jar包到工程,然后每次启动,根据启动日志的错误提示信息找到缺失的类所在的jar包,然后将对应的jar包拷贝到工程中,再次启动,以此类推,知道工程启动和报表展示没有错误为止,得到的运行birt所必须的jar清单如下:


axis.jar
com.ibm.icu_4.4.2.v20110823.jar
com.lowagie.text_2.1.7.v201004222200.jar
commons-cli-1.0.jar
commons-discovery-0.2.jar
jaxrpc.jar
js.jar
org.apache.batik.css_1.6.0.v201011041432.jar
org.apache.batik.util_1.6.0.v201011041432.jar
org.apache.xerces_2.9.0.v201101211617.jar
org.eclipse.birt.runtime_4.2.2.v20130216-1152.jar
org.eclipse.core.runtime_3.8.0.v20120912-155025.jar
org.eclipse.datatools.connectivity.oda.consumer_3.2.5.v201109151100.jar
org.eclipse.datatools.connectivity.oda_3.3.4.v201212070447.jar
org.eclipse.datatools.connectivity_1.2.7.v201302060508.jar
org.eclipse.equinox.common_3.6.100.v20120522-1841.jar
org.eclipse.equinox.registry_3.5.200.v20120522-1841.jar
org.eclipse.osgi_3.8.2.v20130124-134944.jar
org.w3c.css.sac_1.3.0.v200805290154.jar
Tidy.jar
viewservlets.jar


derby.jar


从86个精简到22个,工程下不用到那么多无用的jar包了,其中derby.jar这个包单独拿出来是因为这个包可要可不要,因为这个是示例工程中的数据源,但我们的项目中一般都不需要用到示例工程中的报表数据源,所以我没有拷贝这个jar包。


至此通过如上步骤已经将birt报表集成到我们的项目中来了。


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x

点评

birt家园有你更精彩!: 5.0
birt家园有你更精彩!: 5
  发表于 2013-5-10 09:00
发表于 2013-5-10 09:02:03 | 显示全部楼层
好东西,已推送。
其实很早之前,这我上传一个word文档,是关于整合的,不过太多主题了,估计是找不到了。
发表于 2013-5-10 09:38:21 | 显示全部楼层
不错啊
 楼主| 发表于 2013-5-10 09:42:20 | 显示全部楼层
本帖最后由 venn 于 2013-5-10 09:44 编辑
呼唤 发表于 2013-5-10 09:02
好东西,已推送。
其实很早之前,这我上传一个word文档,是关于整合的,不过太多主题了,估计是找不到了。 ...

51CTO下载-BIRT开发手册.doc  宇信易诚写的
是不是这个?在网上找BIRT的文档基本上只能找到这个了,文档很不错,也比较全,就是版本有点老了
 楼主| 发表于 2013-5-10 09:45:47 | 显示全部楼层
谢谢推送,哈哈,这是第二还是第三次三次发帖就给推到首页了
发表于 2013-5-10 17:27:33 | 显示全部楼层
很好,论坛需要更多这样的帖子,顶起、、、、、、、、、
发表于 2013-5-14 08:54:18 | 显示全部楼层
继续啊顶起
发表于 2013-5-14 17:36:49 | 显示全部楼层
这个必须顶!
发表于 2013-5-27 20:09:19 | 显示全部楼层
不错
发表于 2013-5-27 20:09:30 | 显示全部楼层
发表于 2013-5-27 20:09:37 | 显示全部楼层
 楼主| 发表于 2013-5-28 15:29:41 | 显示全部楼层
davie19840819 发表于 2013-5-27 20:09
不错

谢谢帮顶,
PS:头像不错啊,哈哈
 楼主| 发表于 2013-6-5 20:51:41 | 显示全部楼层
推送首页,截图纪念,嘿嘿

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
发表于 2013-6-18 18:06:07 | 显示全部楼层
好经验,不错。
shupaiqianbi 该用户已被删除
发表于 2013-6-20 09:01:28 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2013-12-3 21:02:31 | 显示全部楼层
不错的帖子,对初学者绝对有帮助!
发表于 2013-12-6 14:54:55 | 显示全部楼层
设计好的报表直接放在runtime下的WebViewerExample目录下,部署到tomcat以后显示正常。整合到项目以后就提示
org.eclipse.birt.report.engine.api.EngineException: Invalid Javascript expression: dataSetRow["cpus"].
Invalid Javascript expression: dataSetRow["cpus"].
Invalid Javascript expression: dataSetRow["cpus"].
   at org.eclipse.birt.report.engine.executor.ExecutionContext.addException(ExecutionContext.java:1245)
   at org.eclipse.birt.report.engine.executor.ExecutionContext.addException(ExecutionContext.java:1224)
   at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:96)
   at org.eclipse.birt.report.engine.executor.TableItemExecutor.execute(TableItemExecutor.java:62)
   at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)
   at org.eclipse.birt.report.engine.internal.executor.emitter.ReportItemEmitterExecutor.execute(ReportItemEmitterExecutor.java:46)
   at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43)
   at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)
   at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:34)
   at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:65)
   at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:92)
   at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100)
   at org.eclipse.birt.report.engine.presentation.ReportDocumentBuilder.build(ReportDocumentBuilder.java:249)
   at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:269)
   at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask.java:86)
   at org.eclipse.birt.report.service.ReportEngineService.runReport(ReportEngineService.java:1325)
   at org.eclipse.birt.report.service.BirtViewerReportService.runReport(BirtViewerReportService.java:158)
   at org.eclipse.birt.report.service.actionhandler.BirtRunReportActionHandler.__execute(BirtRunReportActionHandler.java:81)
   at org.eclipse.birt.report.service.actionhandler.BirtGetPageActionHandler.__checkDocumentExists(BirtGetPageActionHandler.java:58)
   at org.eclipse.birt.report.service.actionhandler.AbstractGetPageActionHandler.prepareParameters(AbstractGetPageActionHandler.java:118)
   at org.eclipse.birt.report.service.actionhandler.AbstractGetPageActionHandler.__execute(AbstractGetPageActionHandler.java:103)
   at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:90)
   at org.eclipse.birt.report.soapengine.processor.AbstractBaseDocumentProcessor.__executeAction(AbstractBaseDocumentProcessor.java:47)
   at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.executeAction(AbstractBaseComponentProcessor.java:143)
   at org.eclipse.birt.report.soapengine.processor.BirtDocumentProcessor.handleGetPage(BirtDocumentProcessor.java:87)
   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.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.process(AbstractBaseComponentProcessor.java:112)
   at org.eclipse.birt.report.soapengine.endpoint.BirtSoapBindingImpl.getUpdatedObjects(BirtSoapBindingImpl.java:66)
   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.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
   at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
   at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
   at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
   at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
   at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
   at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
   at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
   at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
   at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doPost(BirtSoapMessageDispatcherServlet.java:265)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
   at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:122)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.eclipse.birt.report.filter.ViewerFilter.doFilter(ViewerFilter.java:68)
   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:175)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
   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:286)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
   at java.lang.Thread.run(Thread.java:662)
Caused by: org.eclipse.birt.data.engine.core.DataException: Invalid Javascript expression: dataSetRow["cpus"].
Invalid Javascript expression: dataSetRow["cpus"].
Invalid Javascript expression: dataSetRow["cpus"].
   at org.eclipse.birt.data.engine.expression.MultiPassExpressionCompiler.compileExpression(MultiPassExpressionCompiler.java:148)
   at org.eclipse.birt.data.engine.expression.ExpressionProcessor.setHandle(ExpressionProcessor.java:183)
   at org.eclipse.birt.data.engine.expression.ExpressionProcessor.evaluateMultiPassExprOnCmp(ExpressionProcessor.java:128)
   at org.eclipse.birt.data.engine.executor.transform.pass.ResultSetProcessUtil.calculateAggregationsInColumnBinding(ResultSetProcessUtil.java:236)
   at org.eclipse.birt.data.engine.executor.transform.pass.ResultSetProcessUtil.populateAggregation(ResultSetProcessUtil.java:194)
   at org.eclipse.birt.data.engine.executor.transform.pass.ResultSetProcessUtil.doPopulateAggregation(ResultSetProcessUtil.java:111)
   at org.eclipse.birt.data.engine.executor.transform.pass.PassManager.prepareQueryResultSet(PassManager.java:117)
   at org.eclipse.birt.data.engine.executor.transform.pass.PassManager.pass(PassManager.java:135)
   at org.eclipse.birt.data.engine.executor.transform.pass.PassManager.populateResultSet(PassManager.java:74)
   at org.eclipse.birt.data.engine.executor.transform.ResultSetPopulator.populateResultSet(ResultSetPopulator.java:218)
   at org.eclipse.birt.data.engine.executor.transform.CachedResultSet.(CachedResultSet.java:158)
   at org.eclipse.birt.data.engine.executor.DataSourceQuery.execute(DataSourceQuery.java:1068)
   at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery$OdaDSQueryExecutor.executeOdiQuery(PreparedOdaDSQuery.java:503)
   at org.eclipse.birt.data.engine.impl.QueryExecutor.execute(QueryExecutor.java:1208)
   at org.eclipse.birt.data.engine.impl.ServiceForQueryResults.executeQuery(ServiceForQueryResults.java:233)
   at org.eclipse.birt.data.engine.impl.QueryResults.getResultIterator(QueryResults.java:178)
   at org.eclipse.birt.report.engine.data.dte.QueryResultSet.(QueryResultSet.java:98)
   at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:168)
   at org.eclipse.birt.report.engine.data.dte.DataGenerationEngine.doExecuteQuery(DataGenerationEngine.java:83)
   at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:275)
   at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1947)
   at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:80)
... 61 more
Caused by: org.eclipse.birt.data.engine.core.DataException: Invalid Javascript expression: dataSetRow["cpus"].
Invalid Javascript expression: dataSetRow["cpus"].
   at org.eclipse.birt.data.engine.expression.AbstractExpressionCompiler.compileExpression(AbstractExpressionCompiler.java:105)
   at org.eclipse.birt.data.engine.expression.MultiPassExpressionCompiler.compileExpression(MultiPassExpressionCompiler.java:141)
... 82 more
Caused by: org.eclipse.birt.data.engine.core.DataException: Invalid Javascript expression: dataSetRow["cpus"].
   at org.eclipse.birt.data.engine.expression.AbstractExpressionCompiler.processScriptTree(AbstractExpressionCompiler.java:194)
   at org.eclipse.birt.data.engine.expression.AbstractExpressionCompiler.compileExpression(AbstractExpressionCompiler.java:101)
... 83 more
org.eclipse.birt.report.engine.api.EngineException: Invalid Javascript expression: row["speed"].
Invalid Javascript expression: row["speed"].
   at org.eclipse.birt.report.engine.executor.ExtendedGenerateExecutor.execute(ExtendedGenerateExecutor.java:70)
   at org.eclipse.birt.report.engine.executor.ExtendedItemExecutor.execute(ExtendedItemExecutor.java:62)
   at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)
   at org.eclipse.birt.report.engine.internal.executor.emitter.ReportItemEmitterExecutor.execute(ReportItemEmitterExecutor.java:46)
   at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43)
   at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)
   at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:34)
   at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:65)
   at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:92)
   at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100)
   at org.eclipse.birt.report.engine.presentation.ReportDocumentBuilder.build(ReportDocumentBuilder.java:249)
   at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:269)
   at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask.java:86)
   at org.eclipse.birt.report.service.ReportEngineService.runReport(ReportEngineService.java:1325)
   at org.eclipse.birt.report.service.BirtViewerReportService.runReport(BirtViewerReportService.java:158)
   at org.eclipse.birt.report.service.actionhandler.BirtRunReportActionHandler.__execute(BirtRunReportActionHandler.java:81)
   at org.eclipse.birt.report.service.actionhandler.BirtGetPageActionHandler.__checkDocumentExists(BirtGetPageActionHandler.java:58)
   at org.eclipse.birt.report.service.actionhandler.AbstractGetPageActionHandler.prepareParameters(AbstractGetPageActionHandler.java:118)
   at org.eclipse.birt.report.service.actionhandler.AbstractGetPageActionHandler.__execute(AbstractGetPageActionHandler.java:103)
   at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:90)
   at org.eclipse.birt.report.soapengine.processor.AbstractBaseDocumentProcessor.__executeAction(AbstractBaseDocumentProcessor.java:47)
   at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.executeAction(AbstractBaseComponentProcessor.java:143)
   at org.eclipse.birt.report.soapengine.processor.BirtDocumentProcessor.handleGetPage(BirtDocumentProcessor.java:87)
   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.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.process(AbstractBaseComponentProcessor.java:112)
   at org.eclipse.birt.report.soapengine.endpoint.BirtSoapBindingImpl.getUpdatedObjects(BirtSoapBindingImpl.java:66)
   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.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
   at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
   at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
   at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
   at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
   at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
   at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
   at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
   at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
   at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doPost(BirtSoapMessageDispatcherServlet.java:265)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
   at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:122)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.eclipse.birt.report.filter.ViewerFilter.doFilter(ViewerFilter.java:68)
   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:175)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
   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:286)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
   at java.lang.Thread.run(Thread.java:662)
Caused by: org.eclipse.birt.data.engine.core.DataException: Invalid Javascript expression: row["speed"].
Invalid Javascript expression: row["speed"].
   at org.eclipse.birt.data.engine.expression.AbstractExpressionCompiler.compileExpression(AbstractExpressionCompiler.java:105)
   at org.eclipse.birt.data.engine.expression.AbstractExpressionCompiler.compile(AbstractExpressionCompiler.java:77)
   at org.eclipse.birt.data.engine.expression.AbstractExpressionCompiler.compile(AbstractExpressionCompiler.java:57)
   at org.eclipse.birt.data.engine.expression.ExpressionCompiler.compile(ExpressionCompiler.java:1)
   at org.eclipse.birt.data.engine.impl.ServiceForQueryResults$EventHandler.populateAggregationArgument(ServiceForQueryResults.java:562)
   at org.eclipse.birt.data.engine.impl.ServiceForQueryResults$EventHandler.populateOneAggrDefinition(ServiceForQueryResults.java:512)
   at org.eclipse.birt.data.engine.impl.ServiceForQueryResults$EventHandler.populateAggrDefinitions(ServiceForQueryResults.java:477)
   at org.eclipse.birt.data.engine.impl.ServiceForQueryResults$EventHandler.getAggrDefinitions(ServiceForQueryResults.java:449)
   at org.eclipse.birt.data.engine.executor.transform.pass.ResultSetProcessUtil.populateResultSet(ResultSetProcessUtil.java:148)
   at org.eclipse.birt.data.engine.executor.transform.pass.ResultSetProcessUtil.doPopulate(ResultSetProcessUtil.java:95)
   at org.eclipse.birt.data.engine.executor.transform.pass.PassManager.prepareQueryResultSet(PassManager.java:108)
   at org.eclipse.birt.data.engine.executor.transform.pass.PassManager.pass(PassManager.java:135)
   at org.eclipse.birt.data.engine.executor.transform.pass.PassManager.populateResultSet(PassManager.java:74)
   at org.eclipse.birt.data.engine.executor.transform.ResultSetPopulator.populateResultSet(ResultSetPopulator.java:218)
   at org.eclipse.birt.data.engine.executor.transform.CachedResultSet.(CachedResultSet.java:175)
   at org.eclipse.birt.data.engine.executor.dscache.DataSourceQuery.execute(DataSourceQuery.java:186)
   at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery$OdaDSQueryExecutor.executeOdiQuery(PreparedOdaDSQuery.java:503)
   at org.eclipse.birt.data.engine.impl.QueryExecutor.execute(QueryExecutor.java:1208)
   at org.eclipse.birt.data.engine.impl.ServiceForQueryResults.executeQuery(ServiceForQueryResults.java:233)
   at org.eclipse.birt.data.engine.impl.QueryResults.getResultIterator(QueryResults.java:178)
   at org.eclipse.birt.report.engine.data.dte.QueryResultSet.(QueryResultSet.java:98)
   at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:168)
   at org.eclipse.birt.report.engine.data.dte.DataGenerationEngine.doExecuteQuery(DataGenerationEngine.java:83)
   at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:275)
   at org.eclipse.birt.report.engine.executor.ExtendedGenerateExecutor.executeQueries(ExtendedGenerateExecutor.java:205)
   at org.eclipse.birt.report.engine.executor.ExtendedGenerateExecutor.execute(ExtendedGenerateExecutor.java:65)
... 61 more
Caused by: org.eclipse.birt.data.engine.core.DataException: Invalid Javascript expression: row["speed"].
   at org.eclipse.birt.data.engine.expression.AbstractExpressionCompiler.processScriptTree(AbstractExpressionCompiler.java:194)
   at org.eclipse.birt.data.engine.expression.AbstractExpressionCompiler.compileExpression(AbstractExpressionCompiler.java:101)
... 86 more
发表于 2013-12-10 10:40:46 | 显示全部楼层
hi, 我按照你的做法部署到自己的web项目去了,但是现在碰到一个问题:生成excel的时候,去打开那个文件,总提示文件格式和扩展名不匹配,这个是怎么回事?
自投罗网的鱼 该用户已被删除
发表于 2014-1-12 22:33:34 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2014-3-11 10:07:06 | 显示全部楼层
4.3下照葫芦画瓢正常
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|birt家园    

GMT+8, 2017-12-13 09:21 , Processed in 0.295170 second(s), 28 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表