ExternalGraphic in SLD: Argument "value" should not be null.

4 messages Options
Embed this post
Permalink
Julian Hagenauer

ExternalGraphic in SLD: Argument "value" should not be null.

Reply Threaded More More options
Print post
Permalink
Hi,
i am trying to read some features from an WFS and render the features using SLDs. My SLDs for point-features have references for external graphics. Everytime i try to render the features, i get an exception:

CHWERWIEGEND: Argument "value" should not be null.
java.lang.IllegalArgumentException: Argument "value" should not be null.
        at org.geotools.util.SoftValueHashMap.ensureNotNull(SoftValueHashMap.java:107)
        at org.geotools.util.SoftValueHashMap.put(SoftValueHashMap.java:248)
        at org.geotools.renderer.style.SLDStyleFactory.createStyle(SLDStyleFactory.java:286)
        at org.geotools.renderer.lite.StreamingRenderer.processSymbolizers(StreamingRenderer.java:1928)
        at org.geotools.renderer.lite.StreamingRenderer.process(StreamingRenderer.java:1856)
        at org.geotools.renderer.lite.StreamingRenderer.drawOptimized(StreamingRenderer.java:1798)
        at org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:1713)
        at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:661)
        at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:520)
        at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:469)
        at de.uni_bonn.gtfocusmap.MapPane.paintWithGeoTools(MapPane.java:260)
        at de.uni_bonn.gtfocusmap.MapPane.paintComponent(MapPane.java:110)
        at javax.swing.JComponent.paint(JComponent.java:1029)
        at javax.swing.JComponent.paintChildren(JComponent.java:864)
        at javax.swing.JComponent.paint(JComponent.java:1038)
        at javax.swing.JComponent.paintChildren(JComponent.java:864)
        at javax.swing.JComponent.paint(JComponent.java:1038)
        at javax.swing.JLayeredPane.paint(JLayeredPane.java:567)
        at javax.swing.JComponent.paintChildren(JComponent.java:864)
        at javax.swing.JComponent.paintToOffscreen(JComponent.java:5131)
        at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:278)
        at javax.swing.RepaintManager.paint(RepaintManager.java:1220)
        at javax.swing.JComponent.paint(JComponent.java:1015)
        at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
        at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
        at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
        at java.awt.Container.paint(Container.java:1780)
        at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
        at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714)
        at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:694)
        at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

If i replace the external graphic tag by a mark, it works flawlessly, so might it be a bug? I am using geotools 2.5.7 and this is my SLD:

<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd">
  <NamedLayer>
    <Name>Test</Name>
    <UserStyle>
      <FeatureTypeStyle>
        <Rule>
          <PointSymbolizer>
            <Graphic>
              <ExternalGraphic>
                <OnlineResource xlink:type="simple" xlink:href="http://localhost/~julian/test/public_building.png"/>
                <Format>image/png</Format>
              </ExternalGraphic>
            </Graphic>
          </PointSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

Thank you for your help,
Julian

--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Ian Turton

Re: ExternalGraphic in SLD: Argument "value" should not be null.

Reply Threaded More More options
Print post
Permalink
On Wed, Sep 2, 2009 at 9:10 AM, Julian Hagenauer<[hidden email]> wrote:
> Hi,
> i am trying to read some features from an WFS and render the features using SLDs. My SLDs for point-features have references for external graphics. Everytime i try to render the features, i get an exception:

>.....

> If i replace the external graphic tag by a mark, it works flawlessly, so might it be a bug? I am using geotools 2.5.7 and this is my SLD:
>

I can't be certain but it looks like the system can't find your
external image -
what happens if you paste
http://localhost/~julian/test/public_building.png into your browser?
My guess would be you need a 8080 in there.

You can always allow for this sort of thing happening by specifying a
list of external graphics and a final mark in the SLD. See
https://www.e-education.psu.edu/geog585/l5_p6.html

Ian

--
Ian Turton
http://www.geotools.org
http://pennspace.blogspot.com/

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Julian Hagenauer

Re: ExternalGraphic in SLD: Argument "value" should not be null.

Reply Threaded More More options
Print post
Permalink
Thank you for your answer.
I tested the url several times with my browser. The url is valid.

Thank you,
Julian

Am Wed, 2 Sep 2009 11:00:38 -0400
schrieb Ian Turton <[hidden email]>:

> On Wed, Sep 2, 2009 at 9:10 AM, Julian Hagenauer<[hidden email]> wrote:
> > Hi,
> > i am trying to read some features from an WFS and render the features using SLDs. My SLDs for point-features have references for external graphics. Everytime i try to render the features, i get an exception:
>
> >.....
>
> > If i replace the external graphic tag by a mark, it works flawlessly, so might it be a bug? I am using geotools 2.5.7 and this is my SLD:
> >
>
> I can't be certain but it looks like the system can't find your
> external image -
> what happens if you paste
> http://localhost/~julian/test/public_building.png into your browser?
> My guess would be you need a 8080 in there.
>
> You can always allow for this sort of thing happening by specifying a
> list of external graphics and a final mark in the SLD. See
> https://www.e-education.psu.edu/geog585/l5_p6.html
>
> Ian
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Julian Hagenauer

Re: ExternalGraphic in SLD: Argument "value" should not be null.

Reply Threaded More More options
Print post
Permalink
In reply to this post by Ian Turton
Hi,
today i used a network-sniffer (both on local interface and network interface) to see, if a http-request is made. Interestingly it is not. Strange.

Thank you,
Julian

Am Wed, 2 Sep 2009 11:00:38 -0400
schrieb Ian Turton <[hidden email]>:

> On Wed, Sep 2, 2009 at 9:10 AM, Julian Hagenauer<[hidden email]> wrote:
> > Hi,
> > i am trying to read some features from an WFS and render the features using SLDs. My SLDs for point-features have references for external graphics. Everytime i try to render the features, i get an exception:
>
> >.....
>
> > If i replace the external graphic tag by a mark, it works flawlessly, so might it be a bug? I am using geotools 2.5.7 and this is my SLD:
> >
>
> I can't be certain but it looks like the system can't find your
> external image -
> what happens if you paste
> http://localhost/~julian/test/public_building.png into your browser?
> My guess would be you need a 8080 in there.
>
> You can always allow for this sort of thing happening by specifying a
> list of external graphics and a final mark in the SLD. See
> https://www.e-education.psu.edu/geog585/l5_p6.html
>
> Ian
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users