Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Problem starting up BIRT Platform
paul.mariage
<p>Hi.</p><p> </p><p>I'm currently making a web application using BIRT.</p><p> </p><p>It uses both Actuate Birt Viewer and generate daily reports using quartz and Birt Report Engine.</p><p> </p><p>I have a problem with my application. Here is the code i'm using : </p><pre class="_prettyXprint"> EngineConfig config = new EngineConfig(); config.setBIRTHome(ENGINE_PATH); System.out.println("Birt home : "+config.getBIRTHome()); Platform.startup(config); System.out.println("Plateforme démarrée"); IReportEngineFactory factory = (IReportEngineFactory) Platform .createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY); if (config!=null){System.out.println("Config non null");} if (factory!=null){System.out.println("factory non null : "+factory.toString());} engine = factory.createReportEngine(config); if (engine!=null){System.out.println("engine non null : "+engine.getVersion());} System.out.println("reportEngine crée");</pre><p>When i am trying to generate a daily report, i have the following error : </p><p> </p><blockquote class="ipsBlockquote"><p> </p><p>Grave: Job DEFAULT.TestJob threw an unhandled Exception: </p><div>java.lang.NoClassDefFoundError: org/eclipse/core/runtime/spi/IRegistryProvider</div><div>at org.eclipse.birt.core.framework.Platform.createPlatformLauncher(Platform.java:115)</div><div>at org.eclipse.birt.core.framework.Platform.startup(Platform.java:74)</div><div>at org.eclipse.birt.core.framework.Platform.startup(Platform.java:57)</div><div>at background.jobs.jobsMethods.genererRapport(jobsMethods.java:214)</div><div>at background.jobs.DailyUpdate.execute(DailyUpdate.java:55)</div><div>at org.quartz.core.JobRunShell.run(JobRunShell.java:202)</div><div>at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)</div><div>Caused by: java.lang.ClassNotFoundException: org.eclipse.core.runtime.spi.IRegistryProvider</div><div>at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1718)</div><div>at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1569)</div><div>... 7 more</div><div> </div><div>juil. 01, 2014 3:18:00 PM org.quartz.core.ErrorLogger schedulerError</div><div>Grave: Job (DEFAULT.TestJob threw an exception.</div><div>org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NoClassDefFoundError: org/eclipse/core/runtime/spi/IRegistryProvider]</div><div>at org.quartz.core.JobRunShell.run(JobRunShell.java:213)</div><div>at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)</div><div>Caused by: java.lang.NoClassDefFoundError: org/eclipse/core/runtime/spi/IRegistryProvider</div><div>at org.eclipse.birt.core.framework.Platform.createPlatformLauncher(Platform.java:115)</div><div>at org.eclipse.birt.core.framework.Platform.startup(Platform.java:74)</div><div>at org.eclipse.birt.core.framework.Platform.startup(Platform.java:57)</div><div>at background.jobs.jobsMethods.genererRapport(jobsMethods.java:214)</div><div>at background.jobs.DailyUpdate.execute(DailyUpdate.java:55)</div><div>at org.quartz.core.JobRunShell.run(JobRunShell.java:202)</div><div>... 1 more</div><div>Caused by: java.lang.ClassNotFoundException: org.eclipse.core.runtime.spi.IRegistryProvider</div><div>at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1718)</div><div>at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1569)</div><div>... 7 more</div></blockquote><p> </p><p>It seems like there is a library missing, but when i launch the Actuate Birt Viewer, this exception isn't thrown anymore.</p><p> </p><p>I try to understand what the Actuate Birt Viewer is doing that i'm not doing too..</p><p> </p><p>Can you help me?</p><p> </p><p>Thank you</p>
Find more posts tagged with
Comments
mwilliams
<p>What version of BIRT are you using? If 3.7+, are you using the OSGi Runtime or the main runtime download (POJO runtime)?</p>
Venkat Royyuru
<div>Hi</div>
<div> </div>
<div>I'm getting the below exception when i run the BIRT. I downloaded the latest version of the BIRT software i.e., 4.5.0 and tried to execute the below code </div>
<div> </div>
<div>
<div>/**</div>
<div> * </div>
<div> */</div>
<div>package com.pack.message;</div>
<div> </div>
<div>/**</div>
<div> *
@author
venkata.subrahmanya</div>
<div> *</div>
<div> */</div>
<div>import java.io.IOException;</div>
<div> </div>
<div>import org.eclipse.birt.core.framework.Platform;</div>
<div>import org.eclipse.birt.report.model.api.CellHandle;</div>
<div>import org.eclipse.birt.report.model.api.DesignConfig;</div>
<div>import org.eclipse.birt.report.model.api.DesignElementHandle;</div>
<div>import org.eclipse.birt.report.model.api.DesignEngine;</div>
<div>import org.eclipse.birt.report.model.api.ElementFactory;</div>
<div>import org.eclipse.birt.report.model.api.GridHandle;</div>
<div>import org.eclipse.birt.report.model.api.IDesignEngine;</div>
<div>import org.eclipse.birt.report.model.api.IDesignEngineFactory;</div>
<div>import org.eclipse.birt.report.model.api.ImageHandle;</div>
<div>import org.eclipse.birt.report.model.api.LabelHandle;</div>
<div>import org.eclipse.birt.report.model.api.ReportDesignHandle;</div>
<div>import org.eclipse.birt.report.model.api.RowHandle;</div>
<div>import org.eclipse.birt.report.model.api.SessionHandle;</div>
<div>import org.eclipse.birt.report.model.api.activity.SemanticException;</div>
<div> </div>
<div>import com.ibm.icu.util.ULocale;</div>
<div> </div>
<div>/**</div>
<div> * Simple BIRT Design Engine API (DEAPI) demo.</div>
<div> */</div>
<div> </div>
<div>public class DeDemo</div>
<div>{</div>
<div> </div>
<div>public static void main( String[] args )</div>
<div>{</div>
<div>try</div>
<div>{</div>
<div>buildReport( );</div>
<div>}</div>
<div>catch ( IOException e )</div>
<div>{</div>
<div>// TODO Auto-generated catch block</div>
<div>e.printStackTrace();</div>
<div>}</div>
<div>catch ( SemanticException e )</div>
<div>{</div>
<div>// TODO Auto-generated catch block</div>
<div>e.printStackTrace();</div>
<div>}</div>
<div>}</div>
<div> </div>
<div>// This function shows how to build a very simple BIRT report with a</div>
<div>// minimal set of content: a simple grid with an image and a label.</div>
<div> </div>
<div>static void buildReport( ) throws IOException, SemanticException</div>
<div>{</div>
<div>// Create a session handle. This is used to manage all open designs.</div>
<div>// Your app need create the session only once.</div>
<div> </div>
<div> </div>
<div>//Configure the Engine and start the Platform</div>
<div>DesignConfig config = new DesignConfig( );</div>
<div> </div>
<div>config.setProperty("BIRT_HOME", "E:\\Desktop\\BIRT SOFTWARE\\venkat\\software\\birt-runtime-4_5_0\\ReportEngine");</div>
<div>IDesignEngine engine = null;</div>
<div>try{</div>
<div>Platform.startup(config);</div>
<div>IDesignEngineFactory factory = (IDesignEngineFactory) Platform</div>
<div>.createFactoryObject( IDesignEngineFactory.EXTENSION_DESIGN_ENGINE_FACTORY );</div>
<div>engine = factory.createDesignEngine( config );</div>
<div> </div>
<div>}catch( Exception ex){</div>
<div>ex.printStackTrace();</div>
<div>}<span> </span></div>
<div>SessionHandle session = engine.newSessionHandle( ULocale.ENGLISH ) ;</div>
<div> </div>
<div>// Create a new report design.</div>
<div> </div>
<div>ReportDesignHandle design = session.createDesign( );</div>
<div> </div>
<div>// The element factory creates instances of the various BIRT elements.</div>
<div> </div>
<div>ElementFactory factory = design.getElementFactory( );</div>
<div> </div>
<div>// Create a simple master page that describes how the report will</div>
<div>// appear when printed.</div>
<div>//</div>
<div>// Note: The report will fail to load in the BIRT designer</div>
<div>// unless you create a master page.</div>
<div> </div>
<div>DesignElementHandle element = factory.newSimpleMasterPage( "Page Master" ); </div>
<div>design.getMasterPages( ).add( element );</div>
<div> </div>
<div>// Create a grid and add it to the "body" slot of the report</div>
<div>// design.</div>
<div> </div>
<div>GridHandle grid = factory.newGridItem( null, 2 /* cols */, 1 /* row */ );</div>
<div>design.getBody( ).add( grid );</div>
<div> </div>
<div>// Note: Set the table width to 100% to prevent the label</div>
<div>// from appearing too narrow in the layout view.</div>
<div> </div>
<div>grid.setWidth( "100%" ); //$NON-NLS-1$</div>
<div> </div>
<div>// Get the first row.</div>
<div> </div>
<div>RowHandle row = (RowHandle) grid.getRows( ).get( 0 );</div>
<div> </div>
<div>// Create an image and add it to the first cell.</div>
<div> </div>
<div>ImageHandle image = factory.newImage( null );</div>
<div>CellHandle cell = (CellHandle) row.getCells( ).get( 0 );</div>
<div>cell.getContent( ).add( image );</div>
<div>image.setURL( "\"<a data-ipb='nomediaparse' href='
http://www.eclipse.org/birt/phoenix/tutorial/basic/multichip-4.jpg\'>http://www.eclipse.org/birt/phoenix/tutorial/basic/multichip-4.jpg\""</a>)
; </div>
<div> </div>
<div>// Create a label and add it to the second cell.</div>
<div> </div>
<div>LabelHandle label = factory.newLabel( null );</div>
<div>cell = (CellHandle) row.getCells( ).get( 1 );</div>
<div>cell.getContent( ).add( label );</div>
<div>label.setText( "Hello, world!" ); </div>
<div> </div>
<div> </div>
<div> </div>
<div>design.saveAs( "c:/tmp/sample.rptdesign" ); </div>
<div>design.close( );</div>
<div>System.out.println("Finished");</div>
<div> </div>
<div> </div>
<div>}</div>
<div>}</div>
<div> </div>
<div>I'm getting the below exception, Please help me resolve this issue.</div>
<div>I'm not sure which Library i need to add to build path to resolve the issue.</div>
</div>
<div> </div>
<div>Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/core/runtime/spi/IRegistryProvider</div>
<div>at org.eclipse.birt.core.framework.Platform.createPlatformLauncher(Platform.java:115)</div>
<div>at org.eclipse.birt.core.framework.Platform.startup(Platform.java:74)</div>
<div>at com.pack.message.DeDemo.buildReport(DeDemo.java:70)</div>
<div>at com.pack.message.DeDemo.main(DeDemo.java:41)</div>
<div>Caused by: java.lang.ClassNotFoundException: org.eclipse.core.runtime.spi.IRegistryProvider</div>
<div>at java.net.URLClassLoader$1.run(Unknown Source)</div>
<div>at java.net.URLClassLoader$1.run(Unknown Source)</div>
<div>at java.security.AccessController.doPrivileged(Native Method)</div>
<div>at java.net.URLClassLoader.findClass(Unknown Source)</div>
<div>at java.lang.ClassLoader.loadClass(Unknown Source)</div>
<div>at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)</div>
<div>at java.lang.ClassLoader.loadClass(Unknown Source)</div>
<div>... 4 more</div>