Skip to content
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

API endpoint api/admin/datasetfield/load allows invalid TSV (without error) #3617

Closed
pameyer opened this issue Feb 1, 2017 · 2 comments
Closed

Comments

@pameyer
Copy link
Contributor

pameyer commented Feb 1, 2017

The API endpoint for adding new metadata blocks appears to allow invalid blocks to be edited.

curl -X POST --data-binary @$tsv -H "Content-type: text/tab-separated-values" http://localhost:8080/api/admin/datasetfield/load appears successful; attempting to add a new datasetfield (to a draft dataset created through the native API, although that doesn't appear relevant) fails with:
"Dataset Save Failed - edu.harvard.iq.dataverse.engine.command.exception.CommandException: Command edu.harvard.iq.dataverse.engine.command.impl.UpdateDatasetCommand@16192b38 failed: null"
and
"The metadata could not be updated. Please contact Dataverse Support for assistance. Date/Time: 2017-02-01 18:55:23 Server: localhost.localdomain"

Possibly related to #2665; but reindexing solr with curl http://localhost:8080/api/admin/index doesn't change the error.

@pdurbin
Copy link
Member

pdurbin commented Feb 1, 2017

#2551 about a preview mode for loading tsv files is highly related. So is #3168 about documenting the tsv format in the first place. 😄

@pameyer
Copy link
Contributor Author

pameyer commented Feb 6, 2017

Additional troubleshooting (and hints from #3168, and the linked google doc) suggest that this is due to solr schema not being updated. set advancedSearchField,facetable (and all other fields) to FALSE; retry shows same behavior. solr docs (https://cwiki.apache.org/confluence/display/solr/Schema+API#SchemaAPI-AddaDynamicFieldRule) list an API endpoint for adding fields to schema; returns 405 (probably added after solr 4.6.0 - current version is 6.4.1; unclear when new endpoint was added).

Closing this issue (root cause of problem not related to tsv API endpoint); will investigate other options (1. generate tsv/schema from same representation, 2. solr 4.6.0 -> 6.4.1 upgrade).

@pameyer pameyer closed this as completed Feb 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants