Skip to main content



      Home
Home » Archived » BIRT » NullPointerException when running the ReportEngine()
NullPointerException when running the ReportEngine() [message #181675] Wed, 02 August 2006 04:21 Go to next message
Eclipse UserFriend
Originally posted by: bruno_maya.hotmail.com

Jason,

I am back with the same problem I post two week ago but with more
informations.

I attached the source from CVS to the class to see where the error came
from.

Inside the
org.eclipse.birt.report.engine.extension.internal.ExtensionM anager class,
then inside the loadGenerationExtensionDefns() method,
Platform.getExtensionRegistry() = null.
You spoke me the first time about a "Platform registry" not found. Can you
tell me more to resolve this error please ?

I have Eclipse 3.2. This is the files I downloaded :
- birt-report-designer-all-in-one-2_1_0.zip
- birt-runtime-2_1_0.zip
- itext-1.3.jar

The code where factory = null :
IReportEngine engine = null;
EngineConfig config = null;
try{
config = new EngineConfig( );

config.setEngineHome("C:\\birtruntime\\birt-runtime-2_1_0\\ReportEngine ");
config.setLogConfig(null, Level.FINE);

Platform.startup( config );
IReportEngineFactory factory = (IReportEngineFactory)
Platform.createFactoryObject(
IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
engine = factory.createReportEngine( config );
engine.changeLogLevel( Level.WARNING );
}catch( Exception ex){
ex.printStackTrace();
}

The error in the console :
java.lang.NullPointerException
at
org.eclipse.birt.report.engine.extension.internal.ExtensionM anager.loadGenerationExtensionDefns(ExtensionManager.java:26 5)
at
org.eclipse.birt.report.engine.extension.internal.ExtensionM anager. <init>(ExtensionManager.java:79)
at
org.eclipse.birt.report.engine.extension.internal.ExtensionM anager.createInstance(ExtensionManager.java:91)
at
org.eclipse.birt.report.engine.extension.internal.ExtensionM anager.getInstance(ExtensionManager.java:100)
at
org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.<init >(ReportEngineHelper.java:71)
at
org.eclipse.birt.report.engine.api.impl.ReportEngine.<init>(ReportEngine.java:85)
at Report.TestUsingBirt.executeReport(TestUsingBirt.java:157)
at Report.TestUsingBirt.main(TestUsingBirt.java:200)

Thank you,
Bruno
Re: NullPointerException when running the ReportEngine() [message #182959 is a reply to message #181675] Mon, 07 August 2006 05:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bruno_maya.hotmail.com

Hello,

Finally, there is no longer the NullPointer error now : I had to add all
jar files from C:\birtruntime\birt-runtime-2_1_0\ReportEngine\lib in the
build path on my program test.
Then I did not understand why set the engine home
config.setEngineHome("C:\\birtruntime\\birt-runtime-2_1_0\\ReportEngine ")
?!

Regards,
Bruno.
Re: NullPointerException when running the ReportEngine() [message #183077 is a reply to message #182959] Mon, 07 August 2006 10:50 Go to previous message
Eclipse UserFriend
The birt home variable lets the engine know where the OSGi plug-ins are.
They are not in the lib folder, but the plugins folder.

Jason

"Bruno Maya" <bruno_maya@hotmail.com> wrote in message
news:00fb2ab90f3dc4ad510ae02a2d383cd3$1@www.eclipse.org...
> Hello,
>
> Finally, there is no longer the NullPointer error now : I had to add all
> jar files from C:\birtruntime\birt-runtime-2_1_0\ReportEngine\lib in the
> build path on my program test.
> Then I did not understand why set the engine home
> config.setEngineHome("C:\\birtruntime\\birt-runtime-2_1_0\\ReportEngine ")
> ?!
>
> Regards,
> Bruno.
>
Previous Topic:WebViewerExample Pagination Question
Next Topic:Viewer doesnt show report
Goto Forum:
  


Current Time: Sun May 11 23:06:43 EDT 2025

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

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

Back to the top