Welcome to the Xceed Community | Help
Community Search  
More Search Options

Xceedzip Component - xsrAccessDenied Issue

Sort Posts: Previous Next
  •  03-18-2009, 9:13 AM Post no. 19387

    Xceedzip Component - xsrAccessDenied Issue

    Hi,

    We are facing some issues with file unzipping. Following are the two scenarios that detail out where we are facing problem.

    Scenario 1
    There's a zip file that we received from another team which uses java.util.zip (Java 5) for zipping process. Now while using Xceed Zip Compression Library v4.1 to unzip the file, we found the following details were getting logged during SkippingFileEvent for a folder which was empty.

    xAttributes = xfaNone
    xMethod = xcmDeflated
    bEncrypted = False
    xReason = xsrAccessDenied

    For all the other files (not the folders except the one mentioned above) xsrIncluded message was logged during UnzipPreprocessingFileEvent. And the end result of this process was xcdError.xerFilesSkipped.

    We would like to know what does the above mentioned set of attribute combination signify? Why does an empty folder throw an error for FilesSkipped?

    Scenario 2

    We created a zip file using Winzip v8.0 with couple empty folders. The zipping did not throw any errors. Now while using Xceed Zip Compression Library v4.1 to unzip the file, we found the following details were getting logged for all the folders (not for the files - files had xsrIncluded message with them).

    xAttributes = xfaFolder
    xMethod = xcmStored
    bEncrypted = False
    xReason = xsrExcludedAttributes

    These details were first logged during UnzipPreprocessingFileEvent and then during SkippingFileEvent. However the final result of it was successful, that is giving us xcdError.xerSuccess

    We'd like to know why are the folders having bExcluded as true and hence logging the above details and if its an error, how can we rectify it? Also, does the above mentioned set of attribute combination signify anything in particular?

    Any suggestions or pointers are welcome. Thanks in advance for your help.

    Filed under:
  •  03-18-2009, 12:04 PM Post no. 19398 in reply to 19387

    Re: Xceedzip Component - xsrAccessDenied Issue

    Scenario 1 :

    Except from the help documentation on the xsrAccessDenied skipping reason :

    "The file being unzipped could not be written because the already existing file it was about to replace could not be deleted by the library."

    http://doc.xceedsoft.com/products/XceedZip/xsrAccessDenied_constant.html

    This looks like a permission problem.

     

    Scenario 2 :

    You need to set the ExcludedFileAttributes property properly so it will process files and folders according to your requirements.  By default it is set to exclude empty folders ( xfaVolume + xfaFolder ).  You can change it so it does not exclude empty folders ( e.g. xfaVolume ).

    Here is more information for the help documentation :

    http://doc.xceedsoft.com/products/XceedZip/ExcludedFileAttributes_property.html

    Note that there is also a RequiredFileAttributes property, which does exactly the opposite.  But in your case, you probably simply want to set the ExcludedFileAttributes property.

    http://doc.xceedsoft.com/products/XceedZip/RequiredFileAttributes_property.html

     


    André
    Software Developer
    Xceed Software Inc.
  •  03-19-2009, 4:28 AM Post no. 19414 in reply to 19398

    Re: Xceedzip Component - xsrAccessDenied Issue

    Hi Andre, Thanks again for your prompt reply. Your reply has solved the issue mentioned in Scenario 2.

    Regarding Scenario 1, you've mentioned that it could be a permission issue. We did explore that angle but that doesn't seem to be the case. Also, the point here is that it throws an error for an empty folder so there are no files involved and moreover, the empty folder still gets formed in the output folder.

    Couple of questions:
    1. Are you aware of java.util.zip having any compatibility issues with Xceed? (escpecially with regard to empty folders)
    2. You mentioned that setting xfaVolume makes sure that empty folders are not excluded. Could you please explain what xfaNone really does (apart from what is mentioned in the documentation - "No specific attributes must be off in order to process files")?

    We appreciate your help and patience. Thanks a ton for it.

  •  03-19-2009, 12:56 PM Post no. 19448 in reply to 19414

    Re: Xceedzip Component - xsrAccessDenied Issue

    We don't know how java.util.zip works.  Now it is possible the folder items don't have the xfaFolder attribute when zipped by java.util.zip, but this should not prevent them from being processed correctly.

    When you Unzip, do the problematic folders already exist on your drive? If so, they might be locked by another process. Do you get xsrAccessDenied if you unzip to a completely clean destination?

    xfaVolume means files that have the "volume" attribute set.  Combined with the xfaFolder, it's just a good default value. On Windows file systems, there are files (not shown by Windows explorer) with the "volume" attribute that aren't useful when zipping.  Setting xfaNone means all files and folders will be treated, including those "volume" files.

    You can send us a zip file that has this behavior at support@xceed.com, and we will have a look at it.  Make a reference to this post in your email.

     


    André
    Software Developer
    Xceed Software Inc.
  •  03-20-2009, 10:40 AM Post no. 19485 in reply to 19448

    Re: Xceedzip Component - xsrAccessDenied Issue

    Hi Andre, Thanks for your regular replies and the valuable information provided.

    To answer your question, we always unzip the contents into a completely clean destination.

    Also as you had mentioned, we have sent a mail to support@xceed.com with the description and zip files which cause problems. We've also sent the java code along with it which zips the file. Please let us know if there's anything else that would be required.

    Thanks again.

View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.