Re: [Geoserver-users] geoserver 2.7 publish style
I believe it is set to false. filter filter-nameRequest Logging Filter/filter-name filter-classorg.geoserver.filters.LoggingFilter/filter-class init-param !-- The 'enabled' parameter is a boolean value, true (case-insensitive) for true or any other value for false. If enabled, then the logging will be performed; otherwise the logging filter will have no effect. If not specified, this parameter defaults to false. -- param-nameenabled/param-name param-valuefalse/param-value /init-param init-param !-- The 'log-request-bodies' parameter is a boolean value, true (case-insensitive) for true or any other value for false. If enabled, then the logging will include the body of POST and PUT requests. If not specified, this parameter defaults to false. Note that this may noticeably degrade responsiveness of your geoserver since it will not begin to process requests until the entire request body has been received by the server. -- param-namelog-request-bodies/param-name param-valuefalse/param-value /init-param /filter Dominique Bessette Software Engineer General Dynamics Information Technology Office: 619-881-2748 From: andrea.a...@gmail.com [mailto:andrea.a...@gmail.com] On Behalf Of Andrea Aime Sent: Tuesday, June 09, 2015 10:15 PM To: Bessette-Halsema, Dominique E Cc: geoserver-users@lists.sourceforge.net Subject: Re: [Geoserver-users] geoserver 2.7 publish style HI Dominique, do you have by any chance request logging enabled in web.xml (it is not by default, just checking if you did enabled it)? If so, does your request work if you turn it off? Cheers Andrea On Fri, Jun 5, 2015 at 7:31 PM, Bessette-Halsema, Dominique E dominique.besse...@gdit.commailto:dominique.besse...@gdit.com wrote: I’m trying to publish a style to geoserver 2.7 via the GeoServerRESTPublisher class. If I use the publishStyle(File file) API or the publishStyle(String sldBody) I get the following error 17:19:55,192 ERROR [stderr] (http-/0.0.0.0:8080-1) [Fatal Error] :1:1: Content is not allowed in prolog. 17:19:55,193 ERROR [org.geoserver.rest] (http-/0.0.0.0:8080-1) : java.lang.RuntimeException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog. at org.geotools.styling.SLDParser.parseSLD(SLDParser.java:438) [gt-main-13.1.jar:] at org.geoserver.catalog.SLDHandler.parse10(SLDHandler.java:105) [gs-main-2.7.1-nn-1.jar:2.7.1-nn-1] at org.geoserver.catalog.SLDHandler.parse(SLDHandler.java:97) [gs-main-2.7.1-nn-1.jar:2.7.1-nn-1] at org.geoserver.catalog.rest.StyleFormat.read(StyleFormat.java:91) [gs-restconfig-2.7.1.jar:2.7.1] at org.geoserver.rest.format.StreamDataFormat.toObject(StreamDataFormat.java:34) [gs-rest-2.7.1.jar:2.7.1] at org.geoserver.rest.ReflectiveResource.handlePost(ReflectiveResource.java:118) [gs-rest-2.7.1.jar:2.7.1] … The style xml is below. I formatted it in this email but usually its one long string. I’ve tried trimming for whitespace, removing the encoding, and some other validation checks I’ve found online. I was wondering if anything stands out. ?xml version=1.0 encoding=UTF-8? sld:StyledLayerDescriptor xmlns=http://www.opengis.net/sld; xmlns:sld=http://www.opengis.net/sld; xmlns:ogc=http://www.opengis.net/ogc; xmlns:gml=http://www.opengis.net/gml; version=1.0.0 sld:NamedLayer sld:Namenrdb_threshold_132/sld:Name sld:UserStyle sld:Namesurface air temperature/sld:Name sld:FeatureTypeStyle sld:Namenrdb_threshold_132/sld:Name sld:FeatureTypeNameFeature/sld:FeatureTypeName sld:Rule sld:RasterSymbolizer sld:ColorMap type=intervals sld:ColorMapEntry color=#00 opacity=0.0 quantity=244.160893 label=244.160893/ sld:ColorMapEntry color=#008000 opacity=1.0 quantity=283.789 label=283.789/ /sld:ColorMap /sld:RasterSymbolizer /sld:Rule /sld:FeatureTypeStyle /sld:UserStyle /sld:NamedLayer /sld:StyledLayerDescriptor -- ___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.netmailto:Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users -- == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it AVVERTENZE AI
Re: [Geoserver-users] geoserver 2.7 publish style
I did and it does. I can validate and submit it through the geoserver console. Dominique Bessette Software Engineer General Dynamics Information Technology Office: 619-881-2748 From: Jody Garnett [mailto:jody.garn...@gmail.com] Sent: Tuesday, June 09, 2015 3:26 PM To: Bessette-Halsema, Dominique E Cc: geoserver-users@lists.sourceforge.net Subject: Re: [Geoserver-users] geoserver 2.7 publish style Can you try your style in the style editor and confirm it validates? -- Jody Garnett On 5 June 2015 at 10:31, Bessette-Halsema, Dominique E dominique.besse...@gdit.commailto:dominique.besse...@gdit.com wrote: I’m trying to publish a style to geoserver 2.7 via the GeoServerRESTPublisher class. If I use the publishStyle(File file) API or the publishStyle(String sldBody) I get the following error 17:19:55,192 ERROR [stderr] (http-/0.0.0.0:8080-1) [Fatal Error] :1:1: Content is not allowed in prolog. 17:19:55,193 ERROR [org.geoserver.rest] (http-/0.0.0.0:8080-1) : java.lang.RuntimeException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog. at org.geotools.styling.SLDParser.parseSLD(SLDParser.java:438) [gt-main-13.1.jar:] at org.geoserver.catalog.SLDHandler.parse10(SLDHandler.java:105) [gs-main-2.7.1-nn-1.jar:2.7.1-nn-1] at org.geoserver.catalog.SLDHandler.parse(SLDHandler.java:97) [gs-main-2.7.1-nn-1.jar:2.7.1-nn-1] at org.geoserver.catalog.rest.StyleFormat.read(StyleFormat.java:91) [gs-restconfig-2.7.1.jar:2.7.1] at org.geoserver.rest.format.StreamDataFormat.toObject(StreamDataFormat.java:34) [gs-rest-2.7.1.jar:2.7.1] at org.geoserver.rest.ReflectiveResource.handlePost(ReflectiveResource.java:118) [gs-rest-2.7.1.jar:2.7.1] … The style xml is below. I formatted it in this email but usually its one long string. I’ve tried trimming for whitespace, removing the encoding, and some other validation checks I’ve found online. I was wondering if anything stands out. ?xml version=1.0 encoding=UTF-8? sld:StyledLayerDescriptor xmlns=http://www.opengis.net/sld; xmlns:sld=http://www.opengis.net/sld; xmlns:ogc=http://www.opengis.net/ogc; xmlns:gml=http://www.opengis.net/gml; version=1.0.0 sld:NamedLayer sld:Namenrdb_threshold_132/sld:Name sld:UserStyle sld:Namesurface air temperature/sld:Name sld:FeatureTypeStyle sld:Namenrdb_threshold_132/sld:Name sld:FeatureTypeNameFeature/sld:FeatureTypeName sld:Rule sld:RasterSymbolizer sld:ColorMap type=intervals sld:ColorMapEntry color=#00 opacity=0.0 quantity=244.160893 label=244.160893/ sld:ColorMapEntry color=#008000 opacity=1.0 quantity=283.789 label=283.789/ /sld:ColorMap /sld:RasterSymbolizer /sld:Rule /sld:FeatureTypeStyle /sld:UserStyle /sld:NamedLayer /sld:StyledLayerDescriptor -- ___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.netmailto:Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users -- ___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users
Re: [Geoserver-users] geoserver 2.7 publish style
Can you try your style in the style editor and confirm it validates? -- Jody Garnett On 5 June 2015 at 10:31, Bessette-Halsema, Dominique E dominique.besse...@gdit.com wrote: I’m trying to publish a style to geoserver 2.7 via the GeoServerRESTPublisher class. If I use the publishStyle(File file) API or the publishStyle(String sldBody) I get the following error 17:19:55,192 ERROR [stderr] (http-/0.0.0.0:8080-1) [Fatal Error] :1:1: Content is not allowed in prolog. 17:19:55,193 ERROR [org.geoserver.rest] (http-/0.0.0.0:8080-1) : java.lang.RuntimeException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog. at org.geotools.styling.SLDParser.parseSLD(SLDParser.java:438) [gt-main-13.1.jar:] at org.geoserver.catalog.SLDHandler.parse10(SLDHandler.java:105) [gs-main-2.7.1-nn-1.jar:2.7.1-nn-1] at org.geoserver.catalog.SLDHandler.parse(SLDHandler.java:97) [gs-main-2.7.1-nn-1.jar:2.7.1-nn-1] at org.geoserver.catalog.rest.StyleFormat.read(StyleFormat.java:91) [gs-restconfig-2.7.1.jar:2.7.1] at org.geoserver.rest.format.StreamDataFormat.toObject(StreamDataFormat.java:34) [gs-rest-2.7.1.jar:2.7.1] at org.geoserver.rest.ReflectiveResource.handlePost(ReflectiveResource.java:118) [gs-rest-2.7.1.jar:2.7.1] … The style xml is below. I formatted it in this email but usually its one long string. I’ve tried trimming for whitespace, removing the encoding, and some other validation checks I’ve found online. I was wondering if anything stands out. ?xml version=1.0 encoding=UTF-8? sld:StyledLayerDescriptor xmlns=http://www.opengis.net/sld; xmlns:sld= http://www.opengis.net/sld; xmlns:ogc=http://www.opengis.net/ogc; xmlns:gml=http://www.opengis.net/gml; version=1.0.0 sld:NamedLayer sld:Namenrdb_threshold_132/sld:Name sld:UserStyle sld:Namesurface air temperature/sld:Name sld:FeatureTypeStyle sld:Namenrdb_threshold_132/sld:Name sld:FeatureTypeNameFeature/sld:FeatureTypeName sld:Rule sld:RasterSymbolizer sld:ColorMap type=intervals sld:ColorMapEntry color=#00 opacity=0.0 quantity=244.160893 label=244.160893/ sld:ColorMapEntry color=#008000 opacity=1.0 quantity=283.789 label=283.789/ /sld:ColorMap /sld:RasterSymbolizer /sld:Rule /sld:FeatureTypeStyle /sld:UserStyle /sld:NamedLayer /sld:StyledLayerDescriptor -- ___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users -- ___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users
Re: [Geoserver-users] geoserver 2.7 publish style
HI Dominique, do you have by any chance request logging enabled in web.xml (it is not by default, just checking if you did enabled it)? If so, does your request work if you turn it off? Cheers Andrea On Fri, Jun 5, 2015 at 7:31 PM, Bessette-Halsema, Dominique E dominique.besse...@gdit.com wrote: I’m trying to publish a style to geoserver 2.7 via the GeoServerRESTPublisher class. If I use the publishStyle(File file) API or the publishStyle(String sldBody) I get the following error 17:19:55,192 ERROR [stderr] (http-/0.0.0.0:8080-1) [Fatal Error] :1:1: Content is not allowed in prolog. 17:19:55,193 ERROR [org.geoserver.rest] (http-/0.0.0.0:8080-1) : java.lang.RuntimeException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog. at org.geotools.styling.SLDParser.parseSLD(SLDParser.java:438) [gt-main-13.1.jar:] at org.geoserver.catalog.SLDHandler.parse10(SLDHandler.java:105) [gs-main-2.7.1-nn-1.jar:2.7.1-nn-1] at org.geoserver.catalog.SLDHandler.parse(SLDHandler.java:97) [gs-main-2.7.1-nn-1.jar:2.7.1-nn-1] at org.geoserver.catalog.rest.StyleFormat.read(StyleFormat.java:91) [gs-restconfig-2.7.1.jar:2.7.1] at org.geoserver.rest.format.StreamDataFormat.toObject(StreamDataFormat.java:34) [gs-rest-2.7.1.jar:2.7.1] at org.geoserver.rest.ReflectiveResource.handlePost(ReflectiveResource.java:118) [gs-rest-2.7.1.jar:2.7.1] … The style xml is below. I formatted it in this email but usually its one long string. I’ve tried trimming for whitespace, removing the encoding, and some other validation checks I’ve found online. I was wondering if anything stands out. ?xml version=1.0 encoding=UTF-8? sld:StyledLayerDescriptor xmlns=http://www.opengis.net/sld; xmlns:sld= http://www.opengis.net/sld; xmlns:ogc=http://www.opengis.net/ogc; xmlns:gml=http://www.opengis.net/gml; version=1.0.0 sld:NamedLayer sld:Namenrdb_threshold_132/sld:Name sld:UserStyle sld:Namesurface air temperature/sld:Name sld:FeatureTypeStyle sld:Namenrdb_threshold_132/sld:Name sld:FeatureTypeNameFeature/sld:FeatureTypeName sld:Rule sld:RasterSymbolizer sld:ColorMap type=intervals sld:ColorMapEntry color=#00 opacity=0.0 quantity=244.160893 label=244.160893/ sld:ColorMapEntry color=#008000 opacity=1.0 quantity=283.789 label=283.789/ /sld:ColorMap /sld:RasterSymbolizer /sld:Rule /sld:FeatureTypeStyle /sld:UserStyle /sld:NamedLayer /sld:StyledLayerDescriptor -- ___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users -- == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it *AVVERTENZE AI SENSI DEL D.Lgs. 196/2003* Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003. The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.