NullPointerException when running the ReportEngine() [message #181675] |
Wed, 02 August 2006 04:21  |
Eclipse User |
|
|
|
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 #183077 is a reply to message #182959] |
Mon, 07 August 2006 10:50  |
Eclipse User |
|
|
|
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.
>
|
|
|
Powered by
FUDForum. Page generated in 0.03413 seconds