uDIG
  1. uDIG
  2. UDIG-1705

uDIG does not open geowebcache- wms-c urls

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: UDIG 1.2.RC3
    • Fix Version/s: UDIG 1.4.0
    • Component/s: webservices
    • Labels:
      None
    • Environment:
      Windows 7, GWC- Geowebcache NIGHTLY, built 2010-03-03 (included in Geoserver 2.0.2), uDIG Version: 1.2-SNAPSHOT

      Description

      When I insert a url like "http://linux:8080/geoserver/gwc/service/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=getcapabilities&TILED=true" uDIG is not able to open it. It throws an exception in the log.

      !ENTRY net.refractions.udig.catalog.internal.wms 4 0 2010-07-27 07:07:11.027
      !MESSAGE WMSC GetCapabilities: http://linux:8080/geoserver/gwc/service/wms?REQUEST=GetCapabilities&SERVICE=WMS

      !ENTRY net.refractions.udig.catalog.internal.wms 4 0 2010-07-27 07:07:11.105
      !MESSAGE Cannot convert string to url:
      !STACK 0
      java.net.MalformedURLException: no protocol:
      at java.net.URL.<init>(Unknown Source)
      at java.net.URL.<init>(Unknown Source)
      at java.net.URL.<init>(Unknown Source)
      at net.refractions.udig.catalog.wmsc.server.WMSCComplexTypes$_ServiceType.getValue(WMSCComplexTypes.java:739)
      at org.geotools.xml.handlers.ComplexElementHandler.endElement(ComplexElementHandler.java:186)
      at org.geotools.xml.XMLSAXHandler.endElement(XMLSAXHandler.java:266)
      at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
      at org.apache.xerces.impl.dtd.XMLNSDTDValidator.endNamespaceScope(Unknown Source)
      at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
      at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
      at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      at javax.xml.parsers.SAXParser.parse(Unknown Source)
      at javax.xml.parsers.SAXParser.parse(Unknown Source)
      at org.geotools.xml.DocumentFactory.getInstance(DocumentFactory.java:140)
      at net.refractions.udig.catalog.wmsc.server.WMSCCapabilitiesResponse.<init>(WMSCCapabilitiesResponse.java:70)
      at net.refractions.udig.catalog.wmsc.server.TiledWebMapServer$CapabilitiesRequest.createResponse(TiledWebMapServer.java:247)
      at net.refractions.udig.catalog.wmsc.server.TiledWebMapServer.issueRequest(TiledWebMapServer.java:315)
      at net.refractions.udig.catalog.wmsc.server.TiledWebMapServer.readCapabilities(TiledWebMapServer.java:174)
      at net.refractions.udig.catalog.wmsc.server.TiledWebMapServer.getCapabilities(TiledWebMapServer.java:139)
      at net.refractions.udig.catalog.wmsc.server.TiledWebMapServer.getCapabilitiesXml(TiledWebMapServer.java:216)
      at net.refractions.udig.catalog.internal.wmsc.WMSCServiceImpl.getWMSC(WMSCServiceImpl.java:204)

      1. capabilities.esrimap
        4 kB
        Georg Weickelt
      2. capabilities.xml
        5 kB
        Georg Weickelt
      3. tiledVendorSpecificNested.sld
        59 kB
        Mat Balmer
      4. udig1705.log
        7 kB
        Jody Garnett
      5. wmscCapabilities.xml
        270 kB
        Jody Garnett
      6. wmscCapabilities2.xml
        10 kB
        Jody Garnett
      7. wmscCapabilities3.xml
        10 kB
        Arne Kepp

        Issue Links

          Activity

          Hide
          Mat Balmer added a comment - - edited
          The file <<tiledVendorSpecificNested.sld>> contains the VendorSpecificCapabilities. But uDig gives a "VendorSpecificCapabilities not found" error message while loading it.
          Show
          Mat Balmer added a comment - - edited The file <<tiledVendorSpecificNested.sld>> contains the VendorSpecificCapabilities. But uDig gives a "VendorSpecificCapabilities not found" error message while loading it.
          Hide
          Jody Garnett added a comment - - edited
          I added a test case for the two recent attachments:

          tiledVendorSpecificNested.xml
          - appears to work
          - file is parsed
          - has non empty tiles
          - console had:
            
             OnlineResource cannot be empty
             Cannot decode tile epsg code: EPSG:900913
             ...

          - not sure about OnlineResource being empty
          - EPSG:900913 should not occur when run from uDig as we have an extra epsg.properties to define these extra non standard codes

          esrimapCapabilities.xml
          - does not work
          - parses
          - does not result in any tiles
          - console has the same two warnings:

             OnlineResource cannot be empty
             Cannot decode tile epsg code: EPSG:900913

          So I think the OnlineResource definition is actually causing a trouble ...

                          // OnlineResource
                          if (sameName(elems[2], value[i])) {
                              String spec = (String) value[i].getValue();
                              if( spec == null || spec.length() == 0){
                                  // Service not avaialble
                                  System.out.println("OnlineResource cannot be empty");
                              }
                              else {
                                  try {
                                      service.setOnlineResource(new URL( spec ));
                                  } catch (MalformedURLException e) {
                                     System.out.println("OnlineResource cannot string to url: " +spec); //$NON-NLS-1$
                                  }
                              }
                          }

          Looks I expect it does not like the xlink? Still the same warning is produced from the demo geowebcache which works...

          Looked at in in a debugger; the code doing the parsing is org.geotools.xml.xsi.XSISimpleTypes - which is there to parse simple strings rather than xlink. This may be worth a separate bug report.
          Show
          Jody Garnett added a comment - - edited I added a test case for the two recent attachments: tiledVendorSpecificNested.xml - appears to work - file is parsed - has non empty tiles - console had:       OnlineResource cannot be empty    Cannot decode tile epsg code: EPSG:900913    ... - not sure about OnlineResource being empty - EPSG:900913 should not occur when run from uDig as we have an extra epsg.properties to define these extra non standard codes esrimapCapabilities.xml - does not work - parses - does not result in any tiles - console has the same two warnings:    OnlineResource cannot be empty    Cannot decode tile epsg code: EPSG:900913 So I think the OnlineResource definition is actually causing a trouble ...                 // OnlineResource                 if (sameName(elems[2], value[i])) {                     String spec = (String) value[i].getValue();                     if( spec == null || spec.length() == 0){                         // Service not avaialble                         System.out.println("OnlineResource cannot be empty");                     }                     else {                         try {                             service.setOnlineResource(new URL( spec ));                         } catch (MalformedURLException e) {                            System.out.println("OnlineResource cannot string to url: " +spec); //$NON-NLS-1$                         }                     }                 } Looks I expect it does not like the xlink? Still the same warning is produced from the demo geowebcache which works... Looked at in in a debugger; the code doing the parsing is org.geotools.xml.xsi.XSISimpleTypes - which is there to parse simple strings rather than xlink. This may be worth a separate bug report.
          Hide
          Mat Balmer added a comment - - edited
          Changed the OnlineResource manually, moved the link inside the tag:

          <OnlineResource>http://nrhn506d.nrhi.ch:8080/geoserver/gwc/service/wms?SERVICE=WMS&&lt;/OnlineResource>

          This way it is able to parse the document. But somehow this should be fixed that the implementation also takes the href attribute into account (and not only the content of the element).

          Furthermore I observed something interesting about the epsg.properties file:

          If uDig is located in a path containing a whitespace (e.g. c:/program files/uDig) I get an "invalid character" warning upon startup and the additional codes are not loaded at all. When uDig is located on a path without whitespaces, the codes are loaded without any problems. I guess this needs some URL encoding there.
          Show
          Mat Balmer added a comment - - edited Changed the OnlineResource manually, moved the link inside the tag: <OnlineResource> http://nrhn506d.nrhi.ch:8080/geoserver/gwc/service/wms?SERVICE=WMS&&lt;/OnlineResource > This way it is able to parse the document. But somehow this should be fixed that the implementation also takes the href attribute into account (and not only the content of the element). Furthermore I observed something interesting about the epsg.properties file: If uDig is located in a path containing a whitespace (e.g. c:/program files/uDig) I get an "invalid character" warning upon startup and the additional codes are not loaded at all. When uDig is located on a path without whitespaces, the codes are loaded without any problems. I guess this needs some URL encoding there.
          Hide
          Jody Garnett added a comment -
          ah the dreaded white space file / url trouble - a friend we know well. Can we open a separate bug report for that one?
          I am not sure if this version of the parser can handle attributes; we will need to check.
          Show
          Jody Garnett added a comment - ah the dreaded white space file / url trouble - a friend we know well. Can we open a separate bug report for that one? I am not sure if this version of the parser can handle attributes; we will need to check.
          Hide
          Mat Balmer added a comment -
          Opened a new bug http://jira.codehaus.org/browse/UDIG-1722 for the whitespace issue.
          Show
          Mat Balmer added a comment - Opened a new bug http://jira.codehaus.org/browse/UDIG-1722 for the whitespace issue.

            People

            • Assignee:
              Jody Garnett
              Reporter:
              Georg Weickelt
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: