@wyclif, I downloaded adminui master and some of the tests are failing. How do I proceed?
Is it unit tests or just regular build failures? I saw our CI builds fail too and got it fixed with some ensuing commits, you might want to first pull the latest changes and try again, if it still fails read on: Are you sing mac or windows? If yes, by default they come with case insensitive file systems, so you might set the git config property named ignorecase to false, i renamed some files by changing the case and builds were failing on the CI server too since github which i believe is hosted on a linux box had duplicate package/file names since it treated the path webapps/systemadmin to be different from webapps/systemAdmin . In fact if this turns out to be the problem, i suggest delete and re clone your repo, and i would suggest set the git property to be case sensitive so that you don’t run into similar issues in future.
@wyclif, the correct fix is to recommit the files with the correct casing, not require everyone to set a git property to a non-default value.
Here’s a stackoverflow about it, though I remember having to do something more complex:
@darius i already fixed the files in github to get rid of the duplicates implying that anyone cloning a fresh copy of the repo or someone that didn’t pull the duplicate files won’t have any issues but someone on OSX or windows that had cloned the code or pulled the updates with the duplicate files will need to either delete the duplicates locally or worst case re-clone the repo.
Hmm, okay, good.
(Though I vaguely recall that when I needed to change the casing on some file names I did it in a delete-and-recreate way so that anyone pulling would automatically get things fixed.)
I resolved the OpenMRS-core issues. They went away when I got a fresh clone of the source.
I can’t get openmrs-module-adminui to pass the accountvalidator tests. It is saying something about an IOException due to invalid constant 15.
I will also like to know what the exact name of the web services REST module so I can setup it for dev. I think I may need it if I work on certain tickets.
Can you please share the complete error message you get?
The REST web services module is
The full contents of the surefire error report is in http://pastebin.com/zkEUtChs.
Here is some of it.
------------------------------------------------------------------------------- Test set: org.openmrs.module.adminui.account.AdminUiAccountValidatorTest ------------------------------------------------------------------------------- Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 17.759 sec <<< FAILURE! initializationError(org.openmrs.module.adminui.account.AdminUiAccountValidatorTest) Time elapsed: 0.104 sec <<< ERROR! java.lang.IllegalStateException: Failed to transform class with name org.openmrs.util.OpenmrsUtil. Reason: java.io.IOException: invalid constant type: 15 at org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java:219) at org.powermock.core.classloader.MockClassLoader.loadModifiedClass(MockClassLoader.java:147)
Hi James, the links to the source code for the respective modules are on this wiki sprint page. What version of the jdk are you using? Should be 6
That must be it. I am using jdk 1.8. I will install 6 and see.
Will keep you posted.
It was difficult to get java 8 to work.
However I got java 7 to work for core, adminui and webservices.rest.
Openmrs core’s master, 1.11.x and 1.10.x branches can run on java 8, but you should be use java 6 because of the modules in the reference application, i have never tried running openmrs on java 7
1.11.x does not even work with java 7 because somewhere in the build the java version has been set to target java 8.
What version of openmrs-core works with java 7.
If I got such a version my dev env will be set up.
I use java 6 for 1.11.x, we recently update it to work with java 8, i have never tried 7.
This is the error I get when I use java 1.6 on openmrs-core 1.11.x
C:\users\james\git\openmrs-core [master +0 ~1 -0]> mvn clean install
Exception in thread “main” java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.min
or version 51.0
at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:401) at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42) at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:254) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239) at org.codehaus.plexus.classworlds.launcher.Launcher.getMainClass(Launcher.java:144) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:266) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
C:\users\james\git\openmrs-core [master +0 ~1 -0]>
Seems like a maven issue, what version of maven are you using? Mine is 3.2.5
To be more clear, you have to be careful about the java and maven versions, newer maven versions(i think anything newer than 3.2.5) require java 7 and above, the class version 51 mentioned in the error messages hints that the maven class was built for java 7, so you might want to downgrade maven to version 3.2.5
Sorry about the delay.
I have downgraded maven to 3.2.5. I am now giving it a try.
I will keep you posted.
I plan to use eclipse. I have set it up to use jdk 1.6 inside.
In the markers section there are several errors. It doesn’t stop it from building. Should I be worried.
Thanks for youur help.
I have managed to build adminui and webservices using mvn 3.2.5 and java 1.6.
I am still struggling with openmrs-core.
I will keep you posted.
I pulled down a fresh copy of openmrs-core 1.11.x and it is compiling at the moment with mvn 3.2.5 and java 1.6.