Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Jar File Location in scriptable datasource tutorial
Migrateduser
Hi,
Under Birt 4.2, I tried following the tutorial for creating a scripted data source. I created a jar file with two simple classes and I tried placing the jar file in the directory.
C:\Program Files\eclipse-jee-juno-win32-x86_64\eclipse\plugins\org.eclipse.birt.report.viewer_4.2.1.v201209071804\birt\WEB-INF\lib
**note the example/tutorial mentioned a classes directory but there was no classes directory under WEB-INF so I opted for lib. Maybe this is associated with my problem?
Say my jar file was gov.xcrt.xxxx.jar, I placed this in the above directory and then attempted an
importPackage(Packages.gov.xcrt.xxxx);
importPackage(Packages.gov.xcrt.****);
xobj = new CourtPersonDaoEngine(1);
xlist = xobj.getCourtUserList();
totalrows = xlist.size();
currentrow = 0;
But the import would not succeed. I would see an error message like this:
ReportDesign (id = 1):
+ There are errors evaluating script "importPackage(Packages.gov.xcrt.****);
xobj = new CourtPersonDaoEngine(1);
xlist = xobj.getCourtUserList();
totalrows = xlist.size();
currentrow = 0;
":
Fail to execute script in function __bm_OPEN(). Source:
As a work around, I went followed a post that I found here and from Eclipse looked at Window->Show view->Other->Report Examples and found an example for Scripted Data Source. In this example the programmer created a src directory and created a package tree under this source directory in a java project directory with a Birt Report
I copied this model in my report and my report worked.
Also I was able to create a jar file of my package and upload this jar to a Tomcat server in /opt/tomcat/webapps/birt/WEB-INF/lib
and also copy my report to the /opt/tomcat/webapss/birt/
And this worked on the server.
I also tried downloading the scriptable datasource tutorial and installing in my dev eclipse environment--same issue.
So my question is--Is the tutorial incorrect? Is
C:\Program Files\eclipse-jee-juno-win32-x86_64\eclipse\plugins\org.eclipse.birt.report.viewer_4.2.1.v201209071804\birt\WEB-INF\lib
the wrong place to put the jar file?
Find more posts tagged with
Comments
There are no comments yet