GeoServer
  1. GeoServer
  2. GEOS-509

Schema validation with data directory

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.3.0 RC7
    • Fix Version/s: 1.3.0 PR1
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      With the new data directory system, the SLD document for validation is not found anymore. It dies in jetty (windows insall) and tomcat; it works fine in eclipse.

        Activity

        Hide
        Brent Owens added a comment -

        This is only a problem for submitting/validating the SLD document. The images will still render with the appropriate SLD.

        Show
        Brent Owens added a comment - This is only a problem for submitting/validating the SLD document. The images will still render with the appropriate SLD.
        Hide
        Brent Owens added a comment -

        It appears that eclipse makes the execution work, by adding missing files to the path. We just need to find those files and add them manually so jetty/tomcat can use them.

        Show
        Brent Owens added a comment - It appears that eclipse makes the execution work, by adding missing files to the path. We just need to find those files and add them manually so jetty/tomcat can use them.
        Hide
        Brent Owens added a comment -

        Upon reinspection, it has nothing to do with eclipse. It fails to find the schema file if there is a space in the URL. ie. "Program Files"

        Show
        Brent Owens added a comment - Upon reinspection, it has nothing to do with eclipse. It fails to find the schema file if there is a space in the URL. ie. "Program Files"
        Hide
        Brent Owens added a comment -

        Quoting Chris:
        "This may be kind of a backwards way to do it, like there should be a
        real way to solve the problem, but what about using the file at the url
        instead of in the file tree. Ie the schemas stuff is always going to
        be public, and instead of calling getDataDir you can call
        Requests.getBaseUrl() (would probably have to change the method
        signature of validateSLD to use the servlet request instead of the
        context), and then add on schemas/sld. I think you'll have to change
        the xerces validation method - to get it to recognize the 'remote'
        file, instead of one on the path. Looking at the code it actually
        looks like the xerces stuff uses a Url anyways to set the schema
        location, and digging into it, it looks like we go from Url -> String,
        and tack that on, which is probably why it fails. So the http://
        location that results from Requests.getBaseUrl() should likely do a lot
        better. The other option would be to fix up the proper escaping when
        we go File -> String."

        Show
        Brent Owens added a comment - Quoting Chris: "This may be kind of a backwards way to do it, like there should be a real way to solve the problem, but what about using the file at the url instead of in the file tree. Ie the schemas stuff is always going to be public, and instead of calling getDataDir you can call Requests.getBaseUrl() (would probably have to change the method signature of validateSLD to use the servlet request instead of the context), and then add on schemas/sld. I think you'll have to change the xerces validation method - to get it to recognize the 'remote' file, instead of one on the path. Looking at the code it actually looks like the xerces stuff uses a Url anyways to set the schema location, and digging into it, it looks like we go from Url -> String, and tack that on, which is probably why it fails. So the http:// location that results from Requests.getBaseUrl() should likely do a lot better. The other option would be to fix up the proper escaping when we go File -> String."

          People

          • Assignee:
            Brent Owens
            Reporter:
            Brent Owens
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: