[Geoserver-users] wms with oracle datastore didn't serve anything

Hi geoserver list,
i’m using geoserver 1.6.2 with an oracle plugin gt2-oracle-spatial-2.4.1.jar. I tried to setup a wms with an oracle datastore which runs on a remote machine. The datastore settings were allright. I was able to connect to the oracle database and was offered all available tables (featuretypes). When i tried to setup a featuretype i had the first time some problems when computing the BoundingBox. Here’s the error:

org.geotools.data.DataSourceException: Could not count Request All Features
Geoserver didn’t set the right coordinates of the bbox. The bbox lat/lon values should be something around 49± and 8± and geoserver set it to -2 'til 2.

But nevertheless it generated the featuretype. But when requesting it, i got only white screen. When looking into the log i found several error messages which could document the cause of the problem:


01 Apr 13:50:42 DEBUG [data.oracle] - the sql statement for srid is SELECT SRID FROM MDSYS.ALL_SDO_GEOM_METADATA WHERE TABLE_NAME=‘FFH_SDO’ AND COLUMN_NAME=‘SHAPE’


But the schema MDSYS doesn’t contain a table ALL_SDO_GEOM_METADATA. So the sql request doesnt work. therefore the next entry is:


01 Apr 13:50:42 DEBUG [referencing.factory] - Failure in the primary factory: No code “EPSG:0” from authority “European Petroleum Survey Group” found for object of type “CoordinateReferenceSystem”. Now trying the fallback factory…

Also a strange is this entry wqhich follows :

01 Apr 13:50:42 TRACE [data.jdbc] - Unknown SQL Type: BLOB
01 Apr 13:50:42 DEBUG [data.oracle] - the sql statement for srid is SELECT SRID FROM MDSYS.ALL_SDO_GEOM_METADATA WHERE TABLE_NAME=‘FFH_SDO’ AND COLUMN_NAME=‘SHAPE’

rest based on schemaBase: null

The datatype of the oracle spatial column is BLOB! Geoserver should be able to identify and handle this datatype.

I think therefore i got this error:

01 Apr 13:50:45 ERROR [[/geoserver].[action]] - Servlet.service() for servlet action threw exception
org.geotools.data.DataSourceException: Could not count Request All Features
at org.geotools.data.oracle.OracleDataStore.bounds(OracleDataStore.java:539)
at org.geotools.data.oracle.OracleFeatureSource.getBounds(OracleFeatureSource.java:62)
at org.geotools.data.oracle.OracleFeatureSource.getBounds(OracleFeatureSource.java:35)
at org.geoserver.feature.FeatureSourceUtils.getBoundingBoxEnvelope(FeatureSourceUtils.java:40)
at org.vfny.geoserver.util.DataStoreUtils.getBoundingBoxEnvelope(DataStoreUtils.java:277)
at org.vfny.geoserver.action.data.TypesEditorAction.executeBBox(TypesEditorAction.java:228)
at org.vfny.geoserver.action.data.TypesEditorAction.execute(TypesEditorAction.java:132)
at org.vfny.geoserver.action.ConfigAction.execute(ConfigAction.java:101)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:69)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)

at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:106)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)

at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:834)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:640)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286)
at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: ORA-00942: Tabelle oder View nicht vorhanden
ORA-06512: in “MDSYS.SDO_TUNE”, Zeile 1413

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:946)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1060)
at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:830)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1132)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1272)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at org.geotools.data.oracle.OracleDataStore.getEnvelope(OracleDataStore.java:595)
at org.geotools.data.oracle.OracleDataStore.bounds(OracleDataStore.java:518)
… 56 more
01 Apr 13:50:45 INFO [geoserver.filters] - 127.0.0.1 “GET /geoserver/config/data/gs.ico” “Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13” “”

01 Apr 13:50:45 INFO [geoserver.filters] - 127.0.0.1 “GET /geoserver/config/data/gs.ico” took 0ms

I think it’s a bug or did i do something wrong? Is there a fix for this problem?

Regards
Albrecht

Albrecht.Weiser@anonymised.com ha scritto:

Hi geoserver list,
i'm using geoserver 1.6.2 with an oracle plugin gt2-oracle-spatial-2.4.1.jar. I tried to setup a wms with an oracle datastore which runs on a remote machine. The datastore settings were allright. I was able to connect to the oracle database and was offered all available tables (featuretypes). When i tried to setup a featuretype i had the first time some problems when computing the BoundingBox. Here's the error:

/org.geotools.data.DataSourceException: Could not count Request All Features/
Geoserver didn't set the right coordinates of the bbox. The bbox lat/lon values should be something around 49+- and 8+- and geoserver set it to -2 'til 2.

But nevertheless it generated the featuretype. But when requesting it, i got only white screen. When looking into the log i found several error messages which could document the cause of the problem:

...
01 Apr 13:50:42 DEBUG [data.oracle] - the sql statement for srid is SELECT SRID FROM MDSYS.ALL_SDO_GEOM_METADATA WHERE TABLE_NAME='FFH_SDO' AND COLUMN_NAME='SHAPE'

...
But the schema MDSYS doesn't contain a table ALL_SDO_GEOM_METADATA. So the sql request doesnt work. therefore the next entry is:

Wait, how is this possible? That table is a standard one and everybody
should be able to see it?
Moreover:

...

        at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: ORA-00942: Tabelle oder View nicht vorhanden
ORA-06512: in "MDSYS.SDO_TUNE", Zeile 1413

...

There is seems the spatial index subsystem of Oracle just bombed out.
Are you sure spatial indexes are properly built and that all geometries
are valid? (oracle has functions you can call to check the geometry validity and to fix invalid geometries, but I don't recall their
names).

Cheers
Andrea

Hi Andrea,
you were right there was an entry missing in the table MDSYS.ALL_SDO_GEOM_METADATA for SRID. Therefore geoserver got NULL as SRID which didn't work of course :o) Now i got a correct FeatureType whith a geoserver-computed bbox.
Thanks for the hint
ALbrecht

-----Ursprüngliche Nachricht-----
Von: Andrea Aime [mailto:aaime@anonymised.com]
Gesendet: Mittwoch, 2. April 2008 18:20
An: Weiser, Albrecht (HZD)
Cc: geoserver-users@lists.sourceforge.net
Betreff: Re: [Geoserver-users] wms with oracle datastore didn't serve anything

Albrecht.Weiser@anonymised.com ha scritto:

Hi geoserver list,
i'm using geoserver 1.6.2 with an oracle plugin
gt2-oracle-spatial-2.4.1.jar. I tried to setup a wms with an oracle
datastore which runs on a remote machine. The datastore settings were
allright. I was able to connect to the oracle database and was offered
all available tables (featuretypes). When i tried to setup a featuretype
i had the first time some problems when computing the BoundingBox.
Here's the error:

...

There is seems the spatial index subsystem of Oracle just bombed out.
Are you sure spatial indexes are properly built and that all geometries
are valid? (oracle has functions you can call to check the geometry
validity and to fix invalid geometries, but I don't recall their
names).

Cheers
Andrea