Jackrabbit Content Repository
  1. Jackrabbit Content Repository
  2. JCR-695

Repository requires access to external resource

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.1
    • Component/s: config
    • Labels:
      None
    • Environment:
      Windows XP, Maven 2.0, Java 1.5.0-8

      Description

      With the changes from JCR-626 jackrabbit requires access to the resource at the URL http://jackrabbit.apache.org/dtd/repository-1.2.dtd. If no connection to the internet is available jackrabbit will refuse to start. At least that's the case when I run the test cases in the above mentioned environment.

      I'm not an XML expert, but shouldn't the doctype declaration use a public identifier? Otherwise the ConfigurationEntityResolver class doesn't make much sense.

      The attached patch solve the issue for me, please comment. I've also targetted this issue for 1.2 because it seems rather serious to me if you can't start jackrabbit when you don't have an internet connection, or am I the only one with this issue?

      1. JCR-695-r492185.patch
        5 kB
        Marcel Reutegger

        Activity

        Hide
        Jukka Zitting added a comment -

        Fixed in revisions 493026 and 493031.

        The public identifier of the DTD is "-//The Apache Software Foundation//DTD Jackrabbit 1.2//EN", and I also made the ConfigurationEntityResolver use the local copy of the DTD even if just the system identifier "http://jackrabbit.apache.org/dtd/repository-1.2.dtd" is used.

        Show
        Jukka Zitting added a comment - Fixed in revisions 493026 and 493031. The public identifier of the DTD is "-//The Apache Software Foundation//DTD Jackrabbit 1.2//EN", and I also made the ConfigurationEntityResolver use the local copy of the DTD even if just the system identifier "http://jackrabbit.apache.org/dtd/repository-1.2.dtd" is used.
        Hide
        Tobias Bocanegra added a comment -

        using the public reference and non-validating parser is probably the best. i would leave the doctype references in the configs as guidance for xml editors.

        Show
        Tobias Bocanegra added a comment - using the public reference and non-validating parser is probably the best. i would leave the doctype references in the configs as guidance for xml editors.
        Hide
        Jukka Zitting added a comment -

        I noticed this same problem while testing 1.2, it's certainly a blocker.

        Using public identifiers with the ConfigurationEntityResolver seems like the correct solution, but I think we should add a version number to the public identifier and we probably don't need separate identifiers for the Repository and Workspace configurations.

        Another alternative would simply be to drop the DOCTYPE declarations from the configuration templates and treat the DTDs as simply manual guidance that you can use with an XML editor. In any case we don't validate the configuration files at runtime so having an exact DOCTYPE doesn't bring that much value.

        Show
        Jukka Zitting added a comment - I noticed this same problem while testing 1.2, it's certainly a blocker. Using public identifiers with the ConfigurationEntityResolver seems like the correct solution, but I think we should add a version number to the public identifier and we probably don't need separate identifiers for the Repository and Workspace configurations. Another alternative would simply be to drop the DOCTYPE declarations from the configuration templates and treat the DTDs as simply manual guidance that you can use with an XML editor. In any case we don't validate the configuration files at runtime so having an exact DOCTYPE doesn't bring that much value.

          People

          • Assignee:
            Jukka Zitting
            Reporter:
            Marcel Reutegger
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development