Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Deploying Java event handlers
DButtery
Hi all,
Another newbie question here ...
We are using the BIRT viewer and I am looking at writing some event handlers in Java.
Where do the event handler classes get deployed for the viewer to be able to access them? Do they need to be in a jar or can the classes be 'loose'?
Thanks!
-Dennis
Find more posts tagged with
Comments
JasonW
Dennis,
Jar them and put them in either the webviewers scriptlib directory or the in the web-inf/lib folder.
Jason
DButtery
OK
I did that and the event does not appear to be invoked ...
I created a simple event handler for the initialize event:
import org.eclipse.birt.report.engine.api.script.IReportContext;
import org.eclipse.birt.report.engine.api.script.eventadapter.ReportEventAdapter;
public class MyReportEventAdapter extends ReportEventAdapter {
public final void initialize(IReportContext context) {
context.setParameterValue("param1", "Here I Am!");
}
}
JAR'd it and tried both the scriptlib and WEB-INF/lib directories - Nothing...
My report design is just a simple dump of the report parameters.
I recently tried this using the Javascript version of the handler and that worked just fine ... I now need to get this working in Java.
Thanks!
JasonW
Do you get an error in the log? Try putting the .class file in the web-inf/classes directory. you will have to create this directory.
DButtery
Putting the .class file in WEB-INF/classes did not work either...
I'm not seeing any error in the console log ...
Is there a way to turn on some debugging so that I can track what the viewer is trying to do (or not do ...) ??
Thanks
JasonW
In the web.xml there is a setting to set the log configuration. Set it to FINEST and post the log.
DButtery
Hmmm...
Something is amiss here. I set that log level in the web.xml and ran my report test. No log file appeared in the logs directory...
The reports do run and the viewer does display them so I'm thinking that the installtion is correct.
But it does seem like there is a configuration error somewhere in the mix.
Any clues on what to check next?
JasonW
You can set the log directory in the web.xml just change it to c:/temp or something like that.
What version of tomcat are you deployed on?
DButtery
Tomcat 6.0.18
DButtery
OK - Switching the log directory to C:/temp allowed the viewer to generate a logfile ...
The file is too large to attach... Is there something specific I should look for in the log? There didn't seem to be any obvious errors in the log when I looked through it ...
JasonW
zip the log and your report and class and email them to me at jasonweathersby at alltel.net.