Karsten D. ( 
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=5e4cfaf2924db10e74b8110f
 ) *created* an issue

GeoServer ( 
https://osgeo-org.atlassian.net/browse/GEOS?atlOrigin=eyJpIjoiNTVlNTY3M2FiNjBjNDhhZWFlZjdiNTg5Y2QxZTIzNzAiLCJwIjoiaiJ9
 ) / Bug ( 
https://osgeo-org.atlassian.net/browse/GEOS-10688?atlOrigin=eyJpIjoiNTVlNTY3M2FiNjBjNDhhZWFlZjdiNTg5Y2QxZTIzNzAiLCJwIjoiaiJ9
 ) GEOS-10688 ( 
https://osgeo-org.atlassian.net/browse/GEOS-10688?atlOrigin=eyJpIjoiNTVlNTY3M2FiNjBjNDhhZWFlZjdiNTg5Y2QxZTIzNzAiLCJwIjoiaiJ9
 ) OGC function dateFormat will make the legen preview builder fail ( 
https://osgeo-org.atlassian.net/browse/GEOS-10688?atlOrigin=eyJpIjoiNTVlNTY3M2FiNjBjNDhhZWFlZjdiNTg5Y2QxZTIzNzAiLCJwIjoiaiJ9
 )

Issue Type: Bug Affects Versions: 2.20.4 Assignee: Unassigned Attachments: 
image-20221003-093609.png, image-20221003-093654.png Components: styling 
Created: 03/Oct/22 11:43 AM Environment:

Windows Server 2019

Tomcat 9.0.62

Priority: Medium Reporter: Karsten D. ( 
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=5e4cfaf2924db10e74b8110f
 )

We are experiencing that the ogc function dateFormat is making the legend 
builder fail, there is no problem if we do not use this function, but then we 
of cause do not get a formattet date out.
In our case is it in a TextSymbolizer label (See example below), we are getting 
the following message when we want to preview the legend:

The validation is reporting that all is good:

We ale get a lot of noice in our log because of the problem:
2022-10-03 11:39:23,943 WARN [web.data] - Failed to build legend preview
java.lang.NullPointerException

This is an example of the style:

<?xml version= "1.0" encoding= "Windows-1252" ?>
<StyledLayerDescriptor xmlns:xlink = "http://www.w3.org/1999/xlink"; version= 
"1.0.0" xmlns= "http://www.opengis.net/sld"; xmlns:ogc = 
"http://www.opengis.net/ogc"; >
 <NamedLayer>
   <Name> Test </Name>
   <UserStyle>
     <Title> PlotGraphics </Title>
     <FeatureTypeStyle>
       <Title> text </Title>
       <Rule>
         <Title> Example </Title>
         <MaxScaleDenominator> 6001 </MaxScaleDenominator>
         <TextSymbolizer>
           <Label>
             <ogc:Function name= "dateFormat" >
               <ogc:Literal> dd.MM.yyyy </ogc:Literal>
               <ogc:PropertyName> DateProperty </ogc:PropertyName>
             </ogc:Function>
           </Label>
           <Font>
             <CssParameter name= "font-family" > Verdana </CssParameter>
             <CssParameter name= "font-size" > 11.25 </CssParameter>
             <CssParameter name= "font-style" > bold </CssParameter>
           </Font>
           <LabelPlacement>
             <PointPlacement>
               <AnchorPoint>
                 <AnchorPointX> 0 </AnchorPointX>
                 <AnchorPointY> 1 </AnchorPointY>
               </AnchorPoint>
               <Displacement>
                 <DisplacementX> 8 </DisplacementX>
                 <DisplacementY> -8 </DisplacementY>
               </Displacement>
             </PointPlacement>
           </LabelPlacement>
           <Halo>
             <Radius> 1 </Radius>
             <Fill>
               <CssParameter name= "fill" > #ffffff </CssParameter>
               <CssParameter name= "fill-opacity" > 1 </CssParameter>
             </Fill>
           </Halo>
           <Fill>
             <CssParameter name= "fill" > #000000 </CssParameter>
           </Fill>
           <VendorOption name= "autoWrap" > 100 </VendorOption>
           <VendorOption name= "spaceAround" > -100 </VendorOption>
         </TextSymbolizer>
       </Rule>
     </FeatureTypeStyle>
   </UserStyle>
 </NamedLayer>
</StyledLayerDescriptor>

Best regards

Karsten

( 
https://osgeo-org.atlassian.net/browse/GEOS-10688#add-comment?atlOrigin=eyJpIjoiNTVlNTY3M2FiNjBjNDhhZWFlZjdiNTg5Y2QxZTIzNzAiLCJwIjoiaiJ9
 ) Add Comment ( 
https://osgeo-org.atlassian.net/browse/GEOS-10688#add-comment?atlOrigin=eyJpIjoiNTVlNTY3M2FiNjBjNDhhZWFlZjdiNTg5Y2QxZTIzNzAiLCJwIjoiaiJ9
 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( 
https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail
 ) or iOS ( 
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8
 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100207- 
sha1:bddf6e1 )
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to