Platform: Windows XP, Sun Java 1.6.0_04, GeoServer 1.6.1 war added to
GlassFish v2-b58g.
All GeoServer demo's run fine.
Created new Data Store to connect to Oracle 10g Enterprise Edition
10.2.0.3.0, connecting as a test user that owns a few demonstration tables.
Created a new Namespace, vai
Created a new FeatureType OraGIS:locator which is linked to VT_LOCATOR table
and vai Namespace
WMS requests for vai:locator works at first attempt - very nice
WFS is more problematic though:
GetCapabilities includes a section like this which looks OK to me:
<FeatureType>
<Name>vai:locator</Name>
<Title>VT_LOCATOR_Type</Title>
<Abstract>Generated from OraGIS</Abstract>
<ows:Keywords>
<ows:Keyword>VT_LOCATOR</ows:Keyword>
<ows:Keyword>OraGIS</ows:Keyword>
</ows:Keywords>
<DefaultSRS>urn:x-ogc:def:crs:EPSG:6.11.2:4326</DefaultSRS>
<OutputFormats>
<Format>GML2</Format>
<Format>GML2-GZIP</Format>
<Format>text/xml; subtype=gml/2.1.2</Format>
<Format>text/xml; subtype=gml/3.1.1</Format>
<Format>gml3</Format>
<Format>SHAPE-ZIP</Format>
<Format>json</Format>
</OutputFormats>
<ows:WGS84BoundingBox>
<ows:LowerCorner>-120.996781797421 -39.3900722151593</ows:LowerCorner>
<ows:UpperCorner>175.815709923708 63.9519345221582</ows:UpperCorner>
</ows:WGS84BoundingBox>
</FeatureType>
DescribeFeature also looks OK:
<DescribeFeatureType
version="1.1.0"
service="WFS"
xmlns="http://www.opengis.net/wfs"
xmlns:vai="http://geo.myCompany.net/test"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
<TypeName>vai:locator</TypeName>
</DescribeFeatureType>
results:
<xsd:schema elementFormDefault="qualified"
targetNamespace="http://geo.myCompany.net/test">
<xsd:import namespace="http://www.opengis.net/gml"
schemaLocation="http://localhost:8080/geoserver/wfs/schemas/gml/3.1.1/base/gml.xsd"/>
<xsd:complexType name="locatorType">
<xsd:complexContent>
<xsd:extension base="gml:AbstractFeatureType">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="TARGET_ID" nillable="true"
type="xsd:decimal"/>
<xsd:element maxOccurs="1" minOccurs="1" name="LOCATOR_TYPE" nillable="true"
type="xsd:decimal"/>
<xsd:element maxOccurs="1" minOccurs="1" name="LOCATOR_NO" nillable="true"
type="xsd:decimal"/>
<xsd:element maxOccurs="1" minOccurs="0" name="LOCATOR_GEOMETRY"
nillable="true" type="gml:GeometryPropertyType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="LOCATOR_ALTITUDE"
nillable="true" type="xsd:decimal"/>
<xsd:element maxOccurs="1" minOccurs="1" name="LOCATOR_START"
nillable="true" type="xsd:dateTime"/>
<xsd:element maxOccurs="1" minOccurs="1" name="LOCATOR_END" nillable="true"
type="xsd:dateTime"/>
<xsd:element maxOccurs="1" minOccurs="0" name="LOCATOR_STATUS"
nillable="true" type="xsd:decimal"/>
<xsd:element maxOccurs="1" minOccurs="0" name="IS_PRIMARY" nillable="true"
type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="PARENT_ID" nillable="true"
type="xsd:decimal"/>
<xsd:element maxOccurs="1" minOccurs="0" name="LOCATOR_NAME" nillable="true"
type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="LAST_MODIFIED"
nillable="true" type="xsd:dateTime"/>
<xsd:element maxOccurs="1" minOccurs="1" name="MODIFIED_BY" nillable="true"
type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="DESCRIPTION" nillable="true"
type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="COORDINATE_SYSTEM"
nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name="VT_LOCATOR" substitutionGroup="gml:_Feature"
type="vai:locatorType"/>
</xsd:schema>
HOWEVER, I really struggled with GetFeature - shown here without a filter:
<wfs:GetFeature service="WFS" version="1.1.0"
outputFormat="GML2"
xmlns:vai="http://geo.myCompany.net/test"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/WFS-basic.xsd">
<wfs:Query typeName="vai:locator">
</wfs:Query>
</wfs:GetFeature>
results in:
<ows:ExceptionReport version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/ows
http://localhost:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd">
<ows:Exception exceptionCode="NoApplicableCode">
<ows:ExceptionText>java.lang.NullPointerException null</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
BUT, If I change just the first line of the request from wfs 1.1.0 to wfs
1.0.0 it all suddenly (well actually not so suddenly - there was about a day
of trying just about every other permutation and combination ..) springs
into life:
<wfs:GetFeature service="WFS" version="1.0.0"
xmlns:vai="http://geo.myCompany.net/test"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
<wfs:Query typeName="vai:locator">
</wfs:Query>
</wfs:GetFeature>
<wfs:FeatureCollection xsi:schemaLocation="http://geo.myCompany.net/test
http://localhost:8080/geoserver/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&typeName=vai:locator
http://www.opengis.net/wfs
http://localhost:8080/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd">
<gml:boundedBy>
<gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:coordinates decimal="." cs="," ts=" ">-120.9967818,-39.39007222
175.81570992,63.95193452</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<gml:featureMember>
<vai:locator fid="locator.317">
<vai:TARGET_ID>473</vai:TARGET_ID>
<vai:LOCATOR_TYPE>0</vai:LOCATOR_TYPE>
<vai:LOCATOR_NO>0</vai:LOCATOR_NO>
<vai:LOCATOR_GEOMETRY>
<gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:coordinates decimal="." cs="," ts="
">-3.46833,56.41806</gml:coordinates>
</gml:Point>
</vai:LOCATOR_GEOMETRY>
<vai:LOCATOR_ALTITUDE>20</vai:LOCATOR_ALTITUDE>
<vai:LOCATOR_START>2001-09-20T00:00:00</vai:LOCATOR_START>
<vai:LOCATOR_END>9999-12-31T00:00:00</vai:LOCATOR_END>
<vai:LOCATOR_STATUS>1</vai:LOCATOR_STATUS>
<vai:LAST_MODIFIED>2005-01-21T13:46:52</vai:LAST_MODIFIED>
<vai:MODIFIED_BY>WDF</vai:MODIFIED_BY>
<vai:DESCRIPTION>Location checked, WDF.</vai:DESCRIPTION>
<vai:COORDINATE_SYSTEM>WGS84</vai:COORDINATE_SYSTEM>
</vai:locator>
</gml:featureMember>
...
I suspect that I haven't properly set the featureType up - maybe something
to do with the nameSpace? or maybe I am making a stupid mistake in
requesting WFS 1.1.0 ?
n.b. stackTrace from failed WFS 1.1.0 request:
Request: getFeature
handle = null
service = WFS
version = 1.1.0
baseUrl = http://localhost:8080/geoserver/
query = [net.opengis.wfs.impl.QueryTypeImpl@anonymised.com (group: null,
propertyName: null, function: null, filter: [ locator.56 ], sortBy: null,
featureVersion: null, handle: null, srsName: null, typeName:
[{http://geo.myCompany.net/test\}locator])]
maxFeatures = null
outputFormat = text/xml; subtype=gml/3.1.1
resultType = results
traverseXlinkDepth = null
traverseXlinkExpiry = null
Result:
12 Mar 15:51:12 WARN [geoserver.ows] -
java.lang.NullPointerException
at
org.geotools.gml2.FeaturePropertyExtractor.properties(FeaturePropertyExtractor.java:60)
at org.geotools.xml.Encoder.encode(Encoder.java:573)
at org.geotools.xml.Encoder.encode(Encoder.java:320)
at
org.geoserver.wfs.xml.GML3OutputFormat.write(GML3OutputFormat.java:122)
at
org.geoserver.wfs.WFSGetFeatureOutputFormat.write(WFSGetFeatureOutputFormat.java:137)
at org.geoserver.ows.Dispatcher.response(Dispatcher.java:615)
at
org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:192)
at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:139)
at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
at
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:357)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:69)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:47)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
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.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178)
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:230)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
at
com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:361)
at
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
12 Mar 15:51:12 INFO [geoserver.filters] - 127.0.0.1 "POST /geoserver/wfs"
took 672ms
--
View this message in context: http://www.nabble.com/Newbie---1.6.1-WFS-version-question-tp16004690p16004690.html
Sent from the GeoServer - User mailing list archive at Nabble.com.