Unable to restart standalone BIRT engine in JUnit test code [message #368818] |
Mon, 29 June 2009 10:16 |
Eclipse User |
|
|
|
Originally posted by: csaba.szucs.continental-corporation.com
Hello Guys,
In my JUnit tests I start and shutdown BIRT standalone engine again and
again within each test method.
I shut down standalone BIRT engine this way, I am not sure if it is
correct or not:
engine.destroy();
Platform.shutdown();
But during the first try to restart BIRT engine I get the following
exceptions:
Could you tell me what the problem is, thanks a lot!
Csaba
Exception in thread "main" java.lang.ExceptionInInitializerError
at
org.eclipse.birt.report.engine.api.impl.ReportEngineFactory$ 1.run(ReportEngineFactory.java:18)
at
org.eclipse.birt.report.engine.api.impl.ReportEngineFactory$ 1.run(ReportEngineFactory.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.birt.report.engine.api.impl.ReportEngineFactory. createReportEngine(ReportEngineFactory.java:14)
at
com.continental.plm.reportmanager.ReportEngineHandler.create EngineForStandaloneJavaPlatform(ReportEngineHandler.java:29)
at
com.continental.plm.reportmanager.ReportToolbox.getReportEng ineForStandaloneJavaPlatform(ReportToolbox.java:47)
at
com.continental.plm.reportmanager.ReportManager.<init>(ReportManager.java:40)
at
com.continental.plm.reportmanager.ReportManager.main(ReportM anager.java:231)
Caused by: java.lang.IllegalStateException
at
org.mozilla.javascript.ContextFactory.initGlobal(ContextFact ory.java:207)
at
org.eclipse.birt.report.engine.api.impl.ReportEngine.<clinit >(ReportEngine.java:221)
... 8 more
Some help for investigating the exception trace:
public static IReportEngine createEngineForStandaloneJavaPlatform(final
String birtHome) throws Exception {
EngineConfig config = new EngineConfig();
config.setEngineHome(birtHome);
Platform.startup(config);
IReportEngineFactory factory = (IReportEngineFactory) Platform
.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_E NGINE_FACTORY);
return factory.createReportEngine(config);
}
So the problem is at the last statement of my above method
(ReportEngineHandler.java:29).
|
|
|
Re: Unable to restart standalone BIRT engine in JUnit test code [message #368822 is a reply to message #368818] |
Mon, 29 June 2009 14:18 |
Eclipse User |
|
|
|
Originally posted by: jasonweathersby.windstream.net
Csaba,
Can you log a bug for this? Post the bugzilla id here.
Jason
Csaba wrote:
> Hello Guys,
>
> In my JUnit tests I start and shutdown BIRT standalone engine again and
> again within each test method.
>
> I shut down standalone BIRT engine this way, I am not sure if it is
> correct or not:
> engine.destroy();
> Platform.shutdown();
>
> But during the first try to restart BIRT engine I get the following
> exceptions:
>
> Could you tell me what the problem is, thanks a lot!
> Csaba
>
> Exception in thread "main" java.lang.ExceptionInInitializerError
> at
> org.eclipse.birt.report.engine.api.impl.ReportEngineFactory$ 1.run(ReportEngineFactory.java:18)
>
> at
> org.eclipse.birt.report.engine.api.impl.ReportEngineFactory$ 1.run(ReportEngineFactory.java:1)
>
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.eclipse.birt.report.engine.api.impl.ReportEngineFactory. createReportEngine(ReportEngineFactory.java:14)
>
> at
> com.continental.plm.reportmanager.ReportEngineHandler.create EngineForStandaloneJavaPlatform(ReportEngineHandler.java:29)
>
> at
> com.continental.plm.reportmanager.ReportToolbox.getReportEng ineForStandaloneJavaPlatform(ReportToolbox.java:47)
>
> at
> com.continental.plm.reportmanager.ReportManager.<init>(ReportManager.java:40)
>
> at
> com.continental.plm.reportmanager.ReportManager.main(ReportM anager.java:231)
>
> Caused by: java.lang.IllegalStateException
> at
> org.mozilla.javascript.ContextFactory.initGlobal(ContextFact ory.java:207)
> at
> org.eclipse.birt.report.engine.api.impl.ReportEngine.<clinit >(ReportEngine.java:221)
>
> ... 8 more
>
> Some help for investigating the exception trace:
> public static IReportEngine
> createEngineForStandaloneJavaPlatform(final String birtHome) throws
> Exception {
> EngineConfig config = new EngineConfig();
> config.setEngineHome(birtHome);
>
> Platform.startup(config);
> IReportEngineFactory factory = (IReportEngineFactory) Platform
>
> .createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_E NGINE_FACTORY);
>
> return factory.createReportEngine(config);
> }
>
> So the problem is at the last statement of my above method
> (ReportEngineHandler.java:29).
>
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03276 seconds