Feature Type has NULL extent error
----------------------------------
Key: GEOS-1899
URL: http://jira.codehaus.org/browse/GEOS-1899
Project: GeoServer
Issue Type: Bug
Affects Versions: 1.6.0-RC1
Environment: GeoServer app on Ubuntu OS; PostgreSQL 8.3 and PostGIS 1.3 on Windows 2003 Server
Reporter: Tyler Erickson
Assignee: Andrea Aime
I am unable to create a FeatureType using the GeoServer UI for a particular PostGIS view that creates a linestring from a series of points. When I click the Bounding Box Generate button, I get the following error message:
"The FeatureType 'v_vehicle_lines_test' has a NULL extent. HINT: the dataset is empty or has no default geometry attribute."
The GeoServer log and scripts for creating a test table and view are listed below.
02 May 16:25:29 DEBUG [data.postgis] - PostGIS version is 1.3 USE_GEOS=1 USE_PROJ=1 USE_STATS=1
02 May 16:25:29 DEBUG [data.postgis] - Postgres version is 8.3.0
02 May 16:25:30 DEBUG [data.postgis] - geometry type sql statement is SELECT type FROM geometry_columns WHERE f_table_schema='public' AND f_table_name='v_vehicle_lines_test' AND f_geometry_column='route_geom';
02 May 16:25:30 DEBUG [data.postgis] - geometry type is: MULTILINESTRING
02 May 16:25:30 DEBUG [data.postgis] - srid statement is SELECT srid FROM geometry_columns WHERE f_table_schema='public' AND f_table_name='v_vehicle_lines_test' AND f_geometry_column='route_geom';
02 May 16:25:30 DEBUG [data.postgis] - srid statement is SELECT srid FROM geometry_columns WHERE f_table_schema='public' AND f_table_name='v_vehicle_lines_test' AND f_geometry_column='route_geom';
02 May 16:25:30 DEBUG [geoserver.action] - form bean:org.vfny.geoserver.form.data.TypesEditorForm
02 May 16:25:30 DEBUG [geoserver.action] - TypesEditorAction is Generate
02 May 16:25:30 DEBUG [geoserver.action] - BBOX: Generate
02 May 16:25:30 DEBUG [data.property] - can't process parameters
java.io.IOException: Parameter directory is required:Directory containting property files
at org.geotools.data.DataStoreFactorySpi$Param.lookUp(DataStoreFactorySpi.java:392)
at org.geotools.data.property.PropertyDataStoreFactory.directoryLookup(PropertyDataStoreFactory.java:187)
at org.geotools.data.property.PropertyDataStoreFactory.canProcess(PropertyDataStoreFactory.java:156)
at org.geotools.data.DataStoreFinder.getDataStore(DataStoreFinder.java:90)
at org.vfny.geoserver.util.DataStoreUtils.getDataStore(DataStoreUtils.java:62)
at org.vfny.geoserver.util.DataStoreUtils.acquireDataStore(DataStoreUtils.java:51)
at org.vfny.geoserver.config.DataStoreConfig.findDataStore(DataStoreConfig.java:330)
at org.vfny.geoserver.action.data.TypesEditorAction.executeBBox(TypesEditorAction.java:219)
at org.vfny.geoserver.action.data.TypesEditorAction.execute(TypesEditorAction.java:132)
at org.vfny.geoserver.action.ConfigAction.execute(ConfigAction.java:101)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:459)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1054)
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.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:106)
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.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)
at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:358)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:231)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:629)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:453)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
at org.mortbay.jetty.Server.handle(Server.java:303)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:452)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:735)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:636)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:349)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:320)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
02 May 16:25:30 DEBUG [data.postgis] - PostGIS version is 1.3 USE_GEOS=1 USE_PROJ=1 USE_STATS=1
02 May 16:25:30 DEBUG [data.postgis] - Postgres version is 8.3.0
02 May 16:25:30 DEBUG [data.postgis] - geometry type sql statement is SELECT type FROM geometry_columns WHERE f_table_schema='public' AND f_table_name='v_vehicle_lines_test' AND f_geometry_column='route_geom';
02 May 16:25:30 DEBUG [data.postgis] - geometry type is: MULTILINESTRING
02 May 16:25:30 DEBUG [data.postgis] - srid statement is SELECT srid FROM geometry_columns WHERE f_table_schema='public' AND f_table_name='v_vehicle_lines_test' AND f_geometry_column='route_geom';
02 May 16:25:30 DEBUG [data.postgis] - srid statement is SELECT srid FROM geometry_columns WHERE f_table_schema='public' AND f_table_name='v_vehicle_lines_test' AND f_geometry_column='route_geom';
02 May 16:25:30 DEBUG [geoserver.action] - calculating bbox for their dataset
02 May 16:25:30 DEBUG [data.jdbc] - calling sql builder with filter Filter.INCLUDE
02 May 16:25:30 DEBUG [data.jdbc] - sql is SELECT encode(AsBinary(force_2d("route_geom"), 'XDR'),'base64') FROM "public"."v_vehicle_lines_test"
02 May 16:25:30 DEBUG [data.jdbc] - SELECT encode(AsBinary(force_2d("route_geom"), 'XDR'),'base64') FROM "public"."v_vehicle_lines_test"
02 May 16:25:30 DEBUG [data.jdbc] - About to execute query: SELECT encode(AsBinary(force_2d("route_geom"), 'XDR'),'base64') FROM "public"."v_vehicle_lines_test"
02 May 16:25:30 DEBUG [geoserver.action] - FeatureType 'v_vehicle_lines_test' has a null bounding box
02 May 16:29:15 ERROR [data.jdbc] - There's code leaving readers, writers or iterators unclosed (you got an unclosed QueryData object, which is usually held by a reader or a writer).
Call reader/writer.close() or FeatureCollection.close(iterator) after using them to ensure they do not hold state such as JDCB connections.
QueryData was open against feature type: v_vehicle_lines_test
CREATE TABLE test_truck_obs
(
id serial NOT NULL,
vehicleid integer NOT NULL,
datestamp timestamp without time zone NOT NULL,
CONSTRAINT pk_id_test PRIMARY KEY (id)
)
WITH (OIDS=FALSE);
ALTER TABLE test_truck_obs OWNER TO postgres;
GRANT ALL ON TABLE test_truck_obs TO postgres;
GRANT SELECT ON TABLE test_truck_obs TO geoserver;
GRANT SELECT, INSERT ON TABLE test_truck_obs TO osu_freight_group;
SELECT AddGeometryColumn( 'test_truck_obs', 'geom', 4326, 'POINT', 2)
CREATE INDEX idx_gist_geom_test
ON test_truck_obs
USING gist
(geom);
INSERT INTO test_truck_obs (id, vehicleid, datestamp, geom) VALUES (1261514, 80423, '2008-04-27 19:00:00', '0101000020E610000019FF3EE3C2E953C0B0045262D7D24540');
INSERT INTO test_truck_obs (id, vehicleid, datestamp, geom) VALUES (1261603, 80433, '2008-04-27 18:36:00', '0101000020E6100000E1D1C6116BE953C0EB8B84B69CD34540');
INSERT INTO test_truck_obs (id, vehicleid, datestamp, geom) VALUES (1261604, 80433, '2008-04-27 18:46:00', '0101000020E6100000255D33F966E953C02D98F8A3A8D34540');
INSERT INTO test_truck_obs (id, vehicleid, datestamp, geom) VALUES (1261605, 80433, '2008-04-27 18:58:00', '0101000020E610000016C1FF56B2E753C0BF0AF0DDE6DB4540');
INSERT INTO test_truck_obs (id, vehicleid, datestamp, geom) VALUES (1261606, 80433, '2008-04-27 19:00:00', '0101000020E61000008F8D40BCAEE753C0DDD26A48DCDB4540');
INSERT INTO test_truck_obs (id, vehicleid, datestamp, geom) VALUES (1261757, 80451, '2008-04-27 18:59:00', '0101000020E6100000137EA99F37E354C0CA32C4B12E824540');
INSERT INTO test_truck_obs (id, vehicleid, datestamp, geom) VALUES (1261756, 80451, '2008-04-27 18:44:00', '0101000020E6100000B3CD8DE909D154C04C8E3BA583814540');
INSERT INTO test_truck_obs (id, vehicleid, datestamp, geom) VALUES (1261755, 80451, '2008-04-27 18:29:00', '0101000020E61000004D2D5BEB8BBE54C0C8242367617F4540');
-- View: "v_vehicle_lines_test"
-- DROP VIEW v_vehicle_lines_test;
CREATE OR REPLACE VIEW v_vehicle_lines_test AS
SELECT
obs.vehicleid,
obs.obs_date,
count(obs.vehicleid) AS obs_count,
min(obs.datestamp) AS min_time,
max(obs.datestamp) AS max_time,
(max(obs.datestamp) - min(obs.datestamp))::time without time zone AS elapsed_time,
st_makeline(obs.geom) AS route_geom
FROM (
SELECT
test_truck_obs.vehicleid,
test_truck_obs.datestamp,
date_trunc('day'::text, test_truck_obs.datestamp) AS obs_date,
test_truck_obs.geom
FROM test_truck_obs
ORDER BY test_truck_obs.datestamp) obs
GROUP BY obs.vehicleid, obs.obs_date
ORDER BY obs.vehicleid, obs.obs_date;
ALTER TABLE v_vehicle_lines_test OWNER TO postgres;
GRANT SELECT, UPDATE, INSERT, DELETE, REFERENCES, TRIGGER ON TABLE v_vehicle_lines_test TO postgres;
GRANT SELECT ON TABLE v_vehicle_lines_test TO geoserver;
COMMENT ON VIEW v_vehicle_lines_test IS 'creates a single line based on each vehicleid';
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira