Failing build on 1.11.x at level of openmrs-web

I have backported a commit from trunk 4742 to this branch but it is failing the building step at the level of openmrs-web with the below error ive searched the wikis and couldn’t find similar behavior recorded will appreciate some help @dkayiwa

[INFO] Building openmrs-web 1.11.10-SNAPSHOT [INFO] ------------------------------------------------------------------------ Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/com/mysql/mysql-connector-mxj/5.0.11/mysql-connector-mxj-5.0.11.pom [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] OpenMRS … SUCCESS [ 10.705 s] [INFO] openmrs-tools … SUCCESS [ 5.487 s] [INFO] openmrs-test … SUCCESS [ 3.643 s] [INFO] openmrs-api … SUCCESS [03:29 min] [INFO] openmrs-web … FAILURE [ 3.086 s] [INFO] openmrs-webapp … SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 03:53 min [INFO] Finished at: 2018-03-21T16:45:45+00:00 [INFO] Final Memory: 51M/304M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project openmrs-web: Could not resolve dependencies for project org.openmrs.web:openmrs-web:jar:1.11.10-SNAPSHOT: Failed to collect dependencies at com.mysql:mysql-connector-mxj:jar:5.0.11: Failed to read artifact descriptor for com.mysql:mysql-connector-mxj:jar:5.0.11: Could not transfer artifact com.mysql:mysql-connector-mxj:pom:5.0.11 from/to openmrs-repo (http://mavenrepo.openmrs.org/nexus/content/repositories/public): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn -rf :openmrs-web

Did you verify that the build is ok locally before backporting the commit(s)?

No i didn’t verify but i worked on master switched to 1.9.x worked on it and everything went well so when i switched to 1.11.x just cherry-picked the commit and fortunately there were no conflict but it couldn’t compile afterward. could it have been the cause?

I would suggest to checkout the last commit just before the one you cherry picked on 1.11.x and see if that builds fine (presumably this one: aa93678). So

git checkout aa93678
mvn clean install

@mksd Checking out to that commit it still fails with the same error message.

[INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 06:40 min [INFO] Finished at: 2018-03-22T08:22:44+00:00 [INFO] Final Memory: 51M/326M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project openmrs-web: Could not resolve dependencies for project org.openmrs.web:openmrs-web:jar:1.11.10-SNAPSHOT: Failed to collect dependencies at com.mysql:mysql-connector-mxj:jar:5.0.11: Failed to read artifact descriptor for com.mysql:mysql-connector-mxj:jar:5.0.11: Could not transfer artifact com.mysql:mysql-connector-mxj:pom:5.0.11 from/to openmrs-repo (http://mavenrepo.openmrs.org/nexus/content/repositories/public): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn -rf :openmrs-web

If you can’t build the last commit on 1.11.x then the problem is on your end. Have you tried clearing your ~/.m2 and starting over?

I removed the ~/.m2 content and build while on the branch and commit aa93678 but it still failed at same point. I have again removed the ~/.m2 content and building the master to see if it will make any difference

I think this error message means you need to update your JDK.

Am using jdk-7 i was made to understand that java 8 can’t be used to compile any branch below 2.0 so i had to install java 7 which is what am using and it did build well for 1.9.x

I mean did we recently made updates to openmrs infrastructure and security certificates that may require you to have a later revision of the 1.7 JDK.

I’m not certain if this is that same issue, and don’t have time to do any further research, but I thought I would share.

Thanks alot i will look into that.

Thanks for the help @mksd and @darius i finally suceeded with the following approach. @darius I downloaded a different jdk 1.7 from oracle and it still couldn’t work but from your analysis i went in for jdk 1.8 which fortunately worked for me on branch 1.11.x and 1.10.x but innitially jdk 1.8 didn’t work when i started building branch 1.9.x so i had to build branch 1.9.x with jdk 1.7.