Discussion:
[Geoserver-users] GeoServer 2.11.1 OpenLayers CRS Warnings
sikeoka
2017-06-07 16:39:19 UTC
Permalink
After upgrading to GeoServer 2.11.1, I am getting the warning and stack trace
below for WMS GetMap requests for the OpenLayers format using EPSG:4326. It
doesn't appear to break anything and I verified that this warning does not
occur in 2.10.3. I am unable to test 2.11.0 because it is not in Nexus.
Any thoughts?

16:26:30,639 WARN [org.geoserver.wms.map] (default task-4) Failed to
determine CRS axis order, assuming is EN:
org.opengis.referencing.NoSuchAuthorityCodeException: No code
"CRS:GC,DEF,CRS,EPSG,4326" from authority "Web Map Service CRS" found for
object of type "CoordinateReferenceSystem".
at
org.geotools.referencing.factory.AbstractAuthorityFactory.noSuchAuthorityCode(AbstractAuthorityFactory.java:952)
[gt-referencing-17.1.jar:]
at
org.geotools.referencing.factory.wms.WebCRSFactory.createCoordinateReferenceSystem(WebCRSFactory.java:207)
[gt-referencing-17.1.jar:]
at
org.geotools.referencing.factory.AuthorityFactoryAdapter.createCoordinateReferenceSystem(AuthorityFactoryAdapter.java:802)
[gt-referencing-17.1.jar:]
at
org.geotools.referencing.factory.AuthorityFactoryAdapter.createCoordinateReferenceSystem(AuthorityFactoryAdapter.java:802)
[gt-referencing-17.1.jar:]
at
org.geotools.referencing.factory.FallbackAuthorityFactory.createCoordinateReferenceSystem(FallbackAuthorityFactory.java:640)
[gt-referencing-17.1.jar:]
at
org.geotools.referencing.factory.AuthorityFactoryAdapter.createCoordinateReferenceSystem(AuthorityFactoryAdapter.java:802)
[gt-referencing-17.1.jar:]
at
org.geotools.referencing.factory.AuthorityFactoryAdapter.createCoordinateReferenceSystem(AuthorityFactoryAdapter.java:802)
[gt-referencing-17.1.jar:]
at
org.geotools.referencing.factory.ThreadedAuthorityFactory.createCoordinateReferenceSystem(ThreadedAuthorityFactory.java:731)
[gt-referencing-17.1.jar:]
at
org.geotools.referencing.DefaultAuthorityFactory.createCoordinateReferenceSystem(DefaultAuthorityFactory.java:179)
[gt-referencing-17.1.jar:]
at org.geotools.referencing.CRS.decode(CRS.java:525)
[gt-referencing-17.1.jar:]
at org.geotools.referencing.CRS.decode(CRS.java:453)
[gt-referencing-17.1.jar:]
at
org.geoserver.wms.map.OpenLayersMapOutputFormat.isWms13FlippedCRS(OpenLayersMapOutputFormat.java:263)
[gs-wms-2.11.1.jar:2.11.1]
at
org.geoserver.wms.map.OpenLayersMapOutputFormat.produceMap(OpenLayersMapOutputFormat.java:170)
[gs-wms-2.11.1.jar:2.11.1]
at
org.geoserver.wms.map.OpenLayersMapOutputFormat.produceMap(OpenLayersMapOutputFormat.java:62)
[gs-wms-2.11.1.jar:2.11.1]
... removed rest of stack trace
Caused by: java.lang.NumberFormatException: For input string:
"GC,DEF,CRS,EPSG,4326"
at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
[rt.jar:1.8.0_121]
at java.lang.Integer.parseInt(Integer.java:580) [rt.jar:1.8.0_121]
at java.lang.Integer.parseInt(Integer.java:615) [rt.jar:1.8.0_121]
at
org.geotools.referencing.factory.wms.WebCRSFactory.createCoordinateReferenceSystem(WebCRSFactory.java:204)
[gt-referencing-17.1.jar:]
... 148 more

Steve Ikeoka



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoServer-2-11-1-OpenLayers-CRS-Warnings-tp5323388.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Andrea Aime
2017-06-07 17:20:29 UTC
Permalink
Post by sikeoka
After upgrading to GeoServer 2.11.1, I am getting the warning and stack trace
below for WMS GetMap requests for the OpenLayers format using EPSG:4326.
It
doesn't appear to break anything and I verified that this warning does not
occur in 2.10.3. I am unable to test 2.11.0 because it is not in Nexus.
Any thoughts?
I have seen it too, annoying, but haven't had the time to investigate it yet

Cheers
Andrea
--
==
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 di Montramito 3/A
55054 Massarosa (LU)
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.

-------------------------------------------------------
sikeoka
2017-06-07 17:35:40 UTC
Permalink
I think that this warning originated with this commit to
org.geotools.referencing.factory.URN_Parser:
https://github.com/geotools/geotools/commit/a63c0d9ec83e882eb1b876d909bebe3ab1692913

For some reason, OpenLayersMapOutputFormat has always added "EPSG:" to the
beginning of the code:
String code = "EPSG:" + CRS.lookupIdentifier(crs, false);
This creates something like "EPSG:EPSG:4326", which after going through this
line:
code = WMS.toInternalSRS(code, WMS.version("1.3.0"));
becomes urn:x-ogc:def:crs:EPSG:urn:x-ogc:def:crs:EPSG:4326

Prior to the linked commit, URN_Parser was able to still determine the
correct code from this, 4326, but after the commit, it thinks the code is
"x-ogc,def,crs,EPSG,4326" which causes the NumberFormatException.

The result of this method in OpenLayersMapOutputFormat is actually not used
at all in the OpenLayers 3 output so these warning are pretty harmless other
than filling the logs.

Steve Ikeoka



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoServer-2-11-1-OpenLayers-CRS-Warnings-tp5323388p5323397.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Andrea Aime
2017-06-07 17:44:09 UTC
Permalink
Hi Morgan,
thoughts?

Cheers
Andrea
Post by sikeoka
I think that this warning originated with this commit to
https://github.com/geotools/geotools/commit/a63c0d9ec83e882eb1b876d909bebe
3ab1692913
For some reason, OpenLayersMapOutputFormat has always added "EPSG:" to the
String code = "EPSG:" + CRS.lookupIdentifier(crs, false);
This creates something like "EPSG:EPSG:4326", which after going through this
code = WMS.toInternalSRS(code, WMS.version("1.3.0"));
becomes urn:x-ogc:def:crs:EPSG:urn:x-ogc:def:crs:EPSG:4326
Prior to the linked commit, URN_Parser was able to still determine the
correct code from this, 4326, but after the commit, it thinks the code is
"x-ogc,def,crs,EPSG,4326" which causes the NumberFormatException.
The result of this method in OpenLayersMapOutputFormat is actually not used
at all in the OpenLayers 3 output so these warning are pretty harmless other
than filling the logs.
Steve Ikeoka
--
View this message in context: http://osgeo-org.1560.x6.
nabble.com/GeoServer-2-11-1-OpenLayers-CRS-Warnings-tp5323388p5323397.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
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 di Montramito 3/A
55054 Massarosa (LU)
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.

-------------------------------------------------------
Morgan Thompson
2017-06-08 00:57:39 UTC
Permalink
Hi,

It looks like the logic that was implemented to handle AUTO urn codes
containing Lat/Lon, such as "urn:ogc:def:crs:OGC:1.3:AUTO42002:180:90"
(authority code AUTO:42002,180,90) is misinterpreting the
*urn:x-ogc:def:crs:EPSG* as part of the CRS code. Previously the urnParser
just took the content after the last colon as the code.

It might be better to catch this in the *toInternalSRS* method in WMS to
prevent the malformed URN from being passed down. Or if possible, prevent
the pre-pending of *EPSG: *to the CRS identifier if it is already there.

Would be happy to address this in the next bug stomp.

Cheers,

Morgan Thompson
Junior Engineer | Boundless
Post by Andrea Aime
Hi Morgan,
thoughts?
Cheers
Andrea
Post by sikeoka
I think that this warning originated with this commit to
https://github.com/geotools/geotools/commit/a63c0d9ec83e882e
b1b876d909bebe3ab1692913
For some reason, OpenLayersMapOutputFormat has always added "EPSG:" to the
String code = "EPSG:" + CRS.lookupIdentifier(crs, false);
This creates something like "EPSG:EPSG:4326", which after going through this
code = WMS.toInternalSRS(code, WMS.version("1.3.0"));
becomes urn:x-ogc:def:crs:EPSG:urn:x-ogc:def:crs:EPSG:4326
Prior to the linked commit, URN_Parser was able to still determine the
correct code from this, 4326, but after the commit, it thinks the code is
"x-ogc,def,crs,EPSG,4326" which causes the NumberFormatException.
The result of this method in OpenLayersMapOutputFormat is actually not used
at all in the OpenLayers 3 output so these warning are pretty harmless other
than filling the logs.
Steve Ikeoka
--
View this message in context: http://osgeo-org.1560.x6.nabbl
e.com/GeoServer-2-11-1-OpenLayers-CRS-Warnings-tp5323388p5323397.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
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 di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313 <+39%200584%20962313>
fax: +39 0584 1660272 <+39%200584%20166%200272>
mob: +39 339 8844549 <+39%20339%20884%204549>
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.
-------------------------------------------------------
Andrea Aime
2017-06-09 08:38:12 UTC
Permalink
Hi Morgan,
that's awesome, thank you. Steve, do we have a ticket?

Cheers
Andrea
Post by Morgan Thompson
Hi,
It looks like the logic that was implemented to handle AUTO urn codes
containing Lat/Lon, such as "urn:ogc:def:crs:OGC:1.3:AUTO42002:180:90"
(authority code AUTO:42002,180,90) is misinterpreting the
*urn:x-ogc:def:crs:EPSG* as part of the CRS code. Previously the
urnParser just took the content after the last colon as the code.
It might be better to catch this in the *toInternalSRS* method in WMS to
prevent the malformed URN from being passed down. Or if possible, prevent
the pre-pending of *EPSG: *to the CRS identifier if it is already there.
Would be happy to address this in the next bug stomp.
Cheers,
Morgan Thompson
Junior Engineer | Boundless
Post by Andrea Aime
Hi Morgan,
thoughts?
Cheers
Andrea
Post by sikeoka
I think that this warning originated with this commit to
https://github.com/geotools/geotools/commit/a63c0d9ec83e882e
b1b876d909bebe3ab1692913
For some reason, OpenLayersMapOutputFormat has always added "EPSG:" to the
String code = "EPSG:" + CRS.lookupIdentifier(crs, false);
This creates something like "EPSG:EPSG:4326", which after going through this
code = WMS.toInternalSRS(code, WMS.version("1.3.0"));
becomes urn:x-ogc:def:crs:EPSG:urn:x-ogc:def:crs:EPSG:4326
Prior to the linked commit, URN_Parser was able to still determine the
correct code from this, 4326, but after the commit, it thinks the code is
"x-ogc,def,crs,EPSG,4326" which causes the NumberFormatException.
The result of this method in OpenLayersMapOutputFormat is actually not used
at all in the OpenLayers 3 output so these warning are pretty harmless other
than filling the logs.
Steve Ikeoka
--
View this message in context: http://osgeo-org.1560.x6.nabbl
e.com/GeoServer-2-11-1-OpenLayers-CRS-Warnings-tp5323388p5323397.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
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 di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313 <+39%200584%20962313>
fax: +39 0584 1660272 <+39%200584%20166%200272>
mob: +39 339 8844549 <+39%20339%20884%204549>
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.
-------------------------------------------------------
--
==
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 di Montramito 3/A
55054 Massarosa (LU)
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.

-------------------------------------------------------
sikeoka
2017-06-09 20:20:44 UTC
Permalink
I just created a new ticket for this issue:
https://osgeo-org.atlassian.net/browse/GEOS-8178

Steve Ikeoka



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoServer-2-11-1-OpenLayers-CRS-Warnings-tp5323388p5323700.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Loading...