Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Are all Birt plugins needed for a simple report ??
sgeovar
Hi
There are huge bulk of plugins in the plugin directory.
To create a simple report , are all these plugins needed ??
I tried to remove the unwanted plugins.
But I get Nullpointer Exception and Assertion errors.
I am not able to delete even a single plugin eventhough it is not necessary.
Is there any possibility avalible to use only necessary plugins ?
Why Birt application throws error if unwanted plugins are removed ??
Please help me to resolve this issue.
Thanks
Find more posts tagged with
Comments
JasonW
Which plugin did you remove. There are several plugins that can be removed if you do not plan on using all BIRT features.
Jason
sgeovar
I used the following plugins only. I removed all other plugins
org.eclipse.osgi.services_3.2.0.v20090520-1800.jar
org.eclipse.osgi_3.5.2.R35x_v20100126.jar
org.eclipse.birt.api_1.0.0.jar
org.eclipse.birt.core_2.5.2.v20100208.jar
org.eclipse.birt.report.engine.emitter.pdf_2.5.2.v20100129.jar
org.eclipse.birt.report.engine_2.5.2.v20100210.jar
My servlet invokes Birtengine and get the PDF report.
Engine failes to start. I get NullpointerException and some times AssertionsException
Birtengine code follows.
import java.io.InputStream;
import java.io.IOException;
import java.util.Properties;
import java.util.logging.Level;
import org.eclipse.birt.report.engine.api.EngineConfig;
import org.eclipse.birt.report.engine.api.IReportEngine;
import javax.servlet.*;
import org.eclipse.birt.core.framework.PlatformServletContext;
import org.eclipse.birt.core.framework.IPlatformContext;
import org.eclipse.birt.core.framework.Platform;
import org.eclipse.birt.core.exception.BirtException;
import org.eclipse.birt.report.engine.api.IReportEngineFactory;
public class BirtEngine {
private static IReportEngine birtEngine = null;
private static Properties configProps = new Properties();
private final static String configFile = "BirtConfig.properties";
public static synchronized void initBirtConfig() {
loadEngineProps();
}
public static synchronized IReportEngine getBirtEngine(ServletContext sc) {
if (birtEngine == null) {
EngineConfig config = new EngineConfig();
if (configProps != null) {
String logLevel = configProps.getProperty("logLevel");
Level level = Level.OFF;
if ("SEVERE".equalsIgnoreCase(logLevel)) {
level = Level.SEVERE;
} else if ("WARNING".equalsIgnoreCase(logLevel)) {
level = Level.WARNING;
} else if ("INFO".equalsIgnoreCase(logLevel)) {
level = Level.INFO;
} else if ("CONFIG".equalsIgnoreCase(logLevel)) {
level = Level.CONFIG;
} else if ("FINE".equalsIgnoreCase(logLevel)) {
level = Level.FINE;
} else if ("FINER".equalsIgnoreCase(logLevel)) {
level = Level.FINER;
} else if ("FINEST".equalsIgnoreCase(logLevel)) {
level = Level.FINEST;
} else if ("OFF".equalsIgnoreCase(logLevel)) {
level = Level.OFF;
}
config.setLogConfig(configProps.getProperty("logDirectory"),
level);
}
config.setEngineHome("");
IPlatformContext context = new PlatformServletContext(sc);
config.setPlatformContext(context);
try {
Platform.startup(config);
} catch (BirtException e) {
e.printStackTrace();
}
IReportEngineFactory factory = (IReportEngineFactory) Platform
.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
birtEngine = factory.createReportEngine(config);
}
return birtEngine;
}
public static synchronized void destroyBirtEngine() {
if (birtEngine == null) {
return;
}
birtEngine.shutdown();
Platform.shutdown();
birtEngine = null;
}
public Object clone() throws CloneNotSupportedException {
throw new CloneNotSupportedException();
}
private static void loadEngineProps() {
try {
// Config File must be in classpath
ClassLoader cl = Thread.currentThread().getContextClassLoader();
InputStream in = null;
in = cl.getResourceAsStream(configFile);
configProps.load(in);
in.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
sgeovar
Hi Jason,
My application is very simple. I created a Report using Eclipse Birt.
This report has a table and uses "SCRIPT DATE SOURCE".
It has been deployed in Weblogic as a webapp.
I invoke a servlet, to get the PDF report.
I used the following plugins only. I removed all other plugins
org.eclipse.osgi.services_3.2.0.v20090520-1800.jar
org.eclipse.osgi_3.5.2.R35x_v20100126.jar
org.eclipse.birt.api_1.0.0.jar
org.eclipse.birt.core_2.5.2.v20100208.jar
org.eclipse.birt.report.engine.emitter.pdf_2.5.2.v20100129.jar
org.eclipse.birt.report.engine_2.5.2.v20100210.jar
My servlet invokes Birtengine and get the PDF report.
Engine failes to start. I get NullpointerException and some times AssertionsException
Please help to fix this issue
Thanks
JasonW
You will need more plugins than that. Do you need charting or crosstabs?
Jason
sgeovar
No, I don't need charting or crossbars.
It is a simple table report.
Table has 10 columns.
Dataset open and fetch events retrive from the database. That is it calls a java class and that class
returns the list of data . These data are populated in the table.
Open event has the following code
count = 0;
dataDao = new Packages.admin.ReportDaoImpl();
data123 = dataDao.getTrades4(begin, end,fileid);
Fetch event has the following code
if(count < data123.size()){
row["account"] = data123.get(count).getAccountId();
count++;
return true;
}
return false;
JasonW
I reduced it some in the following list. It can probably be made smaller. BTW this was with 2.5.1
om.ibm.icu_4.0.1.v20090822.jar
com.lowagie.itext_1.5.4.v20090305
org.apache.batik.bridge_1.6.0.v200805290154.jar
org.apache.batik.css_1.6.0.v200805290154.jar
org.apache.batik.dom.svg_1.6.0.v200805290154.jar
org.apache.batik.dom_1.6.0.v200805290154.jar
org.apache.batik.ext.awt_1.6.0.v200805290154.jar
org.apache.batik.parser_1.6.0.v200805290154.jar
org.apache.batik.pdf_1.6.0.v200806031500.jar
org.apache.batik.svggen_1.6.0.v200805290154.jar
org.apache.batik.transcoder_1.6.0.v200805290154.jar
org.apache.batik.util.gui_1.6.0.v200805290154.jar
org.apache.batik.util_1.6.0.v200805290154.jar
org.apache.batik.xml_1.6.0.v200805290154.jar
org.apache.commons.codec_1.3.0.v20080530-1600.jar
org.eclipse.birt.api_1.0.0.jar
org.eclipse.birt.core.script.function_2.5.1.v20090917.jar
org.eclipse.birt.core_2.5.1.v20090903.jar
org.eclipse.birt.data.aggregation_2.5.1.v20090821.jar
org.eclipse.birt.data_2.5.1.v20090826.jar
org.eclipse.birt.report.data.adapter_2.5.1.v20090903.jar
org.eclipse.birt.report.engine.emitter.config_2.5.1.v20090821.jar
org.eclipse.birt.report.engine.emitter.html.config_2.5.1.v20090917.jar
org.eclipse.birt.report.engine.emitter.html_2.5.1.v20090903.jar
org.eclipse.birt.report.engine.emitter.pdf.config_2.5.1.v20090917.jar
org.eclipse.birt.report.engine.emitter.pdf_2.5.1.v20090821.jar
org.eclipse.birt.report.engine.fonts_2.5.1.v20090821
org.eclipse.birt.report.engine.script.javascript_2.5.1.v20090917.jar
org.eclipse.birt.report.engine_2.5.1.v20090916.jar
org.eclipse.birt.report.model.adapter.oda_2.5.1.v20090904.jar
org.eclipse.birt.report.model_2.5.1.v20090904.jar
org.eclipse.core.contenttype_3.4.1.R35x_v20090826-0451.jar
org.eclipse.core.expressions_3.4.100.v20090429-1800.jar
org.eclipse.core.filesystem_1.2.0.v20090507.jar
org.eclipse.core.jobs_3.4.100.v20090429-1800.jar
org.eclipse.core.resources_3.5.1.R35x_v20090826-0451.jar
org.eclipse.core.runtime.compatibility.auth_3.2.100.v20090413.jar
org.eclipse.core.runtime.compatibility.registry_3.2.200.v20090429-1800
org.eclipse.core.runtime.compatibility_3.2.0.v20090413.jar
org.eclipse.core.runtime_3.5.0.v20090525.jar
org.eclipse.datatools.connectivity.oda.consumer_3.2.1.v200908281118.jar
org.eclipse.datatools.connectivity.oda.design_3.2.1.v200909020856.jar
org.eclipse.datatools.connectivity.oda.profile_3.2.0.v200906020553.jar
org.eclipse.datatools.connectivity.oda_3.2.1.v200909031448.jar
org.eclipse.datatools.connectivity_1.1.2.v200908180040.jar
org.eclipse.equinox.app_1.2.0.v20090520-1800.jar
org.eclipse.equinox.common_3.5.1.R35x_v20090807-1100.jar
org.eclipse.equinox.preferences_3.2.300.v20090520-1800.jar
org.eclipse.equinox.registry_3.4.100.v20090520-1800.jar
org.eclipse.osgi.services_3.2.0.v20090520-1800.jar
org.eclipse.osgi_3.5.1.R35x_v20090827.jar
org.eclipse.update.configurator_3.3.0.v20090312.jar
org.mozilla.rhino_1.7.1.v20090521
org.w3c.css.sac_1.3.0.v200805290154.jar
org.w3c.dom.smil_1.0.0.v200806040011.jar
org.w3c.dom.svg_1.1.0.v200806040011.jar
org.w3c.sac_1.3.0.v20070710
JasonW
BTW we have a project in the next release to simplify this.
Jason
sgeovar
Thanks for your reply.
Let me test and get back to you.