RSpace integration - deposit error

29 views
Skip to first unread message

Laura Huisintveld

unread,
Dec 13, 2017, 7:17:50 AM12/13/17
to Dataverse Users Community
Hi everybody,

Maybe I should ask this to the researchSpace support folks, but I thought maybe the Dataverse community might be able to help.

I was testing the Rspace integration with Dataverse. (We are using version 4.6.1).
I was able to connect RSpace with my dataverse and to generate an export. But then I received this error message:

"Your deposit to repository Dataverse failed.Here is the message from the repository:
Deposit failed: Error code returned 400 with message [Error parsing datasetVersion: incorrect typeClass for field producer, should be controlledVocabulary]"

(You cannot fill in a value for the producer field in RSpace when creating the export)

Is there someone who also had this experience and maybe found a solution?

Thanks,
Laura

Philip Durbin

unread,
Dec 13, 2017, 7:33:37 AM12/13/17
to dataverse...@googlegroups.com
Interesting. Have you customized the "producer"* field in your installation of Dataverse?

Can you please test depositing from RSpace to https://demo.dataverse.org (running 4.8.1) to see if that works?

Thanks,

Phil

* Per the attached screenshot, "producer" has "allowControlledVocabulary" set to "false" according to the "Citation Metadata" spreadsheet linked from http://guides.dataverse.org/en/4.8.4/user/appendix.html

--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-community+unsub...@googlegroups.com.
To post to this group, send email to dataverse-community@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/d98d5d6c-c344-412b-8394-f581fa90eaa4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Screen Shot 2017-12-13 at 7.30.10 AM.png

Laura Huisintveld

unread,
Dec 13, 2017, 10:37:06 AM12/13/17
to Dataverse Users Community

Hi Philip,

Thanks for your response. I was able to deposit the same data to your demo site (https://demo.dataverse.org), that worked fine.
I am not aware of any customization of our producer-field, but I will have to check with my colleagues to know for sure.

Best, Laura


Philip Durbin

unread,
Dec 13, 2017, 11:49:00 AM12/13/17
to dataverse...@googlegroups.com
Hi Laura,

Thanks for testing the demo site. I'm glad it worked. I'd be curious to know if your installation of Dataverse shows true or false for "allowcontrolledvocabulary" for the "producer" field. On my laptop it shows "f" for false:

psql dvndb -c "select id,name,allowcontrolledvocabulary from datasetfieldtype where name = 'producer';"
 id |   name   | allowcontrolledvocabulary
----+----------+---------------------------
 36 | producer | f
(1 row)

Here's the schema for that "datasetfieldtype" table: http://phoenix.dataverse.org/schemaspy/latest/tables/datasetfieldtype.html

Phil


--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-community+unsub...@googlegroups.com.
To post to this group, send email to dataverse-community@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Richard Adams

unread,
Dec 14, 2017, 4:09:56 AM12/14/17
to Dataverse Users Community
Hi Laura
 I'm Richard Adams from ResearchSpace - were very happy you're using RSpace and its Dataverse feature!
 At present this feature is still quite experimental and only tested thoroughly against demo.dataverse.org. I'm not a Dataverse expert but if you find that your Dataverse
 is configured differently we can try to figure out how to deal with this in RSpace.
Phil,
 below is the code we use in RSpace to configure the Dataverse submission. SubmissionMetadata is a POJO holding the form data, then we invoke the Dataverse Java library. As you can see this is quite minimal so please let us know if we should add extra configuration for this case.
Thanks Richard

DatasetFacade buildDatasetToSubmit(SubmissionMetadata metadata) {

DatasetFacadeBuilder builder = DatasetFacade.builder();

for (IDepositor author: metadata.getAuthors()) {

builder.author(buildAuthor(author));

}

for (IDepositor contact: metadata.getContacts()) {

builder.contact(buildContact(contact));

}

DatasetFacade facade = builder

.title(metadata.getTitle())

.subject(metadata.getSubjects().isEmpty()?"":metadata.getSubjects().get(0))

.description(DatasetDescription.builder().description(metadata.getDescription()).build())

.languages(asList(new String []{"English"}))

.build();

return facade;

}

private DatasetContact buildContact(IDepositor contact) {

return DatasetContact.builder()

.datasetContactEmail(contact.getEmail())

.datasetContactName(contact.getUniqueName()).build();

}

private DatasetAuthor buildAuthor(IDepositor author) {

ExternalId extId = getExtId(author);

return DatasetAuthor.builder()

.authorName(author.getUniqueName())

.authorIdentifier((extId != null) ? extId.getIdentifier() : null)

.authorIdentifierScheme((extId != null) ? extId.getScheme().name() : null)

.build();

Philip Durbin

unread,
Dec 14, 2017, 8:11:59 AM12/14/17
to dataverse...@googlegroups.com
Hi Richard! Thanks for jumping in here. That code you're showing does seem quite minimal. I don't see anything about "producer" in it. However, I'm aware that the underlying open source Java library you contributed (thanks again!) does seems to have the ability to handle the "producer" field. I'm wondering if the JSON that RSpace sends across the wire to a Dataverse installation ever has "producer" in it. I'm wondering about this because on the Dataverse side the code that's triggering the error is the "JsonParser" class I linked to previously. It seems to be finding "producer" in the JSON it's parsing, I mean.

Laura, it might be helpful for you to share a screenshot of what your researches when they go to add the "Producer" field to their datasets. This will answer questions I have:

- Is "Producer" a drop down with a list to pick from (a "controlled vocabulary")?
- Is "Producer" marked as a required field?

Thanks,

Phil

* At least I'm seeing `addProducers` here: https://github.com/IQSS/dataverse-client-java/blob/e7b2d793263c20bb58806a421af349c442af78cd/src/main/java/com/researchspace/dataverse/entities/facade/DatasetBuilder.java#L101

p.s. Richard, you and I talked about an example of a required field with a controlled vocabulary ("Subject") over at https://github.com/IQSS/dataverse-client-java/issues/6

--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-community+unsub...@googlegroups.com.
To post to this group, send email to dataverse-community@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Laura Huisintveld

unread,
Dec 20, 2017, 3:04:53 AM12/20/17
to Dataverse Users Community
Hi Phil and Richard,

I attached a screenshot. There is no drop down list, and it is not a required field either.
Thanks for the help.

Laura


Screen Shot 2017-12-20 at 08.55.27.png

Philip Durbin

unread,
Dec 20, 2017, 8:44:39 AM12/20/17
to dataverse...@googlegroups.com
Thanks, Laura. For comparison, I'm attaching a screenshot of the "Producer" field from https://demo.dataverse.org running Dataverse 4.8.4. The only difference I see is that on the demo site, there is a plus sign that seems to be missing from your version. Maybe "allowmultiples" has been changed to false for you? I'm not sure why this would cause the error you originally reported though...

Richard, can you see the JSON that's being sent across the wire? If so, can you please email it to sup...@dataverse.org? Thanks.

Laura, same question. :)

Thanks,

Phil

--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-community+unsub...@googlegroups.com.
To post to this group, send email to dataverse-community@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Screen Shot 2017-12-20 at 8.40.56 AM.png
Reply all
Reply to author
Forward
0 new messages