epicureanism / inspire-foss

Automatically exported from code.google.com/p/inspire-foss
GNU General Public License v3.0
0 stars 0 forks source link

GetCapabilities gives error on PostGIS Extent query #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. insert some features such that gml_objects is populated
2. GetFeature requests are all OK.
3. perform a GetCapabilities

What is the expected output? What do you see instead?
Expect to see Capabilties listed, instead getting OWS Exception:
"org.postgresql.util.PGobject cannot be cast to org.postgis.PGboxbase"

This is the stack trace. This happens when the result of the Extent query is 
non-empty. GetCapabilities is OK with an empty gml_objects table.

java.lang.ClassCastException: org.postgresql.util.PGobject cannot be cast to 
org.postgis.PGboxbase
    at org.deegree.feature.persistence.postgis.PostGISFeatureStore.getEnvelope(PostGISFeatureStore.java:325)
    at org.deegree.feature.persistence.postgis.PostGISFeatureStore.getEnvelope(PostGISFeatureStore.java:195)
    at org.deegree.services.wfs.GetCapabilitiesHandler.export110(GetCapabilitiesHandler.java:577)
    at org.deegree.services.wfs.GetCapabilitiesHandler.export(GetCapabilitiesHandler.java:174)
    at org.deegree.services.wfs.WFSController.doGetCapabilities(WFSController.java:690)
    at org.deegree.services.wfs.WFSController.doXML(WFSController.java:439)
    at org.deegree.services.controller.OGCFrontController.dispatchXMLRequest(OGCFrontController.java:700)
    at org.deegree.services.controller.OGCFrontController.doPost(OGCFrontController.java:475)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

This also happens when running standalone (one webapp in a container).

Additional version info:
platforms: Mac OSX and Ubuntu
Java: Java6
DB: Postgresql 8.3
PostGIS: 1.4.0
drivers: postgis-jdbc-1.3.3.jar postgresql-8.4-701.jdbc4.jar

I think there is somewhere a Driver mismatch.
I tried changing Drivers: using e.g. postgis-jdbc-1.4.0.jar or postgresql 
8.3/jdbc3 but all with the same result. It is strange since all other PostGIS 
actions (insert, query) don't give errors.
I can't figure this out further. Could be that the combination PG 8.3 + PostGIS 
1.4.0 is uncommon.

Original issue reported on code.google.com by jus...@gmail.com on 16 Sep 2010 at 1:54

GoogleCodeExporter commented 9 years ago
This should be fixed now (in deegree-core trunk). I tested using both PostGIS 
1.4 and 1.5.

Original comment by mar...@beefcafe.de on 19 Sep 2010 at 6:05

GoogleCodeExporter commented 9 years ago
Checked: yes GetCapabilities works OK now with/without features in DB. Thanks! 
Closing issue.

(Only DescribeFeatureType always, with/without features in DB, gives error, 
will check and possibly open new issue)

Original comment by jus...@gmail.com on 20 Sep 2010 at 8:57