With the help of a fellow programmer, we have figured out where the problem was.
In ImportSpringJob.java, protected void executeInternal(), we have the following line of code:
StudyBean studyBean = (StudyBean) studyDAO.findByName(studyName);
If we have more than one study/site with the same name, chances are that the above line of code will not return the one we want. I would suggest replacing findByName with findByOid.
To finish my explanation, this potentially incorrect studyBean is passed to processData(), who calls getImportCRFDataService(), where validateStudyMetadata() rightfully returns the message “your_current_study_is_not_the_same_as”.
Please let me know if you need more information about this bug.
From: Mihai Virtosu
Sent: Thursday, July 08, 2010 1:28 PM
To: [email protected]
; '[email protected]
Subject: Reoccuring problem with bulk data import
I know this is a long shot, but has anyone else experienced problems with bulk data imports telling you that your current study is not the one the data is for?
The error message in my emai is:
Your current study is not the same as the Study University of California Los Angeles, for which you are trying to enter data. Please log out of your current study and into the study for which the data is keyed.
This error message repeats for each import file. I have about 25 import files in each batch/study/site. I do not have any other import jobs for other sites running at the same time.
I assure you that I am selecting the correct study when I create the job and the StudyOID is the correct one for this study. This happens to only about 20% of the sites I am currently importing data for.
The most irritating aspect is that if I upload data manually through the Import Data page, the import succeeds.
I would appreciate if someone who has already run into this can provide any help.