[Geoserver-devel] [JIRA] (GEOS-7012) importer does not properly populate layerInfo for GeoJSON imports

Syrus Mesdaghi created an issue

GeoServer / BugGEOS-7012

importer does not properly populate layerInfo for GeoJSON imports

Issue Type:

BugBug

Affects Versions:

2.6.4, 2.7.0

Assignee:

Unassigned

Components:

Importer

Created:

07/May/15 6:21 PM

Priority:

MediumMedium

Reporter:

Syrus Mesdaghi

When importing a GeoJSON file, the LayerInfo object returned by the task is not sufficiently populated. Even thought the importer can successfully import GeoJSON files, applications (such as GeoNode) that rely on the rest endpoint to retrieve additional data about the imported layer, get an exception.
http://localhost:8080/geoserver/rest/imports/1/tasks/0?expand=3

java.io.IOException: Schema ‘<layer name>’ does not exist.
at org.geotools.data.store.ContentDataStore.ensureEntry(ContentDataStore.java:619)
at org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:386)
at org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:353)
at org.geotools.data.store.ContentDataStore.getSchema(ContentDataStore.java:337)
at org.geotools.data.store.ContentDataStore.getSchema(ContentDataStore.java:711)
at org.geotools.data.store.ContentDataStore.getSchema(ContentDataStore.java:103)
at org.geoserver.catalog.ResourcePool.getNonCacheableFeatureType(ResourcePool.java:939)
at org.geoserver.catalog.ResourcePool.getFeatureType(ResourcePool.java:863)
at org.geoserver.catalog.ResourcePool.getFeatureType(ResourcePool.java:858)
at org.geoserver.catalog.ResourcePool.loadAttributes(ResourcePool.java:735)
at org.geoserver.catalog.ResourcePool.getAttributes(ResourcePool.java:711)
at org.geoserver.catalog.impl.FeatureTypeInfoImpl.attributes(FeatureTypeInfoImpl.java:105)
at org.geoserver.importer.rest.ImportJSONWriter.featureType(ImportJSONWriter.java:295)
at org.geoserver.importer.rest.ImportJSONWriter.layer(ImportJSONWriter.java:278)
at org.geoserver.importer.rest.ImportJSONWriter.task(ImportJSONWriter.java:198)
at org.geoserver.importer.rest.TaskResource$ImportTaskJSONFormat.write(TaskResource.java:345)

Will try to have a pull request soon.

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v6.5-OD-03-002#65000-sha1:b8f65f8)

Atlassian logo