The tables I'm dealing with are actually just points, so I don't think that it should be any extended geometry type. I found that I can use Geoserver to publish the layer by using the SQL View functionality, and specifying
/select * from sde.azwellheaders/

Then, if I define the geometry type as point and give it the SRID (4326), the layer works fine. It works as well if I leave the geometry type as "GEOMETRY" and specify the SRID. The SQL view UI doesn't seem to be able to guess the SRID properly.

This is reasonable workaround, but I'm concerned about the trouble -- I was really hoping to be able to leverage SDE on top of PostGIS as a simple way to move all this ESRI data into an open format.

For the interested reader, the logged error is below.

Thanks,
Ryan


2011-11-23 16:18:03,072 ERROR [geoserver.ows] -
org.geoserver.platform.ServiceException:  error:Translator error
at org.geoserver.wfs.xml.GML2OutputFormat.encode(GML2OutputFormat.java:286) at org.geoserver.wfs.xml.GML2OutputFormat.write(GML2OutputFormat.java:295) at org.geoserver.wfs.WFSGetFeatureOutputFormat.write(WFSGetFeatureOutputFormat.java:141)
    at org.geoserver.ows.Dispatcher.response(Dispatcher.java:757)
at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:238) 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:875) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:23) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74) at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:394) at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406) at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406) at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406) at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406) at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406) at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:185) at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:71)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:183) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:46) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:304) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: javax.xml.transform.TransformerException: Translator error
at org.geotools.xml.transform.TransformerBase.transform(TransformerBase.java:134) at org.geotools.xml.transform.TransformerBase.transform(TransformerBase.java:109) at org.geoserver.wfs.xml.GML2OutputFormat.encode(GML2OutputFormat.java:276)
    ... 73 more
Caused by: java.lang.RuntimeException: Error reading Features
at org.geotools.gml.producer.FeatureTransformer$FeatureTranslator.handleFeatureIterator(FeatureTransformer.java:576) at org.geotools.gml.producer.FeatureTransformer$FeatureTranslator.encode(FeatureTransformer.java:513) at org.geotools.xml.transform.TransformerBase$XMLReaderSupport.parse(TransformerBase.java:715) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484) at org.geotools.xml.transform.TransformerBase$Task.run(TransformerBase.java:297) at org.geotools.xml.transform.TransformerBase.transform(TransformerBase.java:130)
    ... 75 more
Caused by: java.lang.RuntimeException: org.geotools.data.DataSourceException: An exception occurred while parsing WKB data
    at org.geotools.jdbc.JDBCFeatureReader.next(JDBCFeatureReader.java:325)
    at org.geotools.jdbc.JDBCFeatureReader.next(JDBCFeatureReader.java:85)
at org.geotools.data.store.ContentFeatureCollection$WrappingFeatureIterator.next(ContentFeatureCollection.java:189) at org.geotools.data.store.ContentFeatureCollection$WrappingFeatureIterator.next(ContentFeatureCollection.java:169) at org.geotools.gml.producer.FeatureTransformer$FeatureTranslator.handleFeatureIterator(FeatureTransformer.java:562)
    ... 80 more
Caused by: org.geotools.data.DataSourceException: An exception occurred while parsing WKB data at org.geotools.data.postgis.WKBAttributeIO.wkb2Geometry(WKBAttributeIO.java:82) at org.geotools.data.postgis.WKBAttributeIO.read(WKBAttributeIO.java:110) at org.geotools.data.postgis.PostGISDialect.decodeGeometryValue(PostGISDialect.java:157)
    at org.geotools.jdbc.JDBCFeatureReader.next(JDBCFeatureReader.java:321)
    ... 84 more
Caused by: com.vividsolutions.jts.io.ParseException: Unknown WKB type 93
    at com.vividsolutions.jts.io.WKBReader.readGeometry(WKBReader.java:186)
    at com.vividsolutions.jts.io.WKBReader.read(WKBReader.java:140)
at org.geotools.data.postgis.WKBAttributeIO.wkb2Geometry(WKBAttributeIO.java:80)
    ... 87 more

On 11/24/2011 02:25 AM, Andrea Aime wrote:
On Thu, Nov 24, 2011 at 12:45 AM, Ryan Clark <ryan.cl...@azgs.az.gov <mailto:ryan.cl...@azgs.az.gov>> wrote:

    I'm working on a database that has been generated as an ArcSDE
    database on top of PostgreSQL and PostGIS. The database was built
    from a PostGIS template and the featureclasses in the database use
    the PostGIS geometry type.

    On the database end, everything seems to be working fine. Queries like
    /SELECT ST_asText(shape) as WKT, geometrytype(shape) as TYPE from
    sde.azwellheaders
    /... work just fine. The public.geometry_columns table is
    populated correctly, including records for the shape fields from
    all the featureclasses. I did notice that the
    public.geometry_columns.type field just says "GEOMETRY", instead
    giving a specific geometry type, but I think that's valid, right?


It is.


    I tried building layers in Geoserver from a few of these
    featureclasses. The UI correctly detects the SRID and can
    correctly compute the bounds from the data. However, once the
    layer is published and I look at the Layer Preview, click on GML
    for my new layer, I get the following WFS response:
    <ServiceException>
    error:Translator error Translator error Error reading Features
    org.geotools.data.DataSourceException: An exception occurred while
    parsing WKB data An exception occurred while parsing WKB data
    Unknown WKB type 93
    </ServiceException>


Haven't seen this one before, but it may be that the geometry is using some extended type that is not supported by JTS, and thus by GeoServer. For example, it would fail if the geometries were arcs (as opposed to be made
of straight segments).

Cheers
Andrea

--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-------------------------------------------------------
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to