2012-04-18 23 views
0

プラットフォームwebsphere/tomcatのjsf4birtを使用して、BIRTによって生成されたチャートをjsfで使用する手順を教えてもらえますか?birt、jsf、jsf4birtを使用したレポートとチャートの生成

私はhttp://exadel.org/jsf4birt-docsサイトに記載されているすべてのことを行っています。

しかし、それでもまだ、私は次の例外を取得しています:

SEVERE: JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /workpages/pageb.jsp) Exception thrown during phase execution: javax.faces.event.PhaseEvent[[email protected]] 
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) 
    at com.exadel.jsfbirt.engine.BirtRendererUtils.renderBirt(BirtRendererUtils.java:134) 
    at com.exadel.jsfbirt.renderkit.html.BirtWrapperRenderer.doEncodeBegin(BirtWrapperRenderer.java:162) 
    at com.exadel.jsfbirt.renderkit.html.BirtWrapperRenderer.encodeBegin(BirtWrapperRenderer.java:127) 
    at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:813) 
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:928) 
    at javax.faces.render.Renderer.encodeChildren(Renderer.java:148) 

はまた、次のコンテキストのparamsそれらの意味を知りたいと思ったが、ウェブサイトのリンクあたりとしてweb.xmlに追加することが追加されます。

<context-param> 
    <param-name>actuate.serverUrl</param-name> 
    <param-value>http://localhost:8900/iportal</param-value> 
</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> 

答えて

0
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. 
関連する問題