-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mongodb: errors with nested arrays of objects #83
Comments
modified MongoUtil to ignore arrays within document DBObject instances instead of throwing an exception
modified MongoUtil to ignore arrays within document DBObject instances instead of throwing an exception
Arrays were ignored due to issues with GeoServer supporting literal feature attributes w/ cardinalities > 1. What's the strategy for handling arrays with more than one element? |
The strategy in the referencing pull request #84 is to continue ignoring them, but in a way that does not throw uncaught exceptions when creating a MongoDB Store pointing to data that contains arrays. |
This project has been donated to geotools community: It will be marked supported when it meets documentation and quality assurance requirements. |
Using GeoServer 2.7.1 Stable
Using gt-mongodb extension, 2.7-SNAPSHOT built from master (e173782)
The mongodb extension fails when a collection has either an index that references the property of an object in a nested array, or when accessing documents with a key path pointing to values of objects in an array nested in the documents.
For example, an index on the key path
attachments.lastModified
, whereattachments
is a document key that references an array of objects, which in turn have a keylastModified
that references a scalar value, will cause the errors in steps 6 and 8 below. Additionally, in the absence of such an index, simply a document with that same structure will cause the error in step 11. Here is a concrete example of the symptomatic document structure:Reproducing the errors
Login to GeoServer as the admin user.
Click the Layers link in the navigation pane.
Click the Add a new resource link.
Choose the Store for your MongoDB database. This assumes you have defined a MongoDB Store already.
Choose a collection that has nested array keys and click its Publish link.
In the Bounding Boxes section, click either of compute from data/compute from native bounds. The app shows the following error on a web page and in the server log.
Input valid bounding box information.
Save the layer. The app shows the following error on a web page and in the server log. The app should still save the layer, however.
Click the Layer Preview link in the navigation pane.
Click the OpenLayers link on the MongoDB layer you created.
Click on a feature on the map. The browser should download a file called
wms
, and the following error appears in the log. Thewms
file should also contain the message text of the exception.The text was updated successfully, but these errors were encountered: