Home » Archived » BIRT » Could not initialize class org.eclipse.birt.report.engine.api.impl.ReportEngine
Could not initialize class org.eclipse.birt.report.engine.api.impl.ReportEngine [message #554957] |
Tue, 24 August 2010 17:44  |
Eclipse User |
|
|
|
Hi,
I'm using birt 2.3.1 engine api in a web service deployed to weblogic 10.x. The birt engine is instantiated properly on the first call. i keep getting 'Could not initialize class org.eclipse.birt.report.engine.api.impl.ReportEngine' error on subsequent calls.
I kind of following implementation example on http://wiki.eclipse.org/Servlet_Example_%28BIRT%29_2.1 because i can't find an birt 2.3 Servlet implementation example.
I appreciate any help in advance.
dash.
// code snippets
private IReportEngine getBirtEngine(ServletContext sc) {
IReportEngine re = null;
if (sc != null) {
EngineConfig ec = new EngineConfig();
ec.setLogConfig(BIRT_LOGS_PATH, Level.FINE);
ec.getAppContext().put(EngineConstants.APPCONTEXT_CLASSLOADE R_KEY, Thread.currentThread().getContextClassLoader());
ec.setEngineHome("");
IPlatformContext pc = new PlatformServletContext(sc);
ec.setPlatformContext(pc);
try {
Platform.startup(ec);
}
catch (BirtException be) {
e.printStackTrace();
}
IReportEngineFactory ref = (IReportEngineFactory) Platform.createFactoryObject(IReportEngineFactory.EXTENSION_ REPORT_ENGINE_FACTORY);
// offending line. remote debugger hangs here.
re = ref.createReportEngine(ec);
}
return re;
}
@WebMethod
public RetrieveReportResponse getReport(RetrieveReportRequest request)
throws OperationTimeoutException, OperationValidationException, OperationException
{
ServletContext sc = wsctx.getHttpSession().getServletContext();
IReportEngine re = getBirtEngine(sc);
if (re != null) {
// debugging code
String [] formats = re.getSupportedFormats();
if (formats != null){
for (String format: formats){
System.out.println("*****supported format:" + format);
}
}
}
else {
System.out.println("***** Unable to obtain birt engine");
}
try {
if (re != null) {
re.destroy();
re = null;
}
Platform.shutdown();
}
catch (Exception e){
// handle exception
}
return response;
}
|
|
| | |
Re: Could not initialize class org.eclipse.birt.report.engine.api.impl.ReportEngine [message #555221 is a reply to message #555204] |
Wed, 25 August 2010 18:16   |
Eclipse User |
|
|
|
Jason,
I've the report designer crashing issue fixed by starting the designer with -vm C:\dev\jdk1.5.0_22\bin\java.exe. I'm able to preview my report with proper data showing in the designer.
However, when I run the same report in WebLogic, the data don't show up in the generated pdf, that shows the headings and date/time. The birt log indicates that the data are returned properly, so there isn't an issue of the jdbc connection.
Any thought?
Thanks,
kenny
// birt log
Aug 25, 2010 4:48:56 PM org.eclipse.birt.data.engine.odaconsumer.ResultSet fetch
FINEST: Fetched next row: 1,TestComp,Testing Company,1 .
|
|
|
Re: Could not initialize class org.eclipse.birt.report.engine.api.impl.ReportEngine [message #555245 is a reply to message #555221] |
Thu, 26 August 2010 00:14   |
Eclipse User |
|
|
|
Can you post the report?
On 8/25/2010 6:16 PM, dash wrote:
> Jason,
>
> I've the report designer crashing issue fixed by starting the designer
> with -vm C:\dev\jdk1.5.0_22\bin\java.exe. I'm able to preview my report
> with proper data showing in the designer.
> However, when I run the same report in WebLogic, the data don't show up
> in the generated pdf, that shows the headings and date/time. The birt
> log indicates that the data are returned properly, so there isn't an
> issue of the jdbc connection.
>
> Any thought?
>
> Thanks,
> kenny
>
> // birt log
> Aug 25, 2010 4:48:56 PM
> org.eclipse.birt.data.engine.odaconsumer.ResultSet fetch
> FINEST: Fetched next row: 1,TestComp,Testing Company,1 .
>
>
|
|
| | | | | | | | |
Re: Could not initialize class org.eclipse.birt.report.engine.api.impl.ReportEngine [message #556097 is a reply to message #556088] |
Mon, 30 August 2010 14:56   |
Eclipse User |
|
|
|
Kenny,
I checked your report again and noticed your dataset did not have a
datasource property.
Jason
On 8/30/2010 2:22 PM, dash wrote:
> Jason,
>
> My test table only has 5 rows of data. I can preview all 5 rows of data
> in the designer. But, there isn't a single row showing at run-time even
> though all the data shows up in the birt log.
> The headings and data and time do get rendered properly in the PDF
> report. Just the data are missing...
>
>> // birt log
>> Aug 25, 2010 4:48:56 PM
>> org.eclipse.birt.data.engine.odaconsumer.ResultSet fetch
>> FINEST: Fetched next row: 1,TestComp,Testing Company,1 .
>
> I don't think the size of the dataset is the issue if it's what you
> meant. Can you think of any other area that I can dig around?
>
> Thanks,
> kenny
|
|
| | | | |
Re: Could not initialize class org.eclipse.birt.report.engine.api.impl.ReportEngine [message #556558 is a reply to message #556355] |
Wed, 01 September 2010 14:28   |
Eclipse User |
|
|
|
Jason,
I pull down 2.5.2 because I don't have the appetite to try helios, the greatest and latest, yet. The 252 designer works like a champ, so far. However, I get the following error at run-time. Any idea?
I assume the deployment structure between the 231 and 252 is the same, right?
The documentation on the birt site seems to be for the older versions. Does 252 have its own documentation? If yes, can you please send me a pointer?
Thanks,
kenny
Sep 1, 2010 1:15:39 PM org.eclipse.birt.core.internal.plugin.ScriptEngineFactoryMan agerImpl createFactory
SEVERE: Plug-in org.eclipse.birt.report.engine.script.javascript was unable to load class org.eclipse.birt.report.engine.javascript.JavascriptEngineFa ctory.
org.eclipse.core.runtime.CoreException: Plug-in org.eclipse.birt.report.engine.script.javascript was unable to load class org.eclipse.birt.report.engine.javascript.JavascriptEngineFa ctory.
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .throwException(RegistryStrategyOSGI.java:180)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:162)
at org.eclipse.core.internal.registry.ExtensionRegistry.createE xecutableExtension(ExtensionRegistry.java:874)
at org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 51)
|
|
|
Re: Could not initialize class org.eclipse.birt.report.engine.api.impl.ReportEngine [message #556559 is a reply to message #556558] |
Wed, 01 September 2010 14:34   |
Eclipse User |
|
|
|
Kenny,
Can you verify that you do not have js.jar in your cp at runtime. If
you do this could conflict with the version that BIRT uses.
Jason
On 9/1/2010 2:29 PM, dash wrote:
> Jason,
>
> I pull down 2.5.2 because I don't have the appetite to try helios, the
> greatest and latest, yet. The 252 designer works like a champ, so far.
> However, I get the following error at run-time. Any idea?
>
> I assume the deployment structure between the 231 and 252 is the same,
> right?
>
> The documentation on the birt site seems to be for the older versions.
> Does 252 have its own documentation? If yes, can you please send me a
> pointer?
>
> Thanks,
> kenny
>
>
> Sep 1, 2010 1:15:39 PM
> org.eclipse.birt.core.internal.plugin.ScriptEngineFactoryMan agerImpl
> createFactory
> SEVERE: Plug-in org.eclipse.birt.report.engine.script.javascript was
> unable to load class
> org.eclipse.birt.report.engine.javascript.JavascriptEngineFa ctory.
> org.eclipse.core.runtime.CoreException: Plug-in
> org.eclipse.birt.report.engine.script.javascript was unable to load
> class org.eclipse.birt.report.engine.javascript.JavascriptEngineFa ctory.
> at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI
> .throwException(RegistryStrategyOSGI.java:180)
> at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI
> .createExecutableExtension(RegistryStrategyOSGI.java:162)
> at org.eclipse.core.internal.registry.ExtensionRegistry.createE
> xecutableExtension(ExtensionRegistry.java:874)
> at org.eclipse.core.internal.registry.ConfigurationElement.crea
> teExecutableExtension(ConfigurationElement.java:243)
> at org.eclipse.core.internal.registry.ConfigurationElementHandl
> e.createExecutableExtension(ConfigurationElementHandle.java: 51)
|
|
| | | | |
Re: Could not initialize class org.eclipse.birt.report.engine.api.impl.ReportEngine [message #557003 is a reply to message #556884] |
Fri, 03 September 2010 11:09  |
Eclipse User |
|
|
|
Kenny,
can you look under http://wiki.eclipse.org/BIRT/FAQ and add an entry
under deployment.
Jason
On 9/2/2010 11:02 PM, dash wrote:
> Jason,
>
> I added <container-descriptor>
> <prefer-web-inf-classes>true</prefer-web-inf-classes>
> </container-descriptor> to the weblogic.xml in the WEB-INF of our war
> file. Instead of loading the js.jar from the ear's APP-INF/lib, the
> js.jar in the WEB-INF/lib gets loaded.
>
> I'm looking for general documentation because I'm still learning
> different aspects of the BIRT.
>
> I'm more than happy to contribute what I've learned back to the
> commnuity. Please send me a pointer.
>
> Thanks,
> kenny
|
|
|
Goto Forum:
Current Time: Wed Jul 23 17:39:00 EDT 2025
Powered by FUDForum. Page generated in 0.07541 seconds
|