Javier RodrÃguez [
http://community.jboss.org/people/fjrodriguezh] created the discussion
"jboss-birt-servlet not updated with each BIRT revision"
To view the discussion, visit:
http://community.jboss.org/message/537165#537165
--------------------------------------------------------------
I am using JBoss Seam 2.2.0.GA with BIRT and trying to embeed birt reports into my Seam
application.
* 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.
* With BIRT 2.5.2 the problem is even worse. It is not even possible to render the
report:
java.lang.NoSuchMethodError:
org.eclipse.birt.report.engine.api.IReportEngine.createGetParameterDefinitionTask(Lorg/eclipse/birt/report/engine/api/IReportRunnable;)Lorg/eclipse/birt/report/engine/api/IGetParameterDefinitionTask;
Searching jboss-birt-servlet.jar source code was dificult: it doesn't exits in JBoss
Tools Repositorie. It only is included compiled at:
http://anonsvn.jboss.org/repos/jbosstools/tags/jbosstools-3.1.0.GA/birt/p...
http://anonsvn.jboss.org/repos/jbosstools/tags/jbosstools-3.1.0.GA/birt/p...
Finally I found its source code as a attachment to
https://jira.jboss.org/jira/browse/JBIDE-2220
https://jira.jboss.org/jira/browse/JBIDE-2220
I have modified JBossBirtServlet code to correct this problems.
* For Birt 2.5.1:
JBoss-Birt/jboss-birt-servlet/src/org/jboss/tools/birt/servlet/JBossBirtServlet.java ¶
Revision 236 Revision 237
1
package org.jboss.tools.birt.servlet;
1
package org.jboss.tools.birt.servlet;
2
2
3
3
import java.io.IOException;
4
import java.io.IOException;
…
…
167
168
168
case IScalarParameterDefn.TYPE_DATE:
169
case IScalarParameterDefn.TYPE_DATE:
169
return DataTypeUtil.toDate(value);
170
return DataTypeUtil.toSqlDate(value);
170
171
171
case IScalarParameterDefn.TYPE_TIME:
172
case IScalarParameterDefn.TYPE_T
* For Birt 2.5.2, the same change that for V2.5.1 puls:
JBoss-Birt/jboss-birt-servlet/src/org/jboss/tools/birt/servlet/JBossBirtServlet.java ¶
Revision 237 Revision 238
26
import org.eclipse.birt.report.engine.api.IReportEngine;
26
import org.eclipse.birt.report.engine.api.IReportEngine;
27
import org.eclipse.birt.report.engine.api.IReportRunnable;
27
import org.eclipse.birt.report.engine.api.IReportRunnable;
28
import org.eclipse.birt.report.engine.api.IRunnable;
28
import org.eclipse.birt.report.engine.api.IRunAndRenderTask;
29
import org.eclipse.birt.report.engine.api.IRunAndRenderTask;
29
import org.eclipse.birt.report.engine.api.IScalarParameterDefn;
30
import org.eclipse.birt.report.engine.api.IScalarParameterDefn;
…
…
130
Map<String, Object> inputValues = new
HashMap<String, Object>();
131
Map<String, Object> inputValues = new
HashMap<String, Object>();
131
IGetParameterDefinitionTask task = this.birtReportEngine
132
IGetParameterDefinitionTask task = this.birtReportEngine
132
.createGetParameterDefinitionTask(runnable);
133
.createGetParameterDefinitionTask((IRunnable)runnable);
133
Collection paramDefns = task.getParameterDefns(false);
134
Collection paramDefns = task.getParameterDefns(false);
134
Iterator iter = paramDefns.iterator();
135
Iterator iter = paramDefns.iterator();
The corresponding jars are atached to this post.
'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 !!
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.
I hope this can help to other Seam-Birt users with the same problem.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/537165#537165]
Start a new discussion in JBoss Tools at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]