GeoTools
  1. GeoTools
  2. GEOT-1772

StreamingRendered throws NPE if the only symbol is a ExternalGraphic that cannot be found

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.3.5, 2.4.0
    • Fix Version/s: 2.5.9
    • Component/s: render
    • Labels:
      None

      Description

      If the SLD contains a symbolizer using a single external graphic that cannot be loaded the result is something along these lines:

      AVVERTENZA: Unable to load external svg file, C:\progetti\geotools\trunk\modules\library\render\spike\RsBaugrenze.svg (Impossibile trovare il file specificato)
      17-apr-2008 12.27.08 org.geotools.renderer.lite.StreamingRenderer processStylers
      GRAVE: null
      java.lang.NullPointerException
      	at org.geotools.renderer.style.SLDStyleFactory.fillDrawMark(SLDStyleFactory.java:1256)
      	at org.geotools.renderer.style.SLDStyleFactory.getGraphicStroke(SLDStyleFactory.java:929)
      	at org.geotools.renderer.style.SLDStyleFactory.createLineStyle(SLDStyleFactory.java:397)
      	at org.geotools.renderer.style.SLDStyleFactory.createStyleInternal(SLDStyleFactory.java:332)
      	at org.geotools.renderer.style.SLDStyleFactory.createStyle(SLDStyleFactory.java:295)
      	at org.geotools.renderer.lite.StreamingRenderer.processSymbolizers(StreamingRenderer.java:1723)
      	at org.geotools.renderer.lite.StreamingRenderer.process(StreamingRenderer.java:1651)
      	at org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:1595)
      	at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:649)
      	at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:481)
      	at GraphicStrokeTest.main(GraphicStrokeTest.java:37)
      17-apr-2008 12.27.08 org.geotools.renderer.style.SLDStyleFactory getImage
      

      The WARNING is nice, the NPE is not... we should decide wheter to provide a better exception or log a further warning to tell the user no applicacle graphics/marks were found so rendering is not going to occurr.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Jesse Eichar
            Reporter:
            Andrea Aime
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: