Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[birt-dev] Am getting the error - java.lang.NoSuchMethodError: org.eclipse.birt.report.engine.api.EngineConfig.getLogger()Ljava/util/logging/Logger

Hi,

 

I have upgraded BIRT-runtime from BIRT- 2.1.3 to BIRT-2.2.2. I am facing some code issues due to this upgrade/migration as below.

 

Public static void createReport() {

 

  IReportEngine engine = null;

  EngineConfig config = null;

  IReportRunnable design = null;

  HashMap appContext = new HashMap();

 

  try {

 

            config = new EngineConfig();

            config.setEngineHome("D:/eclipse-BIRT2.2.2/birt-runtime-2_2_2/ReportEngine");    

            config.setLogConfig(LOGDIR, Level.FINE);

            config.setResourcePath(RPTLIBPATH);

            Platform.startup(config);

            IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObjectIReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);

            engine = factory.createReportEngine(config);

            design = engine.openReportDesign(RPTBASEPATH +ReportName+".rptdesign");IRunAndRenderTask runRenderTask =          engine.createRunAndRenderTask(design);

            PDFRenderContext renderContext = new PDFRenderContext();

            appContext.put(EngineConstants.APPCONTEXT_PDF_RENDER_CONTEXT,renderContext);

            RenderOptionBase options = new RenderOptionBase();

            options.setOutputFileName(RPTOUTPUTDIR + ReportName + “.pdf");

            options.setOutputFormat(".pdf");

            runRenderTask.setRenderOption(options);

            runRenderTask.setAppContext(appContext);

            runRenderTask.addScriptableJavaObject("reportData", data);

            runAndRenderReport(runRenderTask, engine);

      }

}

   

When I run this code, I get the following error –

 

Exception in thread "main" java.lang.NoSuchMethodError: org.eclipse.birt.report.engine.api.EngineConfig.getLogger()Ljava/util/logging/Logger;

            at org.eclipse.birt.report.engine.api.impl.ReportEngine.intializeLogger(ReportEngine.java:108)

            at org.eclipse.birt.report.engine.api.impl.ReportEngine.<init>(ReportEngine.java:89)

            at org.eclipse.birt.report.engine.api.impl.ReportEngineFactory.createReportEngine(ReportEngineFactory.java:13)

           

 

Request you to kindly suggest/advice what changes needs to be done in the above code as part of the upgrade.

 

Thanks & Regards,

Roopa Kamath.

   

  


Back to the top