Migration: Problem running dataset API

72 views
Skip to first unread message

ofu...@gmail.com

unread,
Mar 16, 2016, 8:20:33 AM3/16/16
to Dataverse Users Community

Hi,

I executed the following HTTP  request on the Dataverse 4.0 application to initiate dataset migration:

http://<hostname>/api/batch/migrate?path=/usr/local/......../dataverse/4.2.4/scripts/migration/ddi&key=a760d70c-2729-......f4c569a9


 but I received the following error message:

{"status":"ERROR","message":"Please provide a key query parameter (?key=XXX) or via the HTTP header X-Dataverse-key"}

 

What does that mean? Am I using wrong parameters?

 

a760d70c-2729-......f4c569a9 is the Admin API Token.

 

Ofuuzo

 

Philip Durbin

unread,
Mar 16, 2016, 8:45:43 AM3/16/16
to dataverse...@googlegroups.com
I just ran my BatchIT* integration test and my query parameters look like this:

/api/batch/migrate/?dv=dv8c09f494&key=57ade659-3f64-4c10-bdc7-77c861e11805&path=/Users/pdurbin/NetBeansProjects/dataverse/scripts/issues/907/batchImportDv&createDV=true

Do you have spaces in your "path" perhaps? If you're using curl you'll need to put the whole URL in quotes, even if you don't have spaces in your path.

I'm not really the expert on this batch migrate API endpoint ... I'd suggest emailing sup...@dataverse.org ... this issue seems to be related:

Migration: Complete scripts and documentation, then verify migration steps for use by others - https://github.com/IQSS/dataverse/issues/2462

http://guides.dataverse.org/en/4.2.4/installation/upgrading.html has this to say about migrating from DVN 3.x to Dataverse 4:

"Upgrading from DVN 3.x is actually a migration due to the many changes. Migration scripts have been checked into the source tree but as of this writing it is expected that people will require assistance running them. Please reach out per the Introduction section."

I hope this helps!

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-commu...@googlegroups.com.
To post to this group, send email to dataverse...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/26a52db0-2d19-4bc2-9bfd-c74df80e3bcf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

ofu...@gmail.com

unread,
Mar 16, 2016, 9:05:23 AM3/16/16
to Dataverse Users Community, philip...@harvard.edu
Hi,
I do not have spaces in my "path".  I tried curl by putting the whole URL in quotes. 

What does "dv8c09f494&" stands for in your query parameters?

I will  contact "Suport" people.

Ofuuzo


onsdag 16. mars 2016 13.45.43 UTC+1 skrev Philip Durbin følgende:
I just ran my BatchIT* integration test and my query parameters look like this:

/api/batch/migrate/?dv=dv8c09f494&key=57ade659-3f64-4c10-bdc7-77c861e11805&path=/Users/pdurbin/NetBeansProjects/dataverse/scripts/issues/907/batchImportDv&createDV=true

Do you have spaces in your "path" perhaps? If you're using curl you'll need to put the whole URL in quotes, even if you don't have spaces in your path.

I'm not really the expert on this batch migrate API endpoint ... I'd suggest emailing sup...@dataverse.org ... this issue seems to be related:

Migration: Complete scripts and documentation, then verify migration steps for use by others - https://github.com/IQSS/dataverse/issues/2462

http://guides.dataverse.org/en/4.2.4/installation/upgrading.html has this to say about migrating from DVN 3.x to Dataverse 4:

"Upgrading from DVN 3.x is actually a migration due to the many changes. Migration scripts have been checked into the source tree but as of this writing it is expected that people will require assistance running them. Please reach out per the Introduction section."

I hope this helps!

Phil
On Wed, Mar 16, 2016 at 8:20 AM, <ofu...@gmail.com> wrote:

Hi,

I executed the following HTTP  request on the Dataverse 4.0 application to initiate dataset migration:

http://<hostname>/api/batch/migrate?path=/usr/local/......../dataverse/4.2.4/scripts/migration/ddi&key=a760d70c-2729-......f4c569a9


 but I received the following error message:

{"status":"ERROR","message":"Please provide a key query parameter (?key=XXX) or via the HTTP header X-Dataverse-key"}

 

What does that mean? Am I using wrong parameters?

 

a760d70c-2729-......f4c569a9 is the Admin API Token.

 

Ofuuzo

 

--
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.

Philip Durbin

unread,
Mar 16, 2016, 9:13:15 AM3/16/16
to dataverse...@googlegroups.com
dv8c09f494 is a dataverse alias. It looks odd because I'm creating it randomly so that it's unique. Since it's used in an integration test, I don't really care what the alias is. Here's where I generate the alias:

https://github.com/IQSS/dataverse/blob/v4.2.4/src/test/java/edu/harvard/iq/dataverse/api/BatchImportIT.java#L77

To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-commu...@googlegroups.com.

--
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-commu...@googlegroups.com.

To post to this group, send email to dataverse...@googlegroups.com.

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

ofu...@gmail.com

unread,
Mar 17, 2016, 7:14:23 AM3/17/16
to Dataverse Users Community, philip...@harvard.edu
Hi,
I tried your suggestion, but I received the following message:

   {"status":"OK"}


I also tried also the suggestion from dataverse_support:

curl -X GET --header "X-Dataverse-key: <Dataverse Admin API Key>" "http://<hostname>/api/batch/migrate?path=<parent directory of DDI files>"

 and I received also   {"status":"OK"}.

I need some help.

Ofuuzo
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-community+unsub...@googlegroups.com.

--
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...@googlegroups.com.

ofu...@gmail.com

unread,
Mar 17, 2016, 9:06:49 AM3/17/16
to Dataverse Users Community, philip...@harvard.edu
This is what the log says:

-- validationLog2016-03-17_12:01:00.txt---

Import Exception processing file trolling/18-1.xml, msg:XMLStreamExceptioncom.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
 at [row,col {unknown-source}]: [1,0]
Import Exception processing file trolling/2.xml, msg:XMLStreamExceptioncom.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
 at [row,col {unknown-source}]: [1,0]
Import Exception processing file trolling/53-1.xml, msg:XMLStreamExceptioncom.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog

........

ofu...@gmail.com

unread,
Mar 17, 2016, 9:45:24 AM3/17/16
to Dataverse Users Community, philip...@harvard.edu
Everything is ok now. I deleted the ddi files and execute the script  again:

./versions_source_ "http://<DVN 3.6 HOSTNAME>/dvn/ddi" "<YOUR NAME SPACE>"

Philip Durbin

unread,
Mar 18, 2016, 7:49:36 AM3/18/16
to dataverse...@googlegroups.com
I'm glad you figured it out!

--
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-commu...@googlegroups.com.

To post to this group, send email to dataverse...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages