And I met this error report. I think this error might be caused by the version conflict, because I used the âopenmrs-sdkâ to create a reference application(all settings of it are default) and changed the version of JDK when I wanted to test it.
So, does anyone know how to fix it? And what should I do to fix it?
Hi Herbert, actually, if I used the JDK 8, my test class will report an error, âcan not load ApplicationContextâ, that is why I changed to JDK 7. Besides, I never touched the liquibase file.
hmm am comfortable with running jdk 8 and above,you could add this and we start off with the debugging,i created a module using the sdk not so many days back and things work
add jdk 8 and dropm me your controller class here ,the Application context error comes from around the controller dropm me what you have in the controller here
How can I find out the exact ArtifactId of this module? Sorry, I donât know about it, because Iâm not the developer of this module, I just responsible for test.
on get method try adding @RequestMapping(method = RequestMethod.GET) and remove the existing request map and add @RequestMapping(value = "/project1/module/project1/project1.form") after the controller annotation,then try building
I think this module can be used when I install it and deploy on the OpenMRS-platform. I only can not run test class for this controller. So, I just want to make sure you understand my problem.
But when I run it, I got an error: âFailed to load ApplicationContextâ. @ibacher told me that I have two choices to fix this problem, one is to change the JDK version from 1.8 to 1.7, that is what I did yesterday, and I met a new problem that mentioned at the beginning of this talk; another is to change the <openmrsPlatformVersion>1.11.6</openmrsPlatformVersion> to 2.0.0. But the class of AdminList can not be found out because its parent class disappear after I did that.
So, I met the new problem when my test class extends the BaseModuleContextSensitiveTest
In a word, If I use the JDK 1.8, <openmrsPlatformVersion>1.11.6</openmrsPlatformVersion> and let my test class extends BaseModuleContextSensitiveTest, I will meet the error: âFailed to load ApplicationContextâ. If I change the JDK from 1.8 to 1.7, it will lead my test class can not read my test database and meet a new error
on a quick look through of your test,i see you autowire a controller,did you declare this as a bean,second are you pointing to the exact location of your data set?