[Geoserver-devel] Transformer Exception in Complex Feature response

I’m getting a TransformerException, below, when making a GetFeature request for a complex feature layer. The GeoServer configuration claims to be version 1.3.0.
The features are created from a single Oracle table, but are grouped to provide a single ‘site’ with multiple 'result’s.
I get proper and expected responses to my GetFeature requests when multiple sites are returned, or when a single site is created from multiple database records. When a single site with a single record is requested, I get the exception.

I do not have the option of upgrading GeoServer at the moment. Is this a know issue in this version, and are there workarounds?


Mark Leslie

<?xml version="1.0" ?>

<ServiceExceptionReport
   version="1.2.0"
xmlns="[http://www.opengis.net/ogc](http://www.opengis.net/ogc)"
xmlns:xsi="[http://www.w3.org/2001/XMLSchema-instance](http://www.w3.org/2001/XMLSchema-instance)"
xsi:schemaLocation="[http://www.opengis.net/ogc](http://www.opengis.net/ogc) [http://wfs.test.dnr.nsw.gov.au:80/geoserver/schemas//wfs/1.0.0/OGC-exception.xsd](http://wfs.test.dnr.nsw.gov.au:80/geoserver/schemas//wfs/1.0.0/OGC-exception.xsd)">

   <ServiceException>
      javax.xml.transform.TransformerException: Translator error
	at org.geotools.xml.transform.TransformerBase.transform(TransformerBase.java:122)
	at org.geotools.xml.transform.TransformerBase.transform(TransformerBase.java:97)

	at org.vfny.geoserver.wfs.responses.GML2FeatureResponseDelegate.encode(GML2FeatureResponseDelegate.java:236)
	at org.vfny.geoserver.wfs.responses.FeatureResponse.writeTo(FeatureResponse.java:130)
	at org.vfny.geoserver.servlets.AbstractService.doService(AbstractService.java:510)

	at org.vfny.geoserver.servlets.AbstractService.doPost(AbstractService.java:387)
	at org.vfny.geoserver.servlets.AbstractService.doPost(AbstractService.java:293)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)

	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

	at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:122)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)

	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

	at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
	at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
	at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)

	at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
	at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)

	at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.RuntimeException: Error reading Features
	at org.geotools.gml.producer.FeatureTransformer$FeatureTranslator.handleFeatureReader(FeatureTransformer.java:395)

	at org.geotools.gml.producer.FeatureTransformer$FeatureTranslator.encode(FeatureTransformer.java:359)
	at org.geotools.xml.transform.TransformerBase$XMLReaderSupport.parse(TransformerBase.java:603)
	at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:463)

	at org.geotools.xml.transform.TransformerBase$Task.run(TransformerBase.java:285)
	at org.geotools.xml.transform.TransformerBase.transform(TransformerBase.java:118)
	... 26 more
Caused by: java.util.NoSuchElementException: No such Feature exists

	at org.geotools.data.MaxFeatureReader.next(MaxFeatureReader.java:57)
	at org.geotools.gml.producer.FeatureTransformer$FeatureTranslator.handleFeatureReader(FeatureTransformer.java:376)
	... 31 more
---------

java.lang.RuntimeException: Error reading Features
	at org.geotools.gml.producer.FeatureTransformer$FeatureTranslator.handleFeatureReader(FeatureTransformer.java:395)
	at org.geotools.gml.producer.FeatureTransformer$FeatureTranslator.encode(FeatureTransformer.java:359)

	at org.geotools.xml.transform.TransformerBase$XMLReaderSupport.parse(TransformerBase.java:603)
	at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:463)
	at org.geotools.xml.transform.TransformerBase$Task.run(TransformerBase.java:285)

	at org.geotools.xml.transform.TransformerBase.transform(TransformerBase.java:118)
	at org.geotools.xml.transform.TransformerBase.transform(TransformerBase.java:97)
	at org.vfny.geoserver.wfs.responses.GML2FeatureResponseDelegate.encode(GML2FeatureResponseDelegate.java:236)

	at org.vfny.geoserver.wfs.responses.FeatureResponse.writeTo(FeatureResponse.java:130)
	at org.vfny.geoserver.servlets.AbstractService.doService(AbstractService.java:510)
	at org.vfny.geoserver.servlets.AbstractService.doPost(AbstractService.java:387)

	at org.vfny.geoserver.servlets.AbstractService.doPost(AbstractService.java:293)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)

	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:122)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)

	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)

	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)

	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
	at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)

	at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
	at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
	at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)

	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
	at java.lang.Thread.run(Thread.java:595)
Caused by: java.util.NoSuchElementException: No such Feature exists
	at org.geotools.data.MaxFeatureReader.next(MaxFeatureReader.java:57)

	at org.geotools.gml.producer.FeatureTransformer$FeatureTranslator.handleFeatureReader(FeatureTransformer.java:376)
	... 31 more
   </ServiceException>
</ServiceExceptionReport>

Mark Leslie ha scritto:

I'm getting a TransformerException, below, when making a GetFeature request for a complex feature layer. The GeoServer configuration claims to be version 1.3.0. <http://1.3.0.> The features are created from a single Oracle table, but are grouped to provide a single 'site' with multiple 'result's.
I get proper and expected responses to my GetFeature requests when multiple sites are returned, or when a single site is created from multiple database records. When a single site with a single record is requested, I get the exception.

I do not have the option of upgrading GeoServer at the moment. Is this a know issue in this version, and are there workarounds?

Mark,
complex feature stuff is not maintained by the "official" developers
of GeoServer, it's really custom stuff developed by Rob's staff, so
they will be probable the only ones able to answer you.

Yet, I kind of remember complex features are supported
only in wfs 1.1/gml3 responses? Gabriel or Ben might have a better
answer.

Cheers
Andrea

Yep - Andrea is correct that only WFS 1.1 is supported using the
community schema support extensions at this stage - we only upgraded
one plugin protocol handler.

At some point in the future we wont need to hack the WFS plug-in
because the underlying framework will have a more flexible FeatureAPI,
but for now you'll have to live with WFS 1.1

The Geoserver config should have sample queries using WFS 1.1 ...

Rob Atkinson

On Tue, Apr 22, 2008 at 4:48 PM, Andrea Aime <aaime@anonymised.com> wrote:

Mark Leslie ha scritto:

> I'm getting a TransformerException, below, when making a GetFeature
> request for a complex feature layer. The GeoServer configuration claims
> to be version 1.3.0. <http://1.3.0.>

> The features are created from a single Oracle table, but are grouped to
> provide a single 'site' with multiple 'result's.
> I get proper and expected responses to my GetFeature requests when
> multiple sites are returned, or when a single site is created from
> multiple database records. When a single site with a single record is
> requested, I get the exception.
>
> I do not have the option of upgrading GeoServer at the moment. Is this
> a know issue in this version, and are there workarounds?

Mark,
complex feature stuff is not maintained by the "official" developers
of GeoServer, it's really custom stuff developed by Rob's staff, so
they will be probable the only ones able to answer you.

Yet, I kind of remember complex features are supported
only in wfs 1.1/gml3 responses? Gabriel or Ben might have a better
answer.

Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel