[Geoserver-users] Complex features and WMS

Hey all.

I seem to be having problems with Complex Features and WMS. The WFS part is
working correctly, i get a complex feature with embedded complex features
and geometry (point). But then trying the WMS, i get exceptions.

This happens because the render can not find CRS and geometry in the
feature.

I did some debugging and found that the ComplexImpl gets wrapped into the
NonFeatureTypeProxy and this in turn returns null for
getCoordinateReferenceSystem() and getGeometryDescriptor()

Tested on 2.4.4, app-schema tutorial data works ok (well it does not get
wrapped into NonFeatureTypePRoxy).

What could be the problem?

This is my feature type target schema:
http://inspire.ec.europa.eu/schemas/gn/3.0/GeographicalNames.xsd

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Complex-features-and-WMS-tp5129235.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Sounds like you found a solid regression - can we ask you to open up a bug report with the details?

···

Jody Garnett

On Sun, Mar 16, 2014 at 5:54 AM, GeoUser <geouser938@anonymised.com> wrote:

Hey all.

I seem to be having problems with Complex Features and WMS. The WFS part is
working correctly, i get a complex feature with embedded complex features
and geometry (point). But then trying the WMS, i get exceptions.

This happens because the render can not find CRS and geometry in the
feature.

I did some debugging and found that the ComplexImpl gets wrapped into the
NonFeatureTypeProxy and this in turn returns null for
getCoordinateReferenceSystem() and getGeometryDescriptor()

Tested on 2.4.4, app-schema tutorial data works ok (well it does not get
wrapped into NonFeatureTypePRoxy).

What could be the problem?

This is my feature type target schema:
http://inspire.ec.europa.eu/schemas/gn/3.0/GeographicalNames.xsd


View this message in context: http://osgeo-org.1560.x6.nabble.com/Complex-features-and-WMS-tp5129235.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


Learn Graph Databases - Download FREE O’Reilly Book
“Graph Databases” is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

NonFeatureTypeProxy is used when the complex type used is not a GML Feature
type, e.g. a data type.
Which type in the schema are you trying to use exactly?

Having said that, we should be flexible enough to let users publish
anything.. so it's a bug specific to non GML Feature types.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Complex-features-and-WMS-tp5129235p5129337.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

We're using the NamedPlace which has the geometry defined as: <element
name="geometry" type="gml:GeometryPropertyType">

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Complex-features-and-WMS-tp5129235p5129391.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Interesting, NamedPlace extends gml:AbstractFeatureType, so it should be
treated as a feature type.
Do you have layer.xml set up?

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Complex-features-and-WMS-tp5129235p5129592.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Can you attach the stack trace as well?

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Complex-features-and-WMS-tp5129235p5129593.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Yes, the layer.xml is configured as:

<layer>
  
<id>
inspire_NamedPlaceLayer
</id>
  
<name>
NamedPlace
</name>
  
<path>
/
</path>
  
<type>
VECTOR
</type>
  
<defaultStyle>
    
<name>
point
</name>
  
</defaultStyle>
  
<resource class="featureType">
    
<id>
inspire_NamedPlaceFeatureType
</id>
  
</resource>
  
<enabled>
true
</enabled>
  
<attribution>
    
<logoWidth>
0
</logoWidth>
    
<logoHeight>
0
</logoHeight>
  
</attribution>
</layer>

And the stack trace:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
&lt;
!DOCTYPE ServiceExceptionReport SYSTEM
&quot;http://localhost:8080/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd&quot;
&gt;

<ServiceExceptionReport version="1.1.1" >
   
<ServiceException code="internalError">
      Rendering process failed
Error transforming bbox
null
Details:
org.geoserver.platform.ServiceException: Rendering process failed
  at
org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:507)
  at
org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:251)
  at
org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:123)
  at org.geoserver.wms.GetMap.executeInternal(GetMap.java:521)
  at org.geoserver.wms.GetMap.run(GetMap.java:253)
  at org.geoserver.wms.GetMap.run(GetMap.java:124)
  at
org.geoserver.wms.DefaultWebMapService.getMap(DefaultWebMapService.java:328)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:606)
  at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)
  at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
  at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
  at
org.geoserver.kml.WebMapServiceKmlInterceptor.invoke(WebMapServiceKmlInterceptor.java:34)
  at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
  at
org.geoserver.gwc.wms.CacheSeedingWebMapService.invoke(CacheSeedingWebMapService.java:61)
  at
org.geoserver.gwc.wms.CacheSeedingWebMapService.invoke(CacheSeedingWebMapService.java:35)
  at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
  at
org.geoserver.gwc.wms.CachingWebMapService.invoke(CachingWebMapService.java:73)
  at
org.geoserver.gwc.wms.CachingWebMapService.invoke(CachingWebMapService.java:54)
  at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
  at
org.geoserver.ows.util.RequestObjectLogger.invoke(RequestObjectLogger.java:54)
  at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
  at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
  at com.sun.proxy.$Proxy38.getMap(Unknown Source)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:606)
  at org.geoserver.ows.Dispatcher.execute(Dispatcher.java:774)
  at
org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:272)
  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.doGet(FrameworkServlet.java:778)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
  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:27)
  at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at
org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)
  at
org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)
  at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at
org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)
  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:68)
  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:72)
  at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
  at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)
  at
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
  at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)
  at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
  at
org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:53)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
  at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)
  at
org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
  at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)
  at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
  at
org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:82)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
  at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)
  at
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
  at
org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:52)
  at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)
  at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
  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:134)
  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:75)
  at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)
  at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at
org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:47)
  at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at
org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:43)
  at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at
org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
  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.headerComplete(HttpConnection.java:828)
  at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
  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.lang.Exception: Error transforming bbox
  at
org.geotools.renderer.lite.StreamingRenderer.getStyleQuery(StreamingRenderer.java:1068)
  at
org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:2009)
  at
org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:837)
  at
org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:481)
  ... 103 more
Caused by: java.lang.NullPointerException
  at
org.geotools.geometry.jts.ReferencedEnvelope.transform(ReferencedEnvelope.java:661)
  at
org.geotools.renderer.crs.ProjectionHandler.getQueryEnvelopes(ProjectionHandler.java:94)
  at
org.geotools.renderer.lite.StreamingRenderer.getStyleQuery(StreamingRenderer.java:1048)
  ... 106 more
</ServiceException>
</ServiceExceptionReport>

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Complex-features-and-WMS-tp5129235p5129617.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

OK this looks like a bug.. Please create a JIRA issue with your configuration
attached (SLD style, mapping file) - it would make it a lot faster to unit
test and fix.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Complex-features-and-WMS-tp5129235p5130043.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

The issue created: https://jira.codehaus.org/browse/GEOS-6417

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Complex-features-and-WMS-tp5129235p5131453.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi

We are running into the same (or similar) issue (app schema + WMS) on
geoserver 2.5.

We are using the HazardArea featuretype from the INSPIRE Natural Risk Zones.
In here, the geometry is actually at the top level of the featuretype
(Hazard Area), so not nested as the example given by the original poster.

Could it be, that this is due to the namespace required for the geometry?

This is: nz-core:geometry?

Also the WFS is working although being tranformed, it also is missing the
srsName attribute.

<nz-core:HazardArea
gml:id="5404793.0"><nz-core:inspireId><base:Identifier><base:localId>5404793.0</base:localId><base:namespace>mynamespace</base:namespace></base:Identifier></nz-core:inspireId><nz-core:geometry><gml:Polygon
gml:id="shape.5404793.0"
srsDimension="2"><gml:exterior><gml:LinearRing><gml:posList>390000.5557
228999.9999 390000.0 228999.9999 390000.0 229012.303400001 390001.7813
229010.578 390000.5557
228999.9999</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon></nz-core:geometry>

Could this be a similar issue?

tx

Luc

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Complex-features-and-WMS-tp5129235p5132365.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

The problem has been resolved as described in the comments:
https://jira.codehaus.org/browse/GEOT-4756

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Complex-features-and-WMS-tp5129235p5133077.html
Sent from the GeoServer - User mailing list archive at Nabble.com.