Hi Stefano,
Yes, it is kind of stange. Everything works except geometry filter.
Are you using the same mapping you posted a few mails ago? Yes.
Are you able to query nested non-geometry properties? Yes.
Two more questions:
- do I understand correctly that there is a 1:1 relationship between the GPS table and the G table? If that is the case, why not merge them into a single table, or at least create a view? That would save you from configuring feature chaining in app-schema…
It’s one to many relationship. Table A → Bs, B->Cs and C->Ds …, and the geometry is in D. Not sure if it will work if everything in one VERY big table.
- you are mapping a column containing point geometries (LONGLAT) to a gml:LinearRing geometry… that doesn’t seem right?
It doesn’t seem right, but it works if do BBOX on this ‘feature’ alone.
Regarding the issue with custom defined geometry types, derived from GML types (i.e. aixm:SurfaceType extending gml:SurfaceType), as suggested in the thread I already cited (http://osgeo-org.1560.x6.nabble.com/App-schema-How-to-map-Oracle-Geometry-into-GML-td4984781.html), you may need to provide your own custom bindings… something I’ve never tried myself.
Here is the stack trace:
17 Sep 12:12:00 INFO [org.geotools.referencing.factory] - Disposing class org.vfny.geoserver.crs.GeoserverCustomWKTFactory backing store
17 Sep 12:12:00 INFO [org.geotools.referencing.factory] - Disposing class org.vfny.geoserver.crs.GeoserverOverridingWKTFactory backing store
17 Sep 12:24:19 INFO [org.geoserver.wfs] -
Request: getServiceInfo
17 Sep 12:24:19 DEBUG [org.geotools.xml] - No schemaLocation found, using 'http://www.opengis.net/wfs/2.0 jar:file:/C:/Users/J44571/.m2/repository/org/geotools/xsd/gt-xsd-wfs/15-SNAPSHOT/gt-xsd-wfs-15-SNAPSHOT.jar!/org/geotools/wfs/v2_0/wfs.xsd
17 Sep 12:24:19 DEBUG [org.geotools.xml] - Found override for http://www.opengis.net/wfs/2.0: jar:file:/C:/Users/J44571/.m2/repository/org/geotools/xsd/gt-xsd-wfs/15-SNAPSHOT/gt-xsd-wfs-15-SNAPSHOT.jar!/org/geotools/wfs/v2_0/wfs.xsd ==> jar:file:/C:/Users/J44571/.m2/repository/org/geotools/xsd/gt-xsd-wfs/15-SNAPSHOT/gt-xsd-wfs-15-SNAPSHOT.jar!/org/geotools/wfs/v2_0/wfs.xsd
17 Sep 12:24:27 TRACE [org.geotools.factory] - ENTRY (GeometryFactory, JTS_GEOMETRY_FACTORY)
17 Sep 12:24:27 TRACE [org.geotools.factory] - RETURN (GeometryFactory, JTS_GEOMETRY_FACTORY): found implementation GeometryFactory.
17 Sep 12:24:34 TRACE [org.geotools.factory] - ENTRY (GeometryFactory, JTS_GEOMETRY_FACTORY)
17 Sep 12:24:34 TRACE [org.geotools.factory] - RETURN (GeometryFactory, JTS_GEOMETRY_FACTORY): found implementation GeometryFactory.
17 Sep 12:24:37 TRACE [org.geotools.factory] - ENTRY (GeometryFactory, JTS_GEOMETRY_FACTORY)
17 Sep 12:24:37 TRACE [org.geotools.factory] - RETURN (GeometryFactory, JTS_GEOMETRY_FACTORY): found implementation GeometryFactory.
17 Sep 12:24:38 TRACE [org.geotools.factory] - ENTRY (GeometryFactory, JTS_GEOMETRY_FACTORY)
17 Sep 12:24:38 TRACE [org.geotools.factory] - RETURN (GeometryFactory, JTS_GEOMETRY_FACTORY): found implementation GeometryFactory.
17 Sep 12:36:12 DEBUG [org.geotools.util] - InterpolationConverterFactory can be applied from Strings to Interpolation only.
17 Sep 12:36:15 DEBUG [org.geotools.util] - CRSConverterFactory can be applied from Strings to CRS only.
17 Sep 12:36:18 DEBUG [org.geotools.xml] - [ class org.geotools.geometry.jts.LiteCoordinateSequence ] is not of type class [Ljava.lang.Double;
17 Sep 12:43:37 DEBUG [org.geotools.util] - InterpolationConverterFactory can be applied from Strings to Interpolation only.
17 Sep 12:43:37 DEBUG [org.geotools.util] - CRSConverterFactory can be applied from Strings to CRS only.
17 Sep 12:43:37 DEBUG [org.geotools.xml] - [ class org.geotools.geometry.jts.LiteCoordinateSequence ] is not of type class [Ljava.lang.Double;
17 Sep 13:03:39 INFO [org.geoserver.wfs] -
Request: getFeature
service = WFS
version = 2.0.0
baseUrl = http://localhost:8080/geoserver/
outputFormat = gml3
resolve = none
resolveDepth = *
resolveTimeout = 300
resultType = results
abstractQueryExpressionGroup[0] = wfs:abstractQueryExpression=net.opengis.wfs20.impl.QueryTypeImpl@…7249… (handle: null) (abstractProjectionClause: null, abstractSelectionClause: [
aixm:timeSlice/aixm:AirspaceTimeSlice/aixm:geometryComponent/aixm:AirspaceGeometryComponent/aixm:theAirspaceVolume/aixm:AirspaceVolume/aixm:horizontalProjection/aixm:Surface/gml:polygonPatches/gml:PolygonPatch/gml:exterior/gml:LinearRing bbox POLYGON ((33.49 -99, 33.49 -78, 55.59 -78, 55.59 -99, 33.49 -99)) ], abstractSortingClause: null, aliases: null, typeNames: [{http://www.aixm.aero/schema/5.1}Airspace]) (featureVersion: null, srsName: null, filter: null, propertyNames: null, sortBy: null)
abstractQueryExpression[0]:
abstractSelectionClause = [
aixm:timeSlice/aixm:AirspaceTimeSlice/aixm:geometryComponent/aixm:AirspaceGeometryComponent/aixm:theAirspaceVolume/aixm:AirspaceVolume/aixm:horizontalProjection/aixm:Surface/gml:polygonPatches/gml:PolygonPatch/gml:exterior/gml:LinearRing bbox POLYGON ((33.49 -99, 33.49 -78, 55.59 -78, 55.59 -99, 33.49 -99)) ]
typeNames[0] = {http://www.aixm.aero/schema/5.1}Airspace
filter = [
aixm:timeSlice/aixm:AirspaceTimeSlice/aixm:geometryComponent/aixm:AirspaceGeometryComponent/aixm:theAirspaceVolume/aixm:AirspaceVolume/aixm:horizontalProjection/aixm:Surface/gml:polygonPatches/gml:PolygonPatch/gml:exterior/gml:LinearRing bbox POLYGON ((33.49 -99, 33.49 -78, 55.59 -78, 55.59 -99, 33.49 -99)) ]
17 Sep 13:03:42 DEBUG [org.geotools.util] - InterpolationConverterFactory can be applied from Strings to Interpolation only.
17 Sep 13:03:42 DEBUG [org.geotools.util] - CRSConverterFactory can be applied from Strings to CRS only.
17 Sep 13:04:21 TRACE [org.geotools.factory] - ENTRY (GeometryFactory, JTS_GEOMETRY_FACTORY)
17 Sep 13:04:21 TRACE [org.geotools.factory] - RETURN (GeometryFactory, JTS_GEOMETRY_FACTORY): found implementation GeometryFactory.
17 Sep 13:04:32 TRACE [org.geotools.factory] - ENTRY (GeometryFactory, JTS_GEOMETRY_FACTORY)
17 Sep 13:04:32 TRACE [org.geotools.factory] - RETURN (GeometryFactory, JTS_GEOMETRY_FACTORY): found implementation GeometryFactory.
17 Sep 13:04:32 TRACE [org.geotools.factory] - ENTRY (GeometryFactory, JTS_GEOMETRY_FACTORY)
17 Sep 13:04:32 TRACE [org.geotools.factory] - RETURN (GeometryFactory, JTS_GEOMETRY_FACTORY): found implementation GeometryFactory.
17 Sep 13:04:35 DEBUG [org.geotools.jdbc] - CREATE CONNECTION
17 Sep 13:04:38 DEBUG [org.geotools.jdbc] - CLOSE CONNECTION
17 Sep 13:04:38 ERROR [org.geoserver.ows] -
java.lang.RuntimeException: java.io.IOException
at org.geotools.data.store.ContentFeatureCollection.features(ContentFeatureCollection.java:176)
at org.geotools.data.store.ContentFeatureCollection.features(ContentFeatureCollection.java:58)
at org.geotools.data.complex.DataAccessMappingFeatureIterator.initialiseSourceFeatures(DataAccessMappingFeatureIterator.java:397)
at org.geotools.data.complex.AbstractMappingFeatureIterator.(AbstractMappingFeatureIterator.java:230)
at org.geotools.data.complex.DataAccessMappingFeatureIterator.(DataAccessMappingFeatureIterator.java:141)
at org.geotools.data.complex.MappingFeatureIteratorFactory.getInstance(MappingFeatureIteratorFactory.java:222)
at org.geotools.data.complex.MappingFeatureCollection.features(MappingFeatureCollection.java:173)
at org.geotools.xml.Encoder.encode(Encoder.java:1056)
at org.geotools.xml.Encoder.encode(Encoder.java:609)
at org.geoserver.wfs.xml.GML3OutputFormat.encode(GML3OutputFormat.java:302)
at org.geoserver.wfs.xml.GML3OutputFormat.complexFeatureStreamIntercept(GML3OutputFormat.java:325)
at org.geoserver.wfs.xml.GML3OutputFormat.write(GML3OutputFormat.java:277)
at org.geoserver.wfs.WFSGetFeatureOutputFormat.write(WFSGetFeatureOutputFormat.java:196)
at org.geoserver.ows.Dispatcher.response(Dispatcher.java:996)
at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:279)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:28)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:75)
at org.geoserver.wms.animate.AnimatorFilter.doFilter(AnimatorFilter.java:71)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:71)
at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:46)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:50)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:54)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:201)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:83)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:53)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:135)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:87)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:48)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:48)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:44)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
Caused by: java.io.IOException
at org.geotools.jdbc.JoiningJDBCFeatureSource.getJoiningReaderInternal(JoiningJDBCFeatureSource.java:933)
at org.geotools.jdbc.JoiningJDBCFeatureSource.getReaderInternal(JoiningJDBCFeatureSource.java:941)
at org.geotools.data.store.ContentFeatureSource.getReader(ContentFeatureSource.java:634)
at org.geotools.data.store.ContentFeatureCollection.features(ContentFeatureCollection.java:173)
… 89 more
Caused by: java.lang.UnsupportedOperationException: Expecting a feature to apply filter, but found: SimpleFeatureTypeImpl A_AIRSPACE_WT identified extends Feature(UUID:UUID,CODESPACE:CODESPACE,REC_ID:REC_ID)
at org.geotools.filter.NestedAttributeExpression.evaluate(NestedAttributeExpression.java:90)
at org.geotools.data.jdbc.FilterToSQL.visitBinarySpatialOperator(FilterToSQL.java:1001)
at org.geotools.data.jdbc.FilterToSQL.visit(FilterToSQL.java:936)
at org.geotools.filter.spatial.BBOXImpl.accept(BBOXImpl.java:220)
at org.geotools.data.jdbc.FilterToSQL.encode(FilterToSQL.java:248)
at org.geotools.data.jdbc.FilterToSQL.encodeToString(FilterToSQL.java:277)
at org.geotools.jdbc.JoiningJDBCFeatureSource.selectSQL(JoiningJDBCFeatureSource.java:601)
at org.geotools.jdbc.JoiningJDBCFeatureSource.selectSQLPS(JoiningJDBCFeatureSource.java:792)
at org.geotools.jdbc.JoiningJDBCFeatureSource.getJoiningReaderInternal(JoiningJDBCFeatureSource.java:920)
… 92 more
Thanks,
Wen
···
Hi Wen,
the error seems strange, do you have a full stack trace?
Are you using the same mapping you posted a few mails ago? Are you able to query nested non-geometry properties?
Two more questions:
-
do I understand correctly that there is a 1:1 relationship between the GPS table and the G table? If that is the case, why not merge them into a single table, or at least create a view? That would save you from configuring feature chaining in app-schema…
-
you are mapping a column containing point geometries (LONGLAT) to a gml:LinearRing geometry… that doesn’t seem right?
Regarding the issue with custom defined geometry types, derived from GML types (i.e. aixm:SurfaceType extending gml:SurfaceType), as suggested in the thread I already cited (http://osgeo-org.1560.x6.nabble.com/App-schema-How-to-map-Oracle-Geometry-into-GML-td4984781.html), you may need to provide your own custom bindings… something I’ve never tried myself.
On Wed, Sep 16, 2015 at 11:01 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@…508…> wrote:
Thanks! Stefano,
For AIXM, I always got an error like SimpleFeatureTypeImpl AIRSPACE identified extends Feature(UUID:UUID,CODESPACE:CODESPACE,REC_ID:REC_ID)
When using BBOX on nested feature even if the top feature Airspace is a FEATURE.
Wen