Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » .odp and .odt formats gives exception(Generated reports has no problem but exception are comes on console while generating report.)
.odp and .odt formats gives exception [message #800555] Fri, 17 February 2012 08:06 Go to next message
Deepali Patil is currently offline Deepali PatilFriend
Messages: 22
Registered: January 2012
Junior Member
Hello,

When I am trying to generate report in ODT and ODP format it gives me list of exception as below. Generated reports has no problem but exception are displayed on console while generating these reports. I have copied the below jars but still the problem persists.

org.eclipse.birt.report.engine.emitter.odp.config_3.7.0.v20110602.jar
org.eclipse.birt.report.engine.emitter.odp_3.7.0.v20110602.jar
org.eclipse.birt.report.engine.emitter.ods.config_3.7.0.v20110602.jar
org.eclipse.birt.report.engine.emitter.ods_3.7.0.v20110602.jar
org.eclipse.birt.report.engine.emitter.odt.config_3.7.0.v20110602.jar
org.eclipse.birt.report.engine.emitter.odt_3.7.0.v20110602.jar

Please suggest how to resolve the below exceptions.

Feb 17, 2012 12:34:43 PM org.eclipse.birt.report.engine.odf.AbstractOdfEmitter save
SEVERE: Stream closed
java.io.IOException: Stream closed
	at java.util.zip.ZipOutputStream.ensureOpen(Unknown Source)
	at java.util.zip.ZipOutputStream.closeEntry(Unknown Source)
	at org.eclipse.birt.report.engine.odf.pkg.Package.writeManifest(Package.java:188)
	at org.eclipse.birt.report.engine.odf.pkg.Package.close(Package.java:120)
	at org.eclipse.birt.report.engine.odf.AbstractOdfEmitter.save(AbstractOdfEmitter.java:166)
	at org.eclipse.birt.report.engine.odf.AbstractOdfEmitter.end(AbstractOdfEmitter.java:143)
	at org.eclipse.birt.report.engine.emitter.odt.OdtEmitter.end(OdtEmitter.java:602)
	at org.eclipse.birt.report.engine.emitter.CompositeContentEmitter.end(CompositeContentEmitter.java:65)
	at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:182)
	at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
	at com.sneengineers.wims.reportGeneration.ReportCreation.main(ReportCreation.java:57)




Thanks,
Deepali.

Re: .odp and .odt formats gives exception [message #801014 is a reply to message #800555] Fri, 17 February 2012 20:22 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Can you post your code?

Jason

On 2/17/2012 3:06 AM, Deepali Patil wrote:
> Hello,
>
> When I am trying to generate report in ODT and ODP format it gives me
> list of exception as below. Generated reports has no problem but
> exception are displayed on console while generating these reports. I
> have copied the below jars but still the problem persists.
>
> org.eclipse.birt.report.engine.emitter.odp.config_3.7.0.v20110602.jar
> org.eclipse.birt.report.engine.emitter.odp_3.7.0.v20110602.jar
> org.eclipse.birt.report.engine.emitter.ods.config_3.7.0.v20110602.jar
> org.eclipse.birt.report.engine.emitter.ods_3.7.0.v20110602.jar
> org.eclipse.birt.report.engine.emitter.odt.config_3.7.0.v20110602.jar
> org.eclipse.birt.report.engine.emitter.odt_3.7.0.v20110602.jar
>
> Please suggest how to resolve the below exceptions.
>
>
> Feb 17, 2012 12:34:43 PM
> org.eclipse.birt.report.engine.odf.AbstractOdfEmitter save
> SEVERE: Stream closed
> java.io.IOException: Stream closed
> at java.util.zip.ZipOutputStream.ensureOpen(Unknown Source)
> at java.util.zip.ZipOutputStream.closeEntry(Unknown Source)
> at
> org.eclipse.birt.report.engine.odf.pkg.Package.writeManifest(Package.java:188)
>
> at org.eclipse.birt.report.engine.odf.pkg.Package.close(Package.java:120)
> at
> org.eclipse.birt.report.engine.odf.AbstractOdfEmitter.save(AbstractOdfEmitter.java:166)
>
> at
> org.eclipse.birt.report.engine.odf.AbstractOdfEmitter.end(AbstractOdfEmitter.java:143)
>
> at
> org.eclipse.birt.report.engine.emitter.odt.OdtEmitter.end(OdtEmitter.java:602)
>
> at
> org.eclipse.birt.report.engine.emitter.CompositeContentEmitter.end(CompositeContentEmitter.java:65)
>
> at
> org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:182)
>
> at
> org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
>
> at
> com.sneengineers.wims.reportGeneration.ReportCreation.main(ReportCreation.java:57)
>
>
>
>
>
> Thanks,
> Deepali.
>
>
Re: .odp and .odt formats gives exception [message #801299 is a reply to message #801014] Sat, 18 February 2012 06:28 Go to previous messageGo to next message
Deepali Patil is currently offline Deepali PatilFriend
Messages: 22
Registered: January 2012
Junior Member
Hi,

Thanks for reply.
Please find attached file for code.


Thanks,
Deepali.
Re: .odp and .odt formats gives exception [message #803631 is a reply to message #801299] Tue, 21 February 2012 15:48 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Can you try to close the task after you run the report?
task.run();
task.close();

Jason

On 2/18/2012 1:28 AM, Deepali Patil wrote:
> Hi,
>
> Thanks for reply.
> Please find attached file for code.
>
>
> Thanks,
> Deepali.
Re: .odp and .odt formats gives exception [message #804011 is a reply to message #803631] Wed, 22 February 2012 04:48 Go to previous messageGo to next message
Deepali Patil is currently offline Deepali PatilFriend
Messages: 22
Registered: January 2012
Junior Member
Hi,

Thanks for the reply,

I added task.close() in my code but exception still occurs for odp and odf format.

Please suggest something which resolve this exception.


Feb 22, 2012 10:10:44 AM org.eclipse.birt.report.engine.emitter.odp.OdpEmitter save
SEVERE: Stream closed
java.io.IOException: Stream closed
	at java.util.zip.ZipOutputStream.ensureOpen(Unknown Source)
	at java.util.zip.ZipOutputStream.closeEntry(Unknown Source)
	at org.eclipse.birt.report.engine.odf.pkg.Package.writeManifest(Package.java:188)
	at org.eclipse.birt.report.engine.odf.pkg.Package.close(Package.java:120)
	at org.eclipse.birt.report.engine.emitter.odp.OdpEmitter.save(OdpEmitter.java:87)
	at org.eclipse.birt.report.engine.emitter.odp.OdpEmitter.end(OdpEmitter.java:63)
	at org.eclipse.birt.report.engine.nLayout.LayoutEngine.end(LayoutEngine.java:345)
	at org.eclipse.birt.report.engine.emitter.CompositeContentEmitter.end(CompositeContentEmitter.java:65)
	at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:182)
	at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
	at com.sne.reportRunner.reportCreator.ReportGeneratorImpl.generateReport(ReportGeneratorImpl.java:95)
	at com.sne.reportRunner.reportCreator.ReportGeneratorImplTest.testThatReportInExcelFormatFileIsGenerated(ReportGeneratorImplTest.java:83)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
	at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
	at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
	at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
	at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
	at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)



Thanks,
Deepali.

Re: .odp and .odt formats gives exception [message #804382 is a reply to message #804011] Wed, 22 February 2012 15:08 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Is it possible in your app that two threads are writing to the same
output file?

Jason

On 2/21/2012 11:48 PM, Deepali Patil wrote:
> Hi,
>
> Thanks for the reply,
>
> I added task.close() in my code but exception still occurs for odp and
> odf format.
>
> Please suggest something which resolve this exception.
>
>
> Feb 22, 2012 10:10:44 AM
> org.eclipse.birt.report.engine.emitter.odp.OdpEmitter save
> SEVERE: Stream closed
> java.io.IOException: Stream closed
> at java.util.zip.ZipOutputStream.ensureOpen(Unknown Source)
> at java.util.zip.ZipOutputStream.closeEntry(Unknown Source)
> at
> org.eclipse.birt.report.engine.odf.pkg.Package.writeManifest(Package.java:188)
>
> at org.eclipse.birt.report.engine.odf.pkg.Package.close(Package.java:120)
> at
> org.eclipse.birt.report.engine.emitter.odp.OdpEmitter.save(OdpEmitter.java:87)
>
> at
> org.eclipse.birt.report.engine.emitter.odp.OdpEmitter.end(OdpEmitter.java:63)
>
> at
> org.eclipse.birt.report.engine.nLayout.LayoutEngine.end(LayoutEngine.java:345)
>
> at
> org.eclipse.birt.report.engine.emitter.CompositeContentEmitter.end(CompositeContentEmitter.java:65)
>
> at
> org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:182)
>
> at
> org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
>
> at
> com.sne.reportRunner.reportCreator.ReportGeneratorImpl.generateReport(ReportGeneratorImpl.java:95)
>
> at
> com.sne.reportRunner.reportCreator.ReportGeneratorImplTest.testThatReportInExcelFormatFileIsGenerated(ReportGeneratorImplTest.java:83)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
>
> at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>
> at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
>
> at
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
>
> at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>
> at
> org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
>
> at
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
> at
> org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
>
> at
> org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
>
> at
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
>
> at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
>
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
> at
> org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
>
> at
> org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
>
> at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
> at
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)
>
> at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
>
> at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
>
>
>
> Thanks,
> Deepali.
>
>
Re: .odp and .odt formats gives exception [message #804485 is a reply to message #804382] Wed, 22 February 2012 17:27 Go to previous messageGo to next message
Deepali Patil is currently offline Deepali PatilFriend
Messages: 22
Registered: January 2012
Junior Member
Hi,

Thanks for reply,

I am generating output report with generating random file name, therefore no possibility of writing to the same output report file.

final String outputFile = outputFileNameGenerator.getOutputFileNameFor(
Integer.toString(reportId) + "." + outputFormat);

I am not getting where I am going wrong.
Please help me to sort out this exception.

Thanks,
Deepali.
Re: .odp and .odt formats gives exception [message #804511 is a reply to message #804485] Wed, 22 February 2012 18:07 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Can you reproduce the issue with a command line app that I can run?

Jason

On 2/22/2012 12:27 PM, Deepali Patil wrote:
> Hi,
>
> Thanks for reply,
>
> I am generating output report with generating random file name,
> therefore no possibility of writing to the same output report file.
>
> final String outputFile = outputFileNameGenerator.getOutputFileNameFor(
> Integer.toString(reportId) + "." + outputFormat);
>
> I am not getting where I am going wrong.
> Please help me to sort out this exception.
>
> Thanks, Deepali.
Re: .odp and .odt formats gives exception [message #804930 is a reply to message #804511] Thu, 23 February 2012 06:38 Go to previous messageGo to next message
Deepali Patil is currently offline Deepali PatilFriend
Messages: 22
Registered: January 2012
Junior Member
Hi,

I have attached an application which creates a report which you can run through command line.
This application is created using maven.

Changes that you need to do to run the application.
1) In pom.xml set <birt.runtime.location> to the lib of ReportEngine.

Run the application on command prompt using maven. On command prompt go to the folder where you have copied attached files. Run the below command
report-runner>mvn clean eclipse:clean eclipse:eclipse install
It will build successful but with exception.

Please go through my code.

Thanks,
Deepali.
Re: .odp and .odt formats gives exception [message #805502 is a reply to message #804930] Thu, 23 February 2012 20:59 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Can you compare your POM to the one in this thread:
http://www.birt-exchange.org/org/forum/index.php/topic/24196-mavenizing-birt-3-7-1/page__s__22a7ecc0cee225f7eb3ac8c3399c5491

Jason

On 2/23/2012 1:38 AM, Deepali Patil wrote:
> Hi,
>
> I have attached an application which creates a report which you can run through command line.
> This application is created using maven.
>
> Changes that you need to do to run the application.
> 1) In pom.xml set<birt.runtime.location> to the lib of ReportEngine.
>
> Run the application on command prompt using maven. On command prompt go to the folder where you have copied attached files. Run the below command
> report-runner>mvn clean eclipse:clean eclipse:eclipse install
> It will build successful but with exception.
>
> Please go through my code.
>
> Thanks,
> Deepali.
Re: .odp and .odt formats gives exception [message #805953 is a reply to message #805502] Fri, 24 February 2012 10:37 Go to previous messageGo to next message
Deepali Patil is currently offline Deepali PatilFriend
Messages: 22
Registered: January 2012
Junior Member
Hi,

Thanks for the reply,
I use the pom given on link http://www.birt-exchange.org/org/forum/index.php/topic/24196-mavenizing-birt-3-7-1/page__s__22a7ecc0cee225f7eb3ac8c3399c5491

still gives same exception.
Please help me to sort out this exception.

Thanks,
Deepali.
Re: .odp and .odt formats gives exception [message #808385 is a reply to message #804930] Mon, 27 February 2012 18:25 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

I just opened a bug for this. It appears to be an issue in 3.7.1 and 3.7.2.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=372671

Jason

On 2/23/2012 1:38 AM, Deepali Patil wrote:
> Hi,
>
> I have attached an application which creates a report which you can run through command line.
> This application is created using maven.
>
> Changes that you need to do to run the application.
> 1) In pom.xml set<birt.runtime.location> to the lib of ReportEngine.
>
> Run the application on command prompt using maven. On command prompt go to the folder where you have copied attached files. Run the below command
> report-runner>mvn clean eclipse:clean eclipse:eclipse install
> It will build successful but with exception.
>
> Please go through my code.
>
> Thanks,
> Deepali.
Re: .odp and .odt formats gives exception [message #808780 is a reply to message #808385] Tue, 28 February 2012 05:59 Go to previous message
Deepali Patil is currently offline Deepali PatilFriend
Messages: 22
Registered: January 2012
Junior Member
Hi,

Thank you.


Regards,
Deepali.
Previous Topic:Duplicate reports
Next Topic:Parameter Display Value
Goto Forum:
  


Current Time: Fri Mar 29 00:27:25 GMT 2024

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

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

Back to the top