Home
Analytics
Using Report Engine from NetBeans application
matute
Hello and thanks forward,
I`m newbie with Birt and I have to use the RE API with an application developed in NetBeans.
Could anybody help me, please?
When I run my Netbeans developed application, the next exception is thrown:
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/birt/core/framework/eclipse/EclipseExtensionRegistry
at org.eclipse.birt.core.framework.eclipse.EclipsePlatform.getExtensionRegistry(EclipsePlatform.java:56)
at org.eclipse.birt.core.framework.eclipse.EclipsePlatform.createFactoryObject(EclipsePlatform.java:348)
at org.eclipse.birt.core.framework.Platform.createFactoryObject(Platform.java:262)
at newbirt.CreaPDF.crea(CreaPDF.java:32)
at newbirt.Main.main(Main.java:39)
When I run the application in Eclipse IDE there's no problem.
Find more posts tagged with
Comments
JasonW
Do you have the jars from the reportengine/lib directory in your classpath?
Jason
matute
<blockquote class='ipsBlockquote' data-author="'JasonW'" data-cid="72817" data-time="1296580740" data-date="01 February 2011 - 10:19 AM"><p>
Do you have the jars from the reportengine/lib directory in your classpath?<br />
<br />
Jason<br /></p></blockquote>
<br />
Thanks for answering, Jason<br />
I think so, but I?m not sure. Would you mind explaining how to include that jars in the classpath? or where can I find an explanation of it?<br />
<br />
I am doing something wrong at this step, but I don't know what.<br />
<br />
The exception showed in the previous post is thrown in CreaPDF.java at line:<br />
IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);<br />
<br />
Is there any problem about Platform.class of Eclipse using it under NetBeans?<br />
<br />
Thank you, and sorry for my english.
JasonW
I do not use net beans, but I assume you need to add all the jars in the ReportEngine/lib directory to the run classpath. These are located in the \birt-runtime-2_6_1\ReportEngine\lib of the runtime download. In addition wherever you set your birthome needs to have a plugins and configuration directory, with the contents of birt-runtime-2_6_1\ReportEngine\plugins and configuration directories from the runtime download.
Jason
matute
I apologize for my unknowledge, but what do you mean with "run classpath"?
I guess you're talking about the "system variable" of windows, not about any other thing with the same name, right?
If this, do I have to write one by one all the .jars in \birt-runtime-2_6_1\ReportEngine\lib in that variable?
Thank you very much for you patience.
JasonW
You can do that but I think there is a run classpath setting in netbeans that should allow you to browse to the lib folder and add all of them. If you were using eclipse you would right click on the project and select build path. I believe netbeans has something similar. You may want to google setting classpath in netbeans.
Jason
matute
Hi Jason,
I did what you said and it works perfectly, I had a problem with the libraries, they were in the wrong place.
Thank you very much for all.
See you.
JasonW
I am glad to hear.
Jason