[Geoserver-devel] [jira] (GEOS-6719) Shapefile output format can leak JDBC connections

Andrea Aime created an issue

GeoServer / BugGEOS-6719

Shapefile output format can leak JDBC connections

Issue Type:

BugBug

Assignee:

Andrea Aime

Components:

WFS

Created:

10/Oct/14 4:27 AM

Priority:

MajorMajor

Reporter:

Andrea Aime

The situation is a bit difficult to reproduce, but basically:

  • ask for wfs shapefile output format against a jdbc store
  • make sure the query will fail (maybe the db structure changed and the sql view working against it was not updated)

The following leak will appear:

2014-10-07 09:48:58,598 WARN [geotools.jdbc] - There is code leaving feature readers/iterators open, this is leaking statements and connections!
2014-10-07 09:48:58,598 WARN [geotools.jdbc] - The unclosed reader originated on this stack trace
java.lang.Exception
	at org.geotools.jdbc.JDBCFeatureReader.init(JDBCFeatureReader.java:169)
	at org.geotools.jdbc.JDBCFeatureReader.<init>(JDBCFeatureReader.java:132)
	at org.geotools.jdbc.JDBCFeatureSource.getReaderInternal(JDBCFeatureSource.java:585)
	at org.geotools.data.store.ContentFeatureSource.getReader(ContentFeatureSource.java:563)
	at org.geotools.data.store.ContentFeatureCollection.features(ContentFeatureCollection.java:165)
	at org.geoserver.feature.RetypingFeatureCollection.features(RetypingFeatureCollection.java:45)
	at org.geoserver.wfs.response.RemappingFeatureCollection.features(RemappingFeatureCollection.java:71)
	at org.geoserver.wfs.response.RemappingFeatureCollection.features(RemappingFeatureCollection.java:71)
	at org.geoserver.feature.RetypingFeatureCollection.features(RetypingFeatureCollection.java:45)
	at org.geoserver.feature.RetypingFeatureCollection.features(RetypingFeatureCollection.java:31)
	at org.geotools.data.store.ContentFeatureStore.addFeatures(ContentFeatureStore.java:243)
	at org.geoserver.wfs.response.ShapeZipOutputFormat.writeCollectionToShapefile(ShapeZipOutputFormat.java:385)
	at org.geoserver.wfs.response.ShapeZipOutputFormat.write(ShapeZipOutputFormat.java:238)
	at org.geoserver.wfs.response.ShapeZipOutputFormat.write(ShapeZipOutputFormat.java:208)
	at org.geoserver.wfs.WFSGetFeatureOutputFormat.write(WFSGetFeatureOutputFormat.java:190)
	at org.geoserver.ows.Dispatcher.response(Dispatcher.java:919)
	at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:276)

This is caused by a bug in ContentFeatureStore

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)

Atlassian logo