Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » BIRT NullPointerException(BIRT NullPointerException)
BIRT NullPointerException [message #549886] Wed, 28 July 2010 07:29 Go to next message
Prashant is currently offline Prashant
Messages: 6
Registered: July 2010
Junior Member
My Report has a table connected to MySQL DB. The report is displayed correctly in preview mode of eclipse ide.
When i run the report and save it to html format using java code, it throws errors.
If my report has no dataset, it works fine from the below java code.
please help me.

Code Snippet:

public class TestBirt {

/**
* @param args
*/
public static void main(String[] args) {
IReportEngine engine = null;
EngineConfig config = null;
try {
config = new EngineConfig();
config.setEngineHome("C:/Documents and Settings/pras/Desktop/birt-runtime-2_6_0/birt-runtime-2_6_0/ ReportEngine ");
config.setLogConfig(null, Level.ALL);

Platform.startup(config);
IReportEngineFactory factory = (IReportEngineFactory) Platform
.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_E NGINE_FACTORY);
engine = factory.createReportEngine(config);
engine.changeLogLevel(Level.ALL);
IReportRunnable design = null;
design = engine.openReportDesign("Department_Report.rptdesign");
IRunAndRenderTask task = engine.createRunAndRenderTask(design);
task.getAppContext().put(EngineConstants.APPCONTEXT_CLASSLOA DER_KEY, TestBirt.class.getClassLoader());
HTMLRenderOption options = new HTMLRenderOption();
options.setOutputFileName("C:/Documents and Settings/pras/Desktop/output.html");
options.setOutputFormat("html");
task.setRenderOption(options);
task.run();
task.close();
engine.shutdown();
Platform.shutdown();
System.out.println("Finished");
} catch (Exception ex) {
ex.printStackTrace();
}
}

}


Below are the logs:

Jul 28, 2010 4:09:25 PM org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager loadDriverExtensions
INFO: Found JDBC driverinfo extension: driverClass=org.apache.derby.jdbc.EmbeddedDriver, connectionFactory=null
Jul 28, 2010 4:09:25 PM org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager loadDriverExtensions
INFO: Found JDBC driverinfo extension: driverClass=org.eclipse.birt.report.data.oda.sampledb.Driver , connectionFactory=org.eclipse.birt.report.data.oda.sampledb. SampleDBJDBCConnectionFactory
Jul 28, 2010 4:09:25 PM org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager loadAndRegisterDriver
INFO: Loading JDBC driver class: com.mysql.jdbc.Driver
Jul 28, 2010 4:09:25 PM org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager findDriver
INFO: Driver class not in class path: com.mysql.jdbc.Driver. Trying to locate driver in drivers directory
Jul 28, 2010 4:09:25 PM org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager$Driv erClassLoader addNewURL
INFO: JDBCDriverManager: found JAR file drivers/mysql-connector-java-3.1.13-bin.jar. URL= bundleentry://41.fwk15655788/drivers/mysql-connector-java-3. 1.13-bin.jar
Jul 28, 2010 4:09:26 PM org.eclipse.birt.report.engine.api.impl.RunAndRenderTask doRun
SEVERE: An error happened while running the report. Cause:
java.lang.NullPointerException
at org.eclipse.birt.report.engine.emitter.html.util.HTMLEmitter Util.buildOverflowStyle(HTMLEmitterUtil.java:289)
at org.eclipse.birt.report.engine.emitter.html.HTMLVisionOptimi ze.buildCellStyle(HTMLVisionOptimize.java:362)
at org.eclipse.birt.report.engine.emitter.html.HTMLReportEmitte r.startCell(HTMLReportEmitter.java:2135)
at org.eclipse.birt.report.engine.emitter.CompositeContentEmitt er.startCell(CompositeContentEmitter.java:233)
at org.eclipse.birt.report.engine.layout.html.HTMLTableLayoutEm itter.startCell(HTMLTableLayoutEmitter.java:701)
at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.st artContent(ContentEmitterUtil.java:59)
at org.eclipse.birt.report.engine.layout.html.buffer.DummyPageB uffer.startContainer(DummyPageBuffer.java:106)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.st art(HTMLStackingLM.java:50)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la yout(HTMLAbstractLM.java:139)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackin gLM.resumeLayout(HTMLInlineStackingLM.java:111)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackin gLM.layoutNodes(HTMLInlineStackingLM.java:160)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la youtChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la yout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking LM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la youtChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLTableBandLM.l ayoutChildren(HTMLTableBandLM.java:67)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la yout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking LM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la youtChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLTableLM.layou tChildren(HTMLTableLM.java:132)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la yout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking LM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout (HTMLPageLM.java:90)
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutE ngine.layout(HTMLReportLayoutEngine.java:99)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doR un(RunAndRenderTask.java:172)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run (RunAndRenderTask.java:75)
at com.foursoft.TestBirt.main(TestBirt.java:43)
org.eclipse.birt.report.engine.api.EngineException: Error happened while running the report
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doR un(RunAndRenderTask.java:188)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run (RunAndRenderTask.java:75)
at com.foursoft.TestBirt.main(TestBirt.java:43)
Caused by: java.lang.NullPointerException
at org.eclipse.birt.report.engine.emitter.html.util.HTMLEmitter Util.buildOverflowStyle(HTMLEmitterUtil.java:289)
at org.eclipse.birt.report.engine.emitter.html.HTMLVisionOptimi ze.buildCellStyle(HTMLVisionOptimize.java:362)
at org.eclipse.birt.report.engine.emitter.html.HTMLReportEmitte r.startCell(HTMLReportEmitter.java:2135)
at org.eclipse.birt.report.engine.emitter.CompositeContentEmitt er.startCell(CompositeContentEmitter.java:233)
at org.eclipse.birt.report.engine.layout.html.HTMLTableLayoutEm itter.startCell(HTMLTableLayoutEmitter.java:701)
at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.st artContent(ContentEmitterUtil.java:59)
at org.eclipse.birt.report.engine.layout.html.buffer.DummyPageB uffer.startContainer(DummyPageBuffer.java:106)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.st art(HTMLStackingLM.java:50)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la yout(HTMLAbstractLM.java:139)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackin gLM.resumeLayout(HTMLInlineStackingLM.java:111)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackin gLM.layoutNodes(HTMLInlineStackingLM.java:160)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la youtChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la yout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking LM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la youtChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLTableBandLM.l ayoutChildren(HTMLTableBandLM.java:67)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la yout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking LM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la youtChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLTableLM.layou tChildren(HTMLTableLM.java:132)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la yout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking LM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout (HTMLPageLM.java:90)
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutE ngine.layout(HTMLReportLayoutEngine.java:99)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doR un(RunAndRenderTask.java:172)
... 2 more
Re: BIRT NullPointerException [message #549974 is a reply to message #549886] Wed, 28 July 2010 11:32 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

This appears to be a bug. I will log it. To work around it add:

options.setEnableAgentStyleEngine(true);

to your html options.

On a side note change this:
> task.getAppContext().put(EngineConstants.APPCONTEXT_CLASSLOA DER_KEY,
> TestBirt.class.getClassLoader());

from the task to the config.

ie config.getAppContext()......

Jason

On 7/28/2010 7:29 AM, prashant.p@four-soft.com wrote:
> My Report has a table connected to MySQL DB. The report is displayed
> correctly in preview mode of eclipse ide.
> When i run the report and save it to html format using java code, it
> throws errors.
> If my report has no dataset, it works fine from the below java code.
> please help me.
>
> Code Snippet:
>
> public class TestBirt {
>
> /**
> * @param args
> */
> public static void main(String[] args) {
> IReportEngine engine = null;
> EngineConfig config = null;
> try {
> config = new EngineConfig();
> config.setEngineHome("C:/Documents and
> Settings/pras/Desktop/birt-runtime-2_6_0/birt-runtime-2_6_0/
> ReportEngine ");
> config.setLogConfig(null, Level.ALL);
>
> Platform.startup(config);
> IReportEngineFactory factory = (IReportEngineFactory) Platform
> .createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_E
> NGINE_FACTORY);
> engine = factory.createReportEngine(config);
> engine.changeLogLevel(Level.ALL);
> IReportRunnable design = null;
> design = engine.openReportDesign("Department_Report.rptdesign");
> IRunAndRenderTask task = engine.createRunAndRenderTask(design);
> task.getAppContext().put(EngineConstants.APPCONTEXT_CLASSLOA DER_KEY,
> TestBirt.class.getClassLoader());
> HTMLRenderOption options = new HTMLRenderOption();
> options.setOutputFileName("C:/Documents and
> Settings/pras/Desktop/output.html");
> options.setOutputFormat("html");
> task.setRenderOption(options);
> task.run();
> task.close();
> engine.shutdown();
> Platform.shutdown();
> System.out.println("Finished"); } catch (Exception ex) {
> ex.printStackTrace();
> }
> }
>
> }
>
>
> Below are the logs:
>
> Jul 28, 2010 4:09:25 PM
> org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager
> loadDriverExtensions
> INFO: Found JDBC driverinfo extension:
> driverClass=org.apache.derby.jdbc.EmbeddedDriver, connectionFactory=null
> Jul 28, 2010 4:09:25 PM
> org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager
> loadDriverExtensions
> INFO: Found JDBC driverinfo extension:
> driverClass=org.eclipse.birt.report.data.oda.sampledb.Driver ,
> connectionFactory=org.eclipse.birt.report.data.oda.sampledb.
> SampleDBJDBCConnectionFactory
> Jul 28, 2010 4:09:25 PM
> org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager
> loadAndRegisterDriver
> INFO: Loading JDBC driver class: com.mysql.jdbc.Driver
> Jul 28, 2010 4:09:25 PM
> org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager findDriver
> INFO: Driver class not in class path: com.mysql.jdbc.Driver. Trying to
> locate driver in drivers directory
> Jul 28, 2010 4:09:25 PM
> org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager$Driv
> erClassLoader addNewURL
> INFO: JDBCDriverManager: found JAR file
> drivers/mysql-connector-java-3.1.13-bin.jar.
> URL= bundleentry://41.fwk15655788/drivers/mysql-connector-java-3. 1.13-bin.jar
>
> Jul 28, 2010 4:09:26 PM
> org.eclipse.birt.report.engine.api.impl.RunAndRenderTask doRun
> SEVERE: An error happened while running the report. Cause:
> java.lang.NullPointerException
> at org.eclipse.birt.report.engine.emitter.html.util.HTMLEmitter
> Util.buildOverflowStyle(HTMLEmitterUtil.java:289)
> at org.eclipse.birt.report.engine.emitter.html.HTMLVisionOptimi
> ze.buildCellStyle(HTMLVisionOptimize.java:362)
> at org.eclipse.birt.report.engine.emitter.html.HTMLReportEmitte
> r.startCell(HTMLReportEmitter.java:2135)
> at org.eclipse.birt.report.engine.emitter.CompositeContentEmitt
> er.startCell(CompositeContentEmitter.java:233)
> at org.eclipse.birt.report.engine.layout.html.HTMLTableLayoutEm
> itter.startCell(HTMLTableLayoutEmitter.java:701)
> at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.st
> artContent(ContentEmitterUtil.java:59)
> at org.eclipse.birt.report.engine.layout.html.buffer.DummyPageB
> uffer.startContainer(DummyPageBuffer.java:106)
> at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.st
> art(HTMLStackingLM.java:50)
> at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la
> yout(HTMLAbstractLM.java:139)
> at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackin
> gLM.resumeLayout(HTMLInlineStackingLM.java:111)
> at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackin
> gLM.layoutNodes(HTMLInlineStackingLM.java:160)
> at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la
> youtChildren(HTMLStackingLM.java:26)
> at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la
> yout(HTMLAbstractLM.java:140)
> at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking
> LM.layoutNodes(HTMLBlockStackingLM.java:70)
> at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la
> youtChildren(HTMLStackingLM.java:26)
> at org.eclipse.birt.report.engine.layout.html.HTMLTableBandLM.l
> ayoutChildren(HTMLTableBandLM.java:67)
> at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la
> yout(HTMLAbstractLM.java:140)
> at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking
> LM.layoutNodes(HTMLBlockStackingLM.java:70)
> at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la
> youtChildren(HTMLStackingLM.java:26)
> at org.eclipse.birt.report.engine.layout.html.HTMLTableLM.layou
> tChildren(HTMLTableLM.java:132)
> at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la
> yout(HTMLAbstractLM.java:140)
> at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking
> LM.layoutNodes(HTMLBlockStackingLM.java:70)
> at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout
> (HTMLPageLM.java:90)
> at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutE
> ngine.layout(HTMLReportLayoutEngine.java:99)
> at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doR
> un(RunAndRenderTask.java:172)
> at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run
> (RunAndRenderTask.java:75)
> at com.foursoft.TestBirt.main(TestBirt.java:43)
> org.eclipse.birt.report.engine.api.EngineException: Error happened while
> running the report
> at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doR
> un(RunAndRenderTask.java:188)
> at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run
> (RunAndRenderTask.java:75)
> at com.foursoft.TestBirt.main(TestBirt.java:43)
> Caused by: java.lang.NullPointerException
> at org.eclipse.birt.report.engine.emitter.html.util.HTMLEmitter
> Util.buildOverflowStyle(HTMLEmitterUtil.java:289)
> at org.eclipse.birt.report.engine.emitter.html.HTMLVisionOptimi
> ze.buildCellStyle(HTMLVisionOptimize.java:362)
> at org.eclipse.birt.report.engine.emitter.html.HTMLReportEmitte
> r.startCell(HTMLReportEmitter.java:2135)
> at org.eclipse.birt.report.engine.emitter.CompositeContentEmitt
> er.startCell(CompositeContentEmitter.java:233)
> at org.eclipse.birt.report.engine.layout.html.HTMLTableLayoutEm
> itter.startCell(HTMLTableLayoutEmitter.java:701)
> at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.st
> artContent(ContentEmitterUtil.java:59)
> at org.eclipse.birt.report.engine.layout.html.buffer.DummyPageB
> uffer.startContainer(DummyPageBuffer.java:106)
> at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.st
> art(HTMLStackingLM.java:50)
> at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la
> yout(HTMLAbstractLM.java:139)
> at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackin
> gLM.resumeLayout(HTMLInlineStackingLM.java:111)
> at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackin
> gLM.layoutNodes(HTMLInlineStackingLM.java:160)
> at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la
> youtChildren(HTMLStackingLM.java:26)
> at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la
> yout(HTMLAbstractLM.java:140)
> at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking
> LM.layoutNodes(HTMLBlockStackingLM.java:70)
> at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la
> youtChildren(HTMLStackingLM.java:26)
> at org.eclipse.birt.report.engine.layout.html.HTMLTableBandLM.l
> ayoutChildren(HTMLTableBandLM.java:67)
> at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la
> yout(HTMLAbstractLM.java:140)
> at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking
> LM.layoutNodes(HTMLBlockStackingLM.java:70)
> at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la
> youtChildren(HTMLStackingLM.java:26)
> at org.eclipse.birt.report.engine.layout.html.HTMLTableLM.layou
> tChildren(HTMLTableLM.java:132)
> at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la
> yout(HTMLAbstractLM.java:140)
> at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking
> LM.layoutNodes(HTMLBlockStackingLM.java:70)
> at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout
> (HTMLPageLM.java:90)
> at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutE
> ngine.layout(HTMLReportLayoutEngine.java:99)
> at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doR
> un(RunAndRenderTask.java:172)
> ... 2 more
>


Jason Weathersby

BIRT Exchange
Re: BIRT NullPointerException [message #549982 is a reply to message #549974] Wed, 28 July 2010 11:49 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

The bug is logged at:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=321144

On 7/28/2010 11:32 AM, Jason Weathersby wrote:
> This appears to be a bug. I will log it. To work around it add:
>
> options.setEnableAgentStyleEngine(true);
>
> to your html options.
>
> On a side note change this:
> > task.getAppContext().put(EngineConstants.APPCONTEXT_CLASSLOA DER_KEY,
> > TestBirt.class.getClassLoader());
>
> from the task to the config.
>
> ie config.getAppContext()......
>
> Jason
>
> On 7/28/2010 7:29 AM, prashant.p@four-soft.com wrote:
>> My Report has a table connected to MySQL DB. The report is displayed
>> correctly in preview mode of eclipse ide.
>> When i run the report and save it to html format using java code, it
>> throws errors.
>> If my report has no dataset, it works fine from the below java code.
>> please help me.
>>
>> Code Snippet:
>>
>> public class TestBirt {
>>
>> /**
>> * @param args
>> */
>> public static void main(String[] args) {
>> IReportEngine engine = null;
>> EngineConfig config = null;
>> try {
>> config = new EngineConfig();
>> config.setEngineHome("C:/Documents and
>> Settings/pras/Desktop/birt-runtime-2_6_0/birt-runtime-2_6_0/
>> ReportEngine ");
>> config.setLogConfig(null, Level.ALL);
>>
>> Platform.startup(config);
>> IReportEngineFactory factory = (IReportEngineFactory) Platform
>> .createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_E
>> NGINE_FACTORY);
>> engine = factory.createReportEngine(config);
>> engine.changeLogLevel(Level.ALL);
>> IReportRunnable design = null;
>> design = engine.openReportDesign("Department_Report.rptdesign");
>> IRunAndRenderTask task = engine.createRunAndRenderTask(design);
>> task.getAppContext().put(EngineConstants.APPCONTEXT_CLASSLOA DER_KEY,
>> TestBirt.class.getClassLoader());
>> HTMLRenderOption options = new HTMLRenderOption();
>> options.setOutputFileName("C:/Documents and
>> Settings/pras/Desktop/output.html");
>> options.setOutputFormat("html");
>> task.setRenderOption(options);
>> task.run();
>> task.close();
>> engine.shutdown();
>> Platform.shutdown();
>> System.out.println("Finished"); } catch (Exception ex) {
>> ex.printStackTrace();
>> }
>> }
>>
>> }
>>
>>
>> Below are the logs:
>>
>> Jul 28, 2010 4:09:25 PM
>> org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager
>> loadDriverExtensions
>> INFO: Found JDBC driverinfo extension:
>> driverClass=org.apache.derby.jdbc.EmbeddedDriver, connectionFactory=null
>> Jul 28, 2010 4:09:25 PM
>> org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager
>> loadDriverExtensions
>> INFO: Found JDBC driverinfo extension:
>> driverClass=org.eclipse.birt.report.data.oda.sampledb.Driver ,
>> connectionFactory=org.eclipse.birt.report.data.oda.sampledb.
>> SampleDBJDBCConnectionFactory
>> Jul 28, 2010 4:09:25 PM
>> org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager
>> loadAndRegisterDriver
>> INFO: Loading JDBC driver class: com.mysql.jdbc.Driver
>> Jul 28, 2010 4:09:25 PM
>> org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager findDriver
>> INFO: Driver class not in class path: com.mysql.jdbc.Driver. Trying to
>> locate driver in drivers directory
>> Jul 28, 2010 4:09:25 PM
>> org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager$Driv
>> erClassLoader addNewURL
>> INFO: JDBCDriverManager: found JAR file
>> drivers/mysql-connector-java-3.1.13-bin.jar.
>> URL= bundleentry://41.fwk15655788/drivers/mysql-connector-java-3. 1.13-bin.jar
>>
>>
>> Jul 28, 2010 4:09:26 PM
>> org.eclipse.birt.report.engine.api.impl.RunAndRenderTask doRun
>> SEVERE: An error happened while running the report. Cause:
>> java.lang.NullPointerException
>> at org.eclipse.birt.report.engine.emitter.html.util.HTMLEmitter
>> Util.buildOverflowStyle(HTMLEmitterUtil.java:289)
>> at org.eclipse.birt.report.engine.emitter.html.HTMLVisionOptimi
>> ze.buildCellStyle(HTMLVisionOptimize.java:362)
>> at org.eclipse.birt.report.engine.emitter.html.HTMLReportEmitte
>> r.startCell(HTMLReportEmitter.java:2135)
>> at org.eclipse.birt.report.engine.emitter.CompositeContentEmitt
>> er.startCell(CompositeContentEmitter.java:233)
>> at org.eclipse.birt.report.engine.layout.html.HTMLTableLayoutEm
>> itter.startCell(HTMLTableLayoutEmitter.java:701)
>> at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.st
>> artContent(ContentEmitterUtil.java:59)
>> at org.eclipse.birt.report.engine.layout.html.buffer.DummyPageB
>> uffer.startContainer(DummyPageBuffer.java:106)
>> at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.st
>> art(HTMLStackingLM.java:50)
>> at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la
>> yout(HTMLAbstractLM.java:139)
>> at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackin
>> gLM.resumeLayout(HTMLInlineStackingLM.java:111)
>> at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackin
>> gLM.layoutNodes(HTMLInlineStackingLM.java:160)
>> at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la
>> youtChildren(HTMLStackingLM.java:26)
>> at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la
>> yout(HTMLAbstractLM.java:140)
>> at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking
>> LM.layoutNodes(HTMLBlockStackingLM.java:70)
>> at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la
>> youtChildren(HTMLStackingLM.java:26)
>> at org.eclipse.birt.report.engine.layout.html.HTMLTableBandLM.l
>> ayoutChildren(HTMLTableBandLM.java:67)
>> at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la
>> yout(HTMLAbstractLM.java:140)
>> at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking
>> LM.layoutNodes(HTMLBlockStackingLM.java:70)
>> at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la
>> youtChildren(HTMLStackingLM.java:26)
>> at org.eclipse.birt.report.engine.layout.html.HTMLTableLM.layou
>> tChildren(HTMLTableLM.java:132)
>> at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la
>> yout(HTMLAbstractLM.java:140)
>> at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking
>> LM.layoutNodes(HTMLBlockStackingLM.java:70)
>> at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout
>> (HTMLPageLM.java:90)
>> at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutE
>> ngine.layout(HTMLReportLayoutEngine.java:99)
>> at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doR
>> un(RunAndRenderTask.java:172)
>> at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run
>> (RunAndRenderTask.java:75)
>> at com.foursoft.TestBirt.main(TestBirt.java:43)
>> org.eclipse.birt.report.engine.api.EngineException: Error happened while
>> running the report
>> at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doR
>> un(RunAndRenderTask.java:188)
>> at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run
>> (RunAndRenderTask.java:75)
>> at com.foursoft.TestBirt.main(TestBirt.java:43)
>> Caused by: java.lang.NullPointerException
>> at org.eclipse.birt.report.engine.emitter.html.util.HTMLEmitter
>> Util.buildOverflowStyle(HTMLEmitterUtil.java:289)
>> at org.eclipse.birt.report.engine.emitter.html.HTMLVisionOptimi
>> ze.buildCellStyle(HTMLVisionOptimize.java:362)
>> at org.eclipse.birt.report.engine.emitter.html.HTMLReportEmitte
>> r.startCell(HTMLReportEmitter.java:2135)
>> at org.eclipse.birt.report.engine.emitter.CompositeContentEmitt
>> er.startCell(CompositeContentEmitter.java:233)
>> at org.eclipse.birt.report.engine.layout.html.HTMLTableLayoutEm
>> itter.startCell(HTMLTableLayoutEmitter.java:701)
>> at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.st
>> artContent(ContentEmitterUtil.java:59)
>> at org.eclipse.birt.report.engine.layout.html.buffer.DummyPageB
>> uffer.startContainer(DummyPageBuffer.java:106)
>> at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.st
>> art(HTMLStackingLM.java:50)
>> at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la
>> yout(HTMLAbstractLM.java:139)
>> at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackin
>> gLM.resumeLayout(HTMLInlineStackingLM.java:111)
>> at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackin
>> gLM.layoutNodes(HTMLInlineStackingLM.java:160)
>> at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la
>> youtChildren(HTMLStackingLM.java:26)
>> at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la
>> yout(HTMLAbstractLM.java:140)
>> at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking
>> LM.layoutNodes(HTMLBlockStackingLM.java:70)
>> at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la
>> youtChildren(HTMLStackingLM.java:26)
>> at org.eclipse.birt.report.engine.layout.html.HTMLTableBandLM.l
>> ayoutChildren(HTMLTableBandLM.java:67)
>> at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la
>> yout(HTMLAbstractLM.java:140)
>> at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking
>> LM.layoutNodes(HTMLBlockStackingLM.java:70)
>> at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la
>> youtChildren(HTMLStackingLM.java:26)
>> at org.eclipse.birt.report.engine.layout.html.HTMLTableLM.layou
>> tChildren(HTMLTableLM.java:132)
>> at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la
>> yout(HTMLAbstractLM.java:140)
>> at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking
>> LM.layoutNodes(HTMLBlockStackingLM.java:70)
>> at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout
>> (HTMLPageLM.java:90)
>> at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutE
>> ngine.layout(HTMLReportLayoutEngine.java:99)
>> at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doR
>> un(RunAndRenderTask.java:172)
>> ... 2 more
>>
>


Jason Weathersby

BIRT Exchange
Re: BIRT NullPointerException [message #550074 is a reply to message #549982] Thu, 29 July 2010 00:46 Go to previous messageGo to next message
Prashant is currently offline Prashant
Messages: 6
Registered: July 2010
Junior Member
Thanks a lot. Your work around solution worked. Is the bug specific to Birt 2.6 version?
Re: BIRT NullPointerException [message #550185 is a reply to message #550074] Thu, 29 July 2010 09:16 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

It appears to be just 2.6.

Jason

On 7/29/2010 12:46 AM, prashant.p@four-soft.com wrote:
> Thanks a lot. Your work around solution worked. Is the bug specific to
> Birt 2.6 version?


Jason Weathersby

BIRT Exchange
Re: BIRT NullPointerException [message #550186 is a reply to message #550185] Thu, 29 July 2010 09:17 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Actually this might have been a issue with 2.5.2 as well.

Jason

On 7/29/2010 9:16 AM, Jason Weathersby wrote:
> It appears to be just 2.6.
>
> Jason
>
> On 7/29/2010 12:46 AM, prashant.p@four-soft.com wrote:
>> Thanks a lot. Your work around solution worked. Is the bug specific to
>> Birt 2.6 version?
>


Jason Weathersby

BIRT Exchange
Re: BIRT NullPointerException [message #645324 is a reply to message #549886] Thu, 16 December 2010 11:08 Go to previous message
dyllo  is currently offline dyllo
Messages: 1
Registered: December 2010
Junior Member
Hi,

This problem is linked directly to the BirtEngine .

I had this problem with the BirtEngine 2.6.5 .

Downloaded the 2.6.0 and the problem was solved .

Regards.
Previous Topic:Server Side Paging
Next Topic:Export to Excel, data in different tabs
Goto Forum:
  


Current Time: Sat Apr 19 06:08:04 EDT 2014

Powered by FUDForum. Page generated in 0.06869 seconds