<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
jboss-birt-servlet not updated with each BIRT revision
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/fjrodriguezh">Javier RodrÃguez</a> in <i>JBoss Tools</i> - <a href="http://community.jboss.org/message/537165#537165">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>I am using JBoss Seam 2.2.0.GA with BIRT and trying to embeed birt reports into my Seam  application.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><ul><li>With BIRT 2.5.1 I found a date paremeter problem. Whenever I pass a date parameter to JBossBirtServlet it converts the parameter to 'java.util.Date', but BIRT requires a  'java.sql.date'. Running the report an error message states this problem.</li></ul><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><ul><li>With BIRT 2.5.2 the problem is even worse. It is not even possible to render the report:</li></ul><p>          java.lang.<span class="active_link">NoSuchMethodError</span>:   org.eclipse.birt.report.engine.api.IReportEngine.createGetParameterDefinitionTask(Lorg/eclipse/birt/report/engine/api/IReportRunnable;)Lorg/eclipse/birt/report/engine/api/IGetParameterDefinitionTask;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>  Searching jboss-birt-servlet.jar source code was dificult: it doesn't exits in JBoss Tools Repositorie. It only is included compiled at:</p><p><a class="jive-link-external-small" href="http://anonsvn.jboss.org/repos/jbosstools/tags/jbosstools-3.1.0.GA/birt/plugins/org.jboss.tools.birt.core/resources/">http://anonsvn.jboss.org/repos/jbosstools/tags/jbosstools-3.1.0.GA/birt/plugins/org.jboss.tools.birt.core/resources</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>  Finally I found its source code as a attachment to <a class="jive-link-external-small" href="https://jira.jboss.org/jira/browse/JBIDE-2220">https://jira.jboss.org/jira/browse/JBIDE-2220</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>  I have modified JBossBirtServlet code to correct this problems.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><ul><li>For Birt 2.5.1:</li></ul><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>JBoss-Birt/jboss-birt-servlet/src/org/jboss/tools/birt/servlet/JBossBirtServlet.java  ¶</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">    </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p> Revision  236   Revision  237 </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">  </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>1</p><p>package  org.jboss.tools.birt.servlet; </p><p>1</p><p>package  org.jboss.tools.birt.servlet; </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">  </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">  </p><p>2</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">  </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>2</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">  </p><p>3</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">  </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>3</p><p>import  java.io.IOException; </p><p>4</p><p>import  java.io.IOException; </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>…</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">  </p><p>…</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">  </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>167</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">  </p><p>168</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">  </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>168</p><p>                 case IScalarParameterDefn.TYPE_DATE: </p><p>169</p><p>                 case IScalarParameterDefn.TYPE_DATE: </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>169</p><p>                         return DataTypeUtil.toDate(value); </p><p>170</p><p>                         return DataTypeUtil.toSqlDate(value); </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>170</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">  </p><p>171</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">  </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>171</p><p>                 case IScalarParameterDefn.TYPE_TIME: </p><p>172</p><p>                 case IScalarParameterDefn.TYPE_T</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><ul><li>For Birt 2.5.2, the same change that for V2.5.1 puls:</li></ul><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>JBoss-Birt/jboss-birt-servlet/src/org/jboss/tools/birt/servlet/JBossBirtServlet.java  ¶</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">  </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p> Revision  237   Revision  238 </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">  </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>26</p><p>import  org.eclipse.birt.report.engine.api.IReportEngine; </p><p>26</p><p>import  org.eclipse.birt.report.engine.api.IReportEngine; </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>27</p><p>import  org.eclipse.birt.report.engine.api.IReportRunnable; </p><p>27</p><p>import  org.eclipse.birt.report.engine.api.IReportRunnable; </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">  </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">  </p><p>28</p><p>import  org.eclipse.birt.report.engine.api.IRunnable; </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>28</p><p>import  org.eclipse.birt.report.engine.api.IRunAndRenderTask; </p><p>29</p><p>import  org.eclipse.birt.report.engine.api.IRunAndRenderTask; </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>29</p><p>import  org.eclipse.birt.report.engine.api.IScalarParameterDefn; </p><p>30</p><p>import  org.eclipse.birt.report.engine.api.IScalarParameterDefn; </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>…</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">  </p><p>…</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">  </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>130</p><p>                 Map&lt;String, Object&gt; inputValues = new HashMap&lt;String,  Object&gt;(); </p><p>131</p><p>                 Map&lt;String, Object&gt; inputValues = new HashMap&lt;String,  Object&gt;(); </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>131</p><p>                 IGetParameterDefinitionTask task = this.birtReportEngine </p><p>132</p><p>                 IGetParameterDefinitionTask task = this.birtReportEngine </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>132</p><p>                                 .createGetParameterDefinitionTask(runnable); </p><p>133</p><p>                                 .createGetParameterDefinitionTask((IRunnable)runnable); </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>133</p><p>                 Collection paramDefns = task.getParameterDefns(false); </p><p>134</p><p>                 Collection paramDefns = task.getParameterDefns(false); </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>134</p><p>                 Iterator iter = paramDefns.iterator(); </p><p>135</p><p>                 Iterator iter = paramDefns.iterator(); </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>The corresponding jars are atached to this post.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>'jboss-birt-servlet.jar' and 'jboos-seam-birt.jar' should be revised with each new BIRT version. If you use JBoss Proyect Wizard to create a new proyect and select BIRT facet, this files are included at /WEB_INF/lib directory with all the other libraries of the installed BIRT version, so it should run with it !!</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>  Indeed, in order to install JBoosTools 3.1.0 Plugin you have to update your Birt version to 2.5.2, so there is no chance to use previous versions of birt.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I hope this can help to other Seam-Birt users with the same problem.</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/537165#537165">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Tools at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>