Hi All,
I have setup a pojo scripted datasource for my birt report. The report runs fine in preview mode, but when I deploy it I get an exception stating that my object that I'm using to populate "is not a function, it is object". Any ideas on why this report doesn't work at runtime?
Below is my code:
open script:
count = 0;
stub = new Packages.com.proofpoint.webservice.resource.Stub();
items = stub.getGreeting();
fetch script:
if(count < items.size()){
row["rowId"] = items.get(count).getRowID();
row["host"] = items.get(count).getHost();
row["instance"] = items.get(count).getInstance();
row["envFrom"] = items.get(count).getEnvFrom();
row["reverseEnvFrom"] = items.get(count).getReverseEnvFrom();
count++;
return true;
}
return false;
Stub.java
package com.proofpoint.webservice.resource;
import java.util.ArrayList;
import java.util.List;
import com.proofpoint.entities.EnvFromHourly;
public class Stub {
public List<EnvFromHourly> getGreeting()
{
List<EnvFromHourly> items = new ArrayList<EnvFromHourly>();
EnvFromHourly env = new EnvFromHourly();
env.setRowID(1);
env.setHost("localhost");
env.setInstance("one");
env.setEnvFrom("10.24.71.21");
env.setReverseEnvFrom("10.22.55.215");
items.add(env);
return items;
}
}
test.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib uri="WEB-INF/tlds/birt.tld" prefix="birt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>test report</title>
</head>
<body>
<birt:report
id="topspamreport"
baseURL="/birt/"
reportDesign="topspam.rptdesign"
frameborder="no"
scrolling="yes"
height="1500"
width="1000"
format="html" />
</body>
</html>