Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Deploying to BIRT 4.2 Viewer Web App (TypeError: [JavaPackage <Java class>] is not a function, it)
Deploying to BIRT 4.2 Viewer Web App [message #1040051] Sat, 13 April 2013 01:06
Ben Foster is currently offline Ben Foster
Messages: 4
Registered: April 2013
Junior Member
I am new to BIRT and I am having a hair-pulling time of it getting the report to execute in the BIRT Viewer running on Tomcat.

To begin, I have performed the following tasks:


    installed BIRT 4.2.1 to Tomcat 6.32 running on an iSeries machine
    developed the design file using Eclipse, Version: Juno Service Release 1 Build id: 20120920-0800.
    deployed the design file to Tomcat's webapps\BIRT421\reportDesignFiles directory which has been configured using the web.xml file via:


<context-param>
<param-name>BIRT_VIEWER_WORKING_FOLDER</param-name>
<param-value>/reportDesignFiles</param-value>
</context-param>




    placed the .jar-file containing the project's DAO and VO class files into Tomcat's

WEB-INF directory or,(never and)
WEB-INF/lib directory or,
scriptlib
depending on the execution at the time, while trying to get this to work.


The report design uses a scripted data source which runs like a charm inside Eclipse using the Preview tab. It executes the DAO which registers the JDBC driver, constructs the SQL using the parms passed to the report, and executes the statement without error. It then iterates through the resultSet, placing each record's values into a Value Object (VO) which is then returned to the report's javascript which called the DAO and the report results are displayed.

The trouble is, when I deploy the design-file and the project's class files in its jar to the BIRT Viewer app in Tomcat, no matter what is tried in terms of the location of the .jar-file or variation of importPackage syntax I have seen out there on the web, I always get this error:

TypeError: [JavaPackage DocumentRequestListDAO] is not a function, it is object.

Here are the details of the javascript call. Note that the importPackage statements have been commented as a consequence of the last test run which issued the error.

[font=Courier]<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.23" id="1">
    <property name="createdBy">Eclipse BIRT Designer Version 4.2.1.v201209101448 Build &lt;4.2.1.v20120912-1721></property>
    <list-property name="includeScripts">
        <property>scripts/debugwindow.js</property>
    </list-property>
    <property name="units">in</property>
    <method name="initialize"><![CDATA[//importPackage(Packages.java.util);

//importPackage(Packages.java.lang);
//importPackage(Packages.com.mig.officedocsysreport.dao.DocumentRequestListDAO);
//importPackage(Packages.com.mig.officedocsysreport.vo.DCSDCPReportFieldsVO);


var documentRequestListDAO = new Packages.DocumentRequestListDAO;
var dcsdcpReportFieldsVO = new Packages.DCSDCPReportFieldsVO;
 
var paramArray = new Packages.java.util.ArrayList();
paramArray.add( params["PARAM_UNIQUEID01"] );
paramArray.add( params["PARAM_UNIQUEID02"] );
paramArray.add( params["PARAM_UNIQUEID03"] );
paramArray.add( params["PARAM_UNIQUEID04"] );

documentRequestListDAO.process(paramArray);

var listOfRecords = new Packages.java.util.ArrayList;
listOfRecords = documentRequestListDAO.getListOfDCSDCPReportFieldsVO() 
var size = documentRequestListDAO.getSize();
                :
                :
                :[/font]


Can someone please tell me what I am doing wrong? And can someone please point me to relevant documentation for BIRT 4.2.1. Just about everything I see 'out there' relates to BIRT 2.n or 3.n.

Thanks in advance,
Ben
Previous Topic:How to use XML datasource to render a report
Next Topic:Birt 3.7.1 and FireFox 17 support
Goto Forum:
  


Current Time: Fri Oct 24 23:26:38 GMT 2014

Powered by FUDForum. Page generated in 0.02198 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software