Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Birt platform problem when rendering charts
Birt platform problem when rendering charts [message #759757] Tue, 29 November 2011 20:43 Go to next message
Anton is currently offline AntonFriend
Messages: 23
Registered: July 2009
Junior Member
I have two scenarios:

1) Render a chart to an image
2) Load a rptdesign file, read a chart and render it to an image.

I have described a problem with the rendered image in scenario 1) in a
previous post.

In scenario 2) I don't even get to render the image, the application fails
in this line:

gcs = gr.build(dServer, chart, bo, null, null, null);

with the error:


org.eclipse.birt.chart.exception.ChartException: CREATE_EXTENSION_FAIL
at
org.eclipse.birt.chart.util.PluginSettings.getPluginXmlObject(PluginSettings.java:1257)
at
org.eclipse.birt.chart.util.PluginSettings.getRenderer(PluginSettings.java:563)
at
org.eclipse.birt.chart.render.BaseRenderer.instances(BaseRenderer.java:2214)
at org.eclipse.birt.chart.factory.Generator.build(Generator.java:1060)
.....
Caused by: org.eclipse.birt.core.framework.FrameworkException:
CREATE_EXTENSION_FAIL
at
org.eclipse.birt.core.framework.eclipse.EclipseConfigurationElement.createExecutableExtension(EclipseConfigurationElement.java:39)
at
org.eclipse.birt.chart.util.PluginSettings.getPluginXmlObject(PluginSettings.java:1253)
... 38 more
Caused by: org.eclipse.core.runtime.CoreException: Plug-in
org.eclipse.birt.chart.engine.extension was unable to load class
org.eclipse.birt.chart.extension.render.Line.
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:176)
at
org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:904)
at
org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at
org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at
org.eclipse.birt.core.framework.eclipse.EclipseConfigurationElement.createExecutableExtension(EclipseConfigurationElement.java:35)
... 39 more
Caused by:
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException:
An error occurred while automatically activating bundle
org.eclipse.birt.chart.engine.extension (29).
at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:121)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:453)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at
org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)




In scenario 2) the code that loads the rptdesign file is in one project and
the code that renders the chart is in another project. When I load the
rptdesign I set the BIRT_HOME to my local birt rte:

try {
designConfig.setProperty("BIRT_HOME","C:\\birt-runtime-2_6_1\\ReportEngine");
Platform.startup(designConfig);
IDesignEngineFactory designFactory = (IDesignEngineFactory)
Platform.createFactoryObject(IDesignEngineFactory.EXTENSION_DESIGN_ENGINE_FACTORY);
IDesignEngine designEngine =
designFactory.createDesignEngine(designConfig);
session = designEngine.newSessionHandle(ULocale.ENGLISH);
} catch (Exception e) {
logEngineError(e);
}


In the code for rendering the chart I have tried various approaches:

PlatformConfig pf = new PlatformConfig();
//pf.setBIRTHome("C:\\birt-runtime-2_6_1\\ReportEngine");
// pf.setProperty("STANDALONE", true);
// Returns a singleton instance of the Chart Engine
ChartEngine ce = ChartEngine.instance(pf);
IGenerator gr = ce.getGenerator();

But I get the same error. Any ideas why my application fails when I start
with loading a rptdesign file?

The jar: org.eclipse.birt.chart.engine.extension_2.6.1.v20100902.jar is both
on the build path (added as a maven dependency) of my project and in the:
C:\birt-runtime-2_6_1\ReportEngine\plugins folder.





Maybe its related to this post:
http://www.eclipse.org/forums/index.php/mv/tree/157384/#page_top
Re: Birt platform problem when rendering charts [message #759769 is a reply to message #759757] Tue, 29 November 2011 21:43 Go to previous messageGo to next message
Anton is currently offline AntonFriend
Messages: 23
Registered: July 2009
Junior Member
I have nailed down to where the error occurs. At runtime I update some
values on a Series object with a NumberDataSet:

Double[] arr = new Double[values.size()];
for (int i = 0; i < arr.length; i++) {
Float val = values.get(i);
if (val != null) {
arr[i] = new Double(val);
}
}

NumberDataSet seriesValues = NumberDataSetImpl.create(arr);
EList<Series> series = seriesDef.getSeries();
Series serie = series.get(0);
serie.setDataSet(seriesValues);
testChartRender(chart);

when I try to render the chart after the serie.setDataSet(seriesValues) call
I get the error. The dataSet:

DataSet dataSet = serie.getDataSet();

is null. But why does the call:

serie.setDataSet(seriesValues);

prevent the chart from being rendered and why such a wierd error message?






"Anton" wrote in message news:jb3g59$fs8$1@news.eclipse.org...

I have two scenarios:

1) Render a chart to an image
2) Load a rptdesign file, read a chart and render it to an image.

I have described a problem with the rendered image in scenario 1) in a
previous post.

In scenario 2) I don't even get to render the image, the application fails
in this line:

gcs = gr.build(dServer, chart, bo, null, null, null);

with the error:


org.eclipse.birt.chart.exception.ChartException: CREATE_EXTENSION_FAIL
at
org.eclipse.birt.chart.util.PluginSettings.getPluginXmlObject(PluginSettings.java:1257)
at
org.eclipse.birt.chart.util.PluginSettings.getRenderer(PluginSettings.java:563)
at
org.eclipse.birt.chart.render.BaseRenderer.instances(BaseRenderer.java:2214)
at org.eclipse.birt.chart.factory.Generator.build(Generator.java:1060)
.....
Caused by: org.eclipse.birt.core.framework.FrameworkException:
CREATE_EXTENSION_FAIL
at
org.eclipse.birt.core.framework.eclipse.EclipseConfigurationElement.createExecutableExtension(EclipseConfigurationElement.java:39)
at
org.eclipse.birt.chart.util.PluginSettings.getPluginXmlObject(PluginSettings.java:1253)
... 38 more
Caused by: org.eclipse.core.runtime.CoreException: Plug-in
org.eclipse.birt.chart.engine.extension was unable to load class
org.eclipse.birt.chart.extension.render.Line.
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:176)
at
org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:904)
at
org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at
org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at
org.eclipse.birt.core.framework.eclipse.EclipseConfigurationElement.createExecutableExtension(EclipseConfigurationElement.java:35)
... 39 more
Caused by:
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException:
An error occurred while automatically activating bundle
org.eclipse.birt.chart.engine.extension (29).
at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:121)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:453)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at
org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)




In scenario 2) the code that loads the rptdesign file is in one project and
the code that renders the chart is in another project. When I load the
rptdesign I set the BIRT_HOME to my local birt rte:

try {
designConfig.setProperty("BIRT_HOME","C:\\birt-runtime-2_6_1\\ReportEngine");
Platform.startup(designConfig);
IDesignEngineFactory designFactory = (IDesignEngineFactory)
Platform.createFactoryObject(IDesignEngineFactory.EXTENSION_DESIGN_ENGINE_FACTORY);
IDesignEngine designEngine =
designFactory.createDesignEngine(designConfig);
session = designEngine.newSessionHandle(ULocale.ENGLISH);
} catch (Exception e) {
logEngineError(e);
}


In the code for rendering the chart I have tried various approaches:

PlatformConfig pf = new PlatformConfig();
//pf.setBIRTHome("C:\\birt-runtime-2_6_1\\ReportEngine");
// pf.setProperty("STANDALONE", true);
// Returns a singleton instance of the Chart Engine
ChartEngine ce = ChartEngine.instance(pf);
IGenerator gr = ce.getGenerator();

But I get the same error. Any ideas why my application fails when I start
with loading a rptdesign file?

The jar: org.eclipse.birt.chart.engine.extension_2.6.1.v20100902.jar is both
on the build path (added as a maven dependency) of my project and in the:
C:\birt-runtime-2_6_1\ReportEngine\plugins folder.





Maybe its related to this post:
http://www.eclipse.org/forums/index.php/mv/tree/157384/#page_top
Re: Birt platform problem when rendering charts [message #759950 is a reply to message #759769] Wed, 30 November 2011 16:37 Go to previous message
js Missing name is currently offline js Missing nameFriend
Messages: 73
Registered: July 2009
Member
I have solved the problem my removing the chartdeviceextension and the chartengineextension libs from my dependencies. They should only be referenced from the birt rte.

[Updated on: Wed, 30 November 2011 16:39]

Report message to a moderator

Previous Topic:TUBE CHART NULL VALUES
Next Topic:Significance of engine parameters
Goto Forum:
  


Current Time: Thu Apr 25 05:00:39 GMT 2024

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

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

Back to the top