Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Runtime error while using BIRT homemade emitter(xml emitter birt )
Runtime error while using BIRT homemade emitter [message #1700931] Wed, 08 July 2015 09:24 Go to next message
malnoe carolin is currently offline malnoe carolinFriend
Messages: 2
Registered: July 2015
Junior Member
Hi,

I'm using birt to generate xml files.

In order to do that, i created a plugin : org.eclipse.birt.report.engine.emitter.xml.XMLReportEmitter.

From this plugin, i generate a jar that i'm using in a war to create the xml file.



So I have two projects : the emitter plugin and the web app using it.



While calling this plugin (jar) from the web app on the production server, i got this error : (In the test server it's fine)



juil. 06, 2015 2:37:44 PM org.eclipse.birt.report.engine.api.impl.EngineTask createContentEmitter
GRAVE: Report engine can not create emitter org.eclipse.birt.report.engine.emitter.xml.XMLReportEmitter.
juil. 06, 2015 2:37:44 PM org.eclipse.birt.report.engine.api.impl.EngineTask handleFatalExceptions
GRAVE: An error happened while running the report. Cause:
org.eclipse.birt.report.engine.api.EngineException: Report engine fails to initialize org.eclipse.birt.report.engine.emitter.xml.XMLReportEmitter emitter, please make sure required libraries for this emitter are installed.
at org.eclipse.birt.report.engine.api.impl.EngineTask.createContentEmitter(EngineTask.java:1763)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:106)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
at fr.inra.means.birt.report.BirtView.runReportEngine(BirtView.java:232)
at fr.inra.means.birt.report.BirtView.renderMergedOutputModel(BirtView.java:123)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:262)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1180)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:950)
[...]
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: org/eclipse/birt/report/engine/emitter/ContentEmitterAdapter
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:412)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1456)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:191)
at org.eclipse.birt.core.framework.jar.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:46)
at org.eclipse.birt.core.framework.eclipse.EclipseConfigurationElement.createExecutableExtension(EclipseConfigurationElement.java:35)
at org.eclipse.birt.report.engine.extension.internal.ExtensionManager.createObject(ExtensionManager.java:482)
at org.eclipse.birt.report.engine.extension.internal.ExtensionManager.createEmitter(ExtensionManager.java:312)
at org.eclipse.birt.report.engine.api.impl.EngineTask.createContentEmitter(EngineTask.java:1757)
... 68 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.birt.report.engine.emitter.ContentEmitterAdapter
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 89 more



Both of my servers (prod and test) have the same config (windows servers/glassfish 3.1.2.2, java 7 (u67).



In order to call the emitter, i do :

final IRenderOption xmlOptions = new RenderOption(options);
xmlOptions.setOutputFormat("xml");
xmlOptions.setOutputStream(response);
runAndRenderTask.setRenderOption(xmlOptions);
runAndRenderTask.setEmitterID("org.eclipse.birt.report.engine.emitter.xml.XMLReportEmitter");



My dependencies for the report in the war are :



<dependency>
<groupId>org.eclipse.birt.runtime</groupId>
<artifactId>org.eclipse.birt.runtime</artifactId>
<version>4.3.1</version>
</dependency>



and the jar generated from the plugin using tycho.

<dependency>
<groupId>
org.eclipse.birt.report.engine.emitter.xml
</groupId>
<artifactId>
org.eclipse.birt.report.engine.emitter.xml.XMLReportEmitter
</artifactId>
<version>${plugin-emitter-xml}</version>
</dependency>
The emitter plugin is attached.

Do you have any clues? Do I need to register in an other way this plugin? (how does it work?), on glassfish?

I looks like it depends on the environnement as it works fine in my test web server but not in my prod server.

I put my 2 environnements on debug mode FINEST : It looks like it doesn't execute the same way (not same logs)

In the prod server (error) i got :

juil. 07, 2015 11:46:25 AM org.eclipse.birt.report.engine.api.impl.EngineTask loggerParamters
PRÉCIS: Running the report with paramters: etapeID:21
resID:3
nbRow:84
baseProd:1

juil. 07, 2015 11:46:25 AM org.eclipse.birt.report.engine.api.impl.EngineTask createContentEmitter
GRAVE: Report engine can not create emitter org.eclipse.birt.report.engine.emitter.xml.XMLReportEmitter.
juil. 07, 2015 11:46:25 AM org.eclipse.birt.report.engine.api.impl.EngineTask handleFatalExceptions
GRAVE: An error happened while running the report. Cause:
org.eclipse.birt.report.engine.api.EngineException: Report engine fails to initialize org.eclipse.birt.report.engine.emitter.xml.XMLReportEmitter emitter, please make sure required libraries for this emitter are installed.
at org.eclipse.birt.report.engine.api.impl.EngineTask.createContentEmitter(EngineTask.java:1763)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:106)

--------------

For the same action in the test server (fine), i got :



PRÉCIS: EngineTask.setParameterValue: etapeID=582 [java.lang.Integer]
juil. 06, 2015 9:58:34 AM org.eclipse.birt.report.engine.api.impl.EngineTask loggerParamters
PRÉCIS: Running the report with paramters: etapeID:582
resID:442
nbRow:84
baseProd:0

juil. 06, 2015 9:58:40 AM org.eclipse.birt.data.engine.api.DataEngineContext
DataEngineContext
PLUS PRÉCIS: ENTRY 3 [object Object] null null org.eclipse.birt.report.engine.executor.ApplicationClassLoader@7bb71a8f
juil. 06, 2015 9:58:40 AM org.eclipse.birt.data.engine.api.DataEngineContext DataEngineContext
PLUS PRÉCIS: RETURN
juil. 06, 2015 9:58:40 AM org.eclipse.birt.data.engine.impl.DataEngineImpl DataEngineImpl
PLUS PRÉCIS: ENTRY org.eclipse.birt.data.engine.api.DataEngineContext@11dc4de6
juil. 06, 2015 9:58:40 AM org.eclipse.birt.data.engine.impl.DataEngineSession DataEngineSession


Should I do something specific to add it to the classpath? (in glassfish)? I tried putting this jar(org.eclipse.birt.runtime-4.3.1.jar) in the lib/endorsed of glassfish which leads me to deployment errors...



Thanks in advance,



Caroline

Re: Runtime error while using BIRT homemade emitter [message #1779107 is a reply to message #1700931] Tue, 02 January 2018 21:11 Go to previous message
Rodrigo Alvarenga is currently offline Rodrigo AlvarengaFriend
Messages: 3
Registered: January 2018
Junior Member
Dear malnoe.carolin

Could you solve the problem mentioned above?

Could you please share your solution?

Tks,
Previous Topic:Dynamic Master Page footer based on XML data field
Next Topic:Free QRCode generator for maximo BIRT 3.7
Goto Forum:
  


Current Time: Sat Aug 18 10:11:39 GMT 2018

Powered by FUDForum. Page generated in 0.01956 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top