Project: Birt
Bug 236389 Exception was shown when data engine trys to close an archive file which has already been closed
Reported: 2008-06-10 05:03:20 | Status: verified fixed

Task: run Please refers to attached report design Here is exception log: org.eclipse.birt.data.engine.core.DataException: A report document error occurred when getting the save stream. Can not get entry named /DataEngine/NamingRelation because the archive file has been closed. System ID: null at org.eclipse.birt.data.engine.api.DataEngineContext.getOutputStream(DataEngineContext.java:292) at org.eclipse.birt.data.engine.impl.document.BaseSave.saveNamingRelation(BaseSave.java:53) at org.eclipse.birt.data.engine.impl.ResultIterator$RDSaveHelper.saveNamingRelation(ResultIterator.java:1115) at org.eclipse.birt.data.engine.impl.ResultIterator$RDSaveHelper.access$2(ResultIterator.java:1112) at org.eclipse.birt.data.engine.impl.ResultIterator.saveNamingRelation(ResultIterator.java:892) at org.eclipse.birt.data.engine.impl.ResultIterator.close(ResultIterator.java:846) at org.eclipse.birt.data.engine.impl.ResultIterator.finalize(ResultIterator.java:874) at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method) at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83) at java.lang.ref.Finalizer.access$100(Finalizer.java:14) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160) Caused by: java.io.IOException: Can not get entry named /DataEngine/NamingRelation because the archive file has been closed. System ID: null at org.eclipse.birt.core.archive.compound.ArchiveFile.getEntry(ArchiveFile.java:294) at org.eclipse.birt.core.archive.compound.ArchiveWriter.openRandomAccessStream(ArchiveWriter.java:63) at org.eclipse.birt.data.engine.api.DataEngineContext.getOutputStream(DataEngineContext.java:283) ... 10 more

Files changed in fix:
core/org.eclipse.birt.core/src/org/eclipse/birt/core/util/IOUtil.java data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/CachedQueryResults.java data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/DataEngineImpl.java data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/DataEngineSession.java data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/NamingRelationUtil.java data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/PreparedDummyQuery.java data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/PreparedQueryUtil.java data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/QueryResults.java data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/ResultIterator.java data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/document/IRDSave.java data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/document/NamingRelation.java data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/document/RDSave.java data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/document/RDSave2.java