DO NOT REPLY [Bug 29365] - Zip file remains open

2005-10-14 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29365


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEEDINFO|ASSIGNED




--- Additional Comments From [EMAIL PROTECTED]  2005-10-14 16:49 ---
I can confirm that this issue still exists in BRANCH_2_1_X. I tried with JDK
1.4.2_07 and 1.4.2_09. Both pipelines give the same problem. Stupid thing is
that I can open the file with OpenOffice AND save it. If I then call either
pipeline Cocoon stumbles over the file with an error:

org.xml.sax.SAXParseException: The element type "office:body" must be terminated
by the matching end-tag "".

When Jetty is restarted the file previously changed with OO is again shown
correctly.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 29365] - Zip file remains open

2005-08-14 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29365


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |NEEDINFO




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 29365] - Zip file remains open

2005-04-05 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29365





--- Additional Comments From [EMAIL PROTECTED]  2005-04-06 08:30 ---
Recently, java released 1.4.2_08, between the bugs closed is
"ZipFile$ZipFileInputStream doesn't close handle to zipfile:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5105410

Can you test if this is still a problem in cocoon 2.1.7?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 29365] - Zip file remains open

2004-06-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29365

Zip file remains open





--- Additional Comments From [EMAIL PROTECTED]  2004-06-07 11:05 ---
Under Cocoon 2.1.5 it seems it happens also if using pipeline "a".

Workaround:
-

I have made the following generator, that closes the file.  The zip file is
specified through the "source" parameter, whereas the file inside the zip throgh
the "fich" parameter.

package fcc.ima.doc;

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;

import org.apache.avalon.framework.service.ServiceException;
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.generation.ServiceableGenerator;
import org.apache.excalibur.xml.sax.SAXParser;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;

import fcc.ima.ruta.ConfigGlobal;

/**Genera a partir de un ZIP.  A diferencia de FileGenerator con protocolo jar:,
cierra el fichero tras usarlo.
 * @author dperezcar */
public class GenZip extends ServiceableGenerator {
   /** @see org.apache.cocoon.generation.Generator#generate() */
   public void generate() throws IOException, SAXException, ProcessingException {
  ZipInputStream is = null;
  String fich = parameters.getParameter("fich", "content.xml");
  is = new ZipInputStream(new BufferedInputStream(new
FileInputStream(ConfigGlobal.i().resuelveRuta(source;
  try {
 while (true) {
ZipEntry ze = is.getNextEntry();
if (ze.getName().equals(fich)) {
   SAXParser parser = null;
   try {
  parser = (SAXParser) manager.lookup( SAXParser.ROLE);
  parser.parse(new InputSource(is), super.xmlConsumer);
  return;
   } finally {
  manager.release(parser);
   }
}
 }
  } catch (ServiceException e) {
 throw new ProcessingException(e);
  } finally {
 if (is != null) {
try {
   is.close();
} catch (IOException e) {
}
 }
  }
   }
}