viewer integration into j2ee application

Options
Assaf
edited February 11, 2022 in Analytics #1
Hi,

I want to use the viewer to display my application reports.
I want to pass a JAVA object to the report scripted data source of the reports (using DB datasources are to complex).

I was told that this can be done by coping a jar of my classes or placing the classes themselfs under the viewer web-inf/classes folder-> the viewer is a seperate app. than
my app.

this posses a problem for me - I fetch data using my app classes that rely also on static info from the app classes-> these cannot be coppied to another viewer app.

So, what I need is to intergrate the viewer as-is into my J2EE application (developed on RAD7 and usually runs under tomcat5.5).

How can I do this ?

p.s.

I tried to copy the source files -
all folders (webcontenet and empty - attachments,scriptlib,logs,documents) , all contents of web-inf into my application web-inf (when file already exists , like , web.xml , or lib folder) I just added the birt specific content into my application web.xml or jars in my lib folder)..

When I tried to access a report using the same app context as my app (using the frameset) servlet I get the following error:

[ViewerServlet]: java.lang.NoSuchMethodError: org.mozilla.javascript.ImporterTopLevel: method initStandardObjects(Lorg/mozilla/javascript/Context;Z)V not found
at org.eclipse.birt.core.script.ScriptContext.<init>(ScriptContext.java:80)

I tried to set the server mode to parent last (birt's js.jar contains a newer class thatthe JRE contains as well)..
This setting didn't work for me ...

Any Idea ?
What would be the easiest way to achieve what I'm looking for ?

Many thanks (and sorry for the long story)

Comments