Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350662 - Replacing the built in emitters in BIRT 3.7 runtime is a major hack
Summary: Replacing the built in emitters in BIRT 3.7 runtime is a major hack
Status: RESOLVED WORKSFORME
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 3.7.0   Edit
Hardware: PC All
: P3 normal with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Birt-ReportViewer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-29 03:44 EDT by Missing name CLA
Modified: 2012-01-12 16:05 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Missing name CLA 2011-06-29 03:44:11 EDT
http://www.birt-exchange.org/org/forum/index.php/topic/22708-tribix-emitters-in-birt-3-7/

The move to a jar-based runtime makes it difficult to remove the built in emitters and replace them with alternatives.

In would say that either the report engine should dynamically detect emitters that replace the built in emitters, or it should provide an API for specifying the emitters to be used.
Comment 1 Jun Ouyang CLA 2011-06-29 04:58:59 EDT
You can set default emitter for a format by API in engine config:
  setDefaultEmitter( String format, String emitterId )
Comment 2 Jason Weathersby CLA 2011-06-29 12:37:44 EDT
There is no way to do this in the viewer though.
Comment 3 Jun Ouyang CLA 2011-06-29 20:46:44 EDT
Jason,

Do you mean set a default emitter by URL parameter? Or you mean on GUI?
Comment 4 Jason Weathersby CLA 2011-06-30 10:01:56 EDT
I meant through the viewer export dialog.  I suppose if they are just using the URLs they could use the __emitterid parameter.  Any way to modify the .js files to point to the new emitter?
Comment 5 Adam CLA 2011-07-20 14:47:44 EDT
I am having issues with this as well. I have created a fresh install and tried the hack listed below but it is not working at all for me.

Below is the error I get when trying the hack listed below.

- Fatal error occurred when try to startup report engine.

org.eclipse.birt.report.exception.ViewerException: Fatal error occurred when try to startup report engine.	at org.eclipse.birt.report.service.ReportEngineService.setEngineContext(ReportEngineService.java:334)	at org.eclipse.birt.report.service.BirtViewerReportService.setContext(BirtViewerReportService.java:1022)	at org.eclipse.birt.report.servlet.ViewerServlet.__getContext(ViewerServlet.java:148)	at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doGet(BirtSoapMessageDispatcherServlet.java:151)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)	at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)	at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:122)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)	at org.eclipse.birt.report.filter.ViewerFilter.doFilter(ViewerFilter.java:68)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395)	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:250)	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166)	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)	at java.lang.Thread.run(Thread.java:636)
Comment 6 Jason Weathersby CLA 2011-07-20 15:34:57 EDT
Did you do this:

I then opened the META-INF folder and deleted everything but the MANIFEST.MF. I modified this file to look like:
Manifest-Version: 1.0
Bundle-Vendor: Eclipse.org
Bundle-Name: BIRT Runtime SDK
Bundle-SymbolicName: org.eclipse.birt.runtime
Bundle-Version: 3.7.0.v20110615-1818

Jason
Comment 7 Jason Weathersby CLA 2011-07-21 13:44:23 EDT
Take a look at this blog:
http://birtworld.blogspot.com/2011/07/replacing-default-birt-xls-emitter.html
Comment 8 julien.pellissier CLA 2011-08-12 09:06:21 EDT
the birtworld blog show how to include tribix emitter into web viewer.
Do you know the way to do the same with a the runtime engine ?
Comment 9 Jason Weathersby CLA 2011-08-12 10:19:11 EDT
You would use the same approach, except instead of copying to the web-inf/lib you would just add the jar(s) to the classpath like the reportengine/lib jars.
Comment 10 julien.pellissier CLA 2011-09-05 05:02:42 EDT
(In reply to comment #9)
> You would use the same approach, except instead of copying to the web-inf/lib
> you would just add the jar(s) to the classpath like the reportengine/lib jars.

Thx Jason it's working well
Comment 11 Tim hardcastle CLA 2012-01-12 16:05:21 EST
(In reply to comment #10)
> (In reply to comment #9)
> > You would use the same approach, except instead of copying to the web-inf/lib
> > you would just add the jar(s) to the classpath like the reportengine/lib jars.
> Thx Jason it's working well

Julie - Can you clarify how you got this to work?

I have installed the BIRT Runtime 3.7 and I am using the genReport.bat file to help automate some monthly reports.

I would like to be able to replace the default xls emitter.