Skip to main content
Inspiring
April 10, 2008
Question

ZIP files in CF8 or CF MX 7?

  • April 10, 2008
  • 1 reply
  • 417 views
Is there something built into CF that will zip files by default (not using
3rd party code)??

I'm using the following script:

<cfscript>
zip=CreateObject("component","Zip");
status=zip.AddFiles("D:\home\salleboise.com\wwwroot\emailDocs\#SendFileName#.zip",
"#FileList#");
</cfscript>

But now I'm getting:

Object Instantiation Exception.
An exception occurred while instantiating a Java object. The class must not
be an interface or an abstract class. If the class has a constructor that
accepts an argument, you must call the constructor explicitly using the
init(args) method. Error : java.util.zip.ZipOutputStream

The error occurred in D:\home\salleboise.com\wwwroot\CF\Zip.cfc: line 172
Called from D:\home\salleboise.com\wwwroot\CF\AddInfo.cfm: line 181
Called from D:\home\salleboise.com\wwwroot\CF\Zip.cfc: line 172
Called from D:\home\salleboise.com\wwwroot\CF\AddInfo.cfm: line 181

170 : {
171 : /* Close Zip file */
172 : zipOutput.close();
173 :
174 : /* Return false */



    This topic has been closed for replies.

    1 reply

    Inspiring
    April 10, 2008
    my guess would be that your new host has disabled access to interna cf
    java components...

    luckily for you, cf8 has a <cfzip> & <cfzipparam> tag! check the specs &
    usage in livedocs or cfml reference.

    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/