Uploaded image for project: 'Jackrabbit FileVault'
  1. Jackrabbit FileVault
  2. JCRVLT-644

Import of package with not well-formed DocViews behaves differently since 3.6.0 for isStrict = false

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.6.0
    • 3.6.4
    • vlt
    • None

    Description

      It appears that the behavior for packages containing broken content.xml entries changed in (ca.) version 3.5.2.

      Attachments

        Issue Links

          Activity

            reschke Julian Reschke added a comment - - edited

            See

            https://github.com/apache/jackrabbit-filevault/commit/251b865cb7fff58d1e6716398a8e970d31f840ff

            the new test passes; nothing is imported.

            When run pre-3.5.0, (I tried 3.4.8), the "assertNodeMissing("/testroot");" fails; thus import proceeded after the XML exception (which is also not thrown).

            reschke Julian Reschke added a comment - - edited See https://github.com/apache/jackrabbit-filevault/commit/251b865cb7fff58d1e6716398a8e970d31f840ff the new test passes; nothing is imported. When run pre-3.5.0, (I tried 3.4.8), the "assertNodeMissing("/testroot");" fails; thus import proceeded after the XML exception (which is also not thrown).
            reschke Julian Reschke added a comment -

            So it seems this is caused by:

            commit 4590f8f71b01e51fe2faaec26f86fa5af2a5c8e8 (HEAD)
            Author: Konrad Windszus <kwin@apache.org>
            Date: Wed Jun 30 09:48:07 2021 +0200

            JCRVLT-543 ignore protected properties during import (#154)

            dynamically determine if a property is protected
            fail with an exception for all other constraint violations (in mode =
            REPLACE)

            reschke Julian Reschke added a comment - So it seems this is caused by: commit 4590f8f71b01e51fe2faaec26f86fa5af2a5c8e8 (HEAD) Author: Konrad Windszus <kwin@apache.org> Date: Wed Jun 30 09:48:07 2021 +0200 JCRVLT-543 ignore protected properties during import (#154) dynamically determine if a property is protected fail with an exception for all other constraint violations (in mode = REPLACE)
            reschke Julian Reschke added a comment -

            So somehow exception handling changed in a subtle way. I believe to the better, but it still affects existing content.

            reschke Julian Reschke added a comment - So somehow exception handling changed in a subtle way. I believe to the better, but it still affects existing content.

            The commit https://github.com/apache/jackrabbit-filevault/commit/4590f8f71b01e51fe2faaec26f86fa5af2a5c8e8#diff-4e9c587208abb465e3c93af5e8b6868f0b8b8e09b6dc5fd48e0b8b658b2f3cf3R462 only changed the isStrict flag used in ITs by default from false to true. However, a modified test with explicit setStrict(false) on the used ImportOptions still fails in master, so it seems another subsequent commit is the culprit.

            kwin Konrad Windszus added a comment - The commit https://github.com/apache/jackrabbit-filevault/commit/4590f8f71b01e51fe2faaec26f86fa5af2a5c8e8#diff-4e9c587208abb465e3c93af5e8b6868f0b8b8e09b6dc5fd48e0b8b658b2f3cf3R462 only changed the isStrict flag used in ITs by default from false to true . However, a modified test with explicit setStrict(false) on the used ImportOptions still fails in master, so it seems another subsequent commit is the culprit.
            kwin Konrad Windszus added a comment - - edited The change was introduced with https://github.com/apache/jackrabbit-filevault/commit/81245c26caa138b883010fefd66a96938b6bb84f#diff-1e61b31374ccb99480e94034d365dd1b79018b6f54316d2fd2bfdc37eeb4a07cL99 ( JCRVLT-357 ) for isStrict = false . Prior the commit the SAXException was just caught in GenericArtifactHandler and lead to setting the error flag. After the commit it was wrapped as XmlParseException which was again wrapped as RepositoryException (funnily the latter always happened in https://github.com/apache/jackrabbit-filevault/blob/5f3b1d363da7bcf3c285a0bdbb394254ca3e57d1/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/FileArtifactHandler.java#L243 and https://github.com/apache/jackrabbit-filevault/blob/5f3b1d363da7bcf3c285a0bdbb394254ca3e57d1/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/FileArtifactHandler.java#L344 for the FileArtifactHandler ).
            kwin Konrad Windszus added a comment - Fixed in https://github.com/apache/jackrabbit-filevault/commit/495e85a789591667be58c2520db126122dcadbeb .

            People

              kwin Konrad Windszus
              reschke Julian Reschke
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: