Using BIRT with jsf4birt.jar on tomcat server/websphere [message #849729] |
Thu, 19 April 2012 12:00  |
Eclipse User |
|
|
|
Hello All,
For few days I am working on BIRT and jsf4birt. I have followed the below mentioned steps to display charts generated by BIRT on jsp page using "birt:birtWrapper" tag.
1. Copied all the JARs from Report Engine to my project/WEB-INF/lib directory.
2. Copied the birt-runtime/Report Engine/plugins and birt-runtime/ReportEngine/configuration directories to the platform directory.
Added the required context params to the web.xml.
Used as :
<birt:birtWrapper id="t" reportDesign="/reports/new_report.rptdesign" rendered="true">
<f:param name="country" value="USA"></f:param>
</birt:birtWrapper>
Report name : new_report.rptdesign
When I start the server I get the below exception :
SEVERE: JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /workpages/pageb.jsp) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@1f528ab]
Apr 18, 2012 8:04:16 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet Faces Servlet threw exception
java.lang.NullPointerException
at org.eclipse.birt.report.engine.api.impl.ReportEngine$EngineExtensionManager.<init>(ReportEngine.java:819)
at org.eclipse.birt.report.engine.api.impl.ReportEngine.<init>(ReportEngine.java:111)
at org.eclipse.birt.report.engine.api.impl.ReportEngineFactory$1.run(ReportEngineFactory.java:18)
at org.eclipse.birt.report.engine.api.impl.ReportEngineFactory$1.run(ReportEngineFactory.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.birt.report.engine.api.impl.ReportEngineFactory.createReportEngine(ReportEngineFactory.java:14)
at com.exadel.jsfbirt.engine.BirtEngine.getBirtEngine(BirtEngine.java:80)
Platform details :
JSF Version : 1.2
Java Compiler : 1.5
Tomcat Version : 6
IDE : Eclipse Indigo/RSA
Please help as I have checked all the links but I get the above mentioned error.
|
|
|
Re: Using BIRT with jsf4birt.jar on tomcat server/websphere [message #850437 is a reply to message #849729] |
Fri, 20 April 2012 03:18   |
Eclipse User |
|
|
|
What version of BIRT are you using?
Jason
On 4/19/2012 8:01 AM, Debarshi Dasgupta wrote:
> Hello All,
>
> For few days I am working on BIRT and jsf4birt. I have followed the
> below mentioned steps to display charts generated by BIRT on jsp page
> using "birt:birtWrapper" tag.
> 1. Copied all the JARs from Report Engine to my project/WEB-INF/lib
> directory.
> 2. Copied the birt-runtime/Report Engine/plugins and
> birt-runtime/ReportEngine/configuration directories to the platform
> directory.
>
> Added the required context params to the web.xml.
>
> Used as :
>
> <birt:birtWrapper id="t" reportDesign="/reports/new_report.rptdesign"
> rendered="true">
> <f:param name="country" value="USA"></f:param>
> </birt:birtWrapper>
>
> Report name : new_report.rptdesign
>
> When I start the server I get the below exception :
>
> SEVERE: JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID:
> /workpages/pageb.jsp) Exception thrown during phase execution:
> javax.faces.event.PhaseEvent[source=mailto:com.sun.faces.lifecycle.LifecycleImpl@1f528ab]
>
> Apr 18, 2012 8:04:16 PM org.apache.catalina.core.StandardWrapperValve
> invoke
> SEVERE: Servlet.service() for servlet Faces Servlet threw exception
> java.lang.NullPointerException
> at
> org.eclipse.birt.report.engine.api.impl.ReportEngine$EngineExtensionManager.<init>(ReportEngine.java:819)
>
> at
> org.eclipse.birt.report.engine.api.impl.ReportEngine.<init>(ReportEngine.java:111)
>
> at
> org.eclipse.birt.report.engine.api.impl.ReportEngineFactory$1.run(ReportEngineFactory.java:18)
>
> at
> org.eclipse.birt.report.engine.api.impl.ReportEngineFactory$1.run(ReportEngineFactory.java:1)
>
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.eclipse.birt.report.engine.api.impl.ReportEngineFactory.createReportEngine(ReportEngineFactory.java:14)
>
> at com.exadel.jsfbirt.engine.BirtEngine.getBirtEngine(BirtEngine.java:80)
>
>
> Platform details :
>
> JSF Version : 1.2
> Java Compiler : 1.5
> Tomcat Version : 6
> IDE : Eclipse Indigo/RSA
>
>
> Please help as I have checked all the links but I get the above
> mentioned error.
|
|
|
Re: Using BIRT with jsf4birt.jar on tomcat server/websphere [message #850544 is a reply to message #849729] |
Fri, 20 April 2012 05:51   |
Eclipse User |
|
|
|
Thanks Jason for your reply. Your replies are very helpful.
Birt runtime version : 3_7_2
I have also copied jars from the lib folder of exadel-jsf4birt-demo module.
The jsf tags are working fine but the page with birt:birtWrapper is causing the exception.
And added the following context-params in web.xml
<context-param>
<param-name>actuate.serverUrl</param-name>
<param-value>http localhost:8900 iportal</param-value> (cant add links, that is why typed the url in this way)
</context-param>
<context-param>
<param-name>actuate.serverLogin</param-name>
<param-value>administrator</param-value>
</context-param>
<context-param>
<param-name>actuate.serverPassword</param-name>
<param-value></param-value>
</context-param>
I am also adding the screen shots of the jars added since module size exceeds the permitted file size.
[Updated on: Fri, 20 April 2012 05:56] by Moderator Report message to a moderator
|
|
|
Re: Using BIRT with jsf4birt.jar on tomcat server/websphere [message #851105 is a reply to message #850544] |
Fri, 20 April 2012 16:47   |
Eclipse User |
|
|
|
Can you take a look at this thread:
http://www.birt-exchange.org/org/forum/index.php/topic/23053-birt-3-7-and-jsf4birt/page__s__4412f80c7cd5e7495408a41162654916
Jason
On 4/20/2012 1:51 AM, Debarshi Dasgupta wrote:
> Thanks Jason for your reply. Your replies are very helpful.
>
> Birt runtime version : 3_7_2
>
> I have also copied jars from the lib folder of exadel-jsf4birt-demo module.
> The jsf tags are working fine but the page with birt:birtWrapper is
> causing the exception.
>
> And added the following context-params in web.xml
>
> <context-param>
> <param-name>actuate.serverUrl</param-name>
> <param-value>http localhost:8900 iportal</param-value> (cant add links,
> that is why typed the url in this way)
> </context-param>
>
> <context-param>
> <param-name>actuate.serverLogin</param-name>
> <param-value>administrator</param-value>
> </context-param>
>
> <context-param>
> <param-name>actuate.serverPassword</param-name>
> <param-value></param-value>
> </context-param>
|
|
|
Re: Using BIRT with jsf4birt.jar on tomcat server/websphere [message #852188 is a reply to message #851105] |
Sat, 21 April 2012 19:23  |
Eclipse User |
|
|
|
Finally the code worked for me. Steps to be followed are as follows :
1. Make a dynamic web project (jsf project if you want to use jsf tags).
2. Once your project is ready prepare your report. Prepare your data sets for report/chart generation, a sample query is mentioned below.
select count(customernumber) cuscount,State
from customers
where country=? -- this is the parameter you can give as input
group by state
3. Once you are done with this part add following parameters to web.xml
<context-param>
<param-name>actuate.serverUrl</param-name>
<param-value>http: localhost:8900 iportal</param-value>(please add //,/ respectively in the blank spaces.)
</context-param>
<context-param>
<param-name>actuate.serverLogin</param-name>
<param-value>administrator</param-value>
</context-param>
<context-param>
<param-name>actuate.serverPassword</param-name>
<param-value></param-value>
</context-param>
<context-param>
<param-name>org.eclipse.birt.configPath</param-name>
<param-value>/configuration/config.ini</param-value>
</context-param>
Place the configuration folder inside WEB-CONTENT.
If this is not done properly you can get null pointer exception.
4. Copy the "platform" folder inside WEB-INF.
5. The list of required jars are mentioned in the screen attached with this post.
(Downloading the dummy module of jsf4birt from exadel website will be helpful).
6. A tricky part that I found after struggling for few days. If you get version mismatch error or unsupported exception, open your reportfile.rptdesign in text editor u will get something like
<report xmlns="http //www.eclipse.org/birt/2005/design" version="3.2.20" id="1">
Change this version to the one that is supported by your server/IDE. I changed it from 3.2.23 to 3.2.20.
7. Finally the birt:birtWrapper worked for me. Where country is my parameter.
<birt:birtWrapper id="t" reportDesign="customerdetails.rptdesign" rendered="true">
<f:param name="country" value="#{form.country}"></f:param></birt:birtWrapper>
And then finally it worked for me.
I am trying to explore more features of BIRT like adding comments to a point on chart and generating reports in pdf format. Please do let me know if you are aware of these stuffs.
Special thanks to Jason for his valuable posts !!
|
|
|
Powered by
FUDForum. Page generated in 0.04143 seconds