Build Failure on Linux - EnforcerRuleException
Re: Build Failure on Linux - EnforcerRuleException
@J.L.C. Thank you for having take the time to report, test and post logs
That helped a lot.
@Nadahar I writen to Travis about OpenJDK 8 and shared a link with them, so i'll wait for their answer, or act.

That helped a lot.
Code: Select all
Running net.pms.util.UMSUtilsTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.92 sec <<< FAILURE! - in net.pms.util.UMSUtilsTest
testPlayedDurationStr(net.pms.util.UMSUtilsTest) Time elapsed: 0.92 sec <<< ERROR!
java.lang.ExceptionInInitializerError
at net.pms.util.UMSUtilsTest.setUp(UMSUtilsTest.java:24)
Caused by: java.lang.NullPointerException
at net.pms.util.UMSUtilsTest.setUp(UMSUtilsTest.java:24
Code: Select all
PMS.get();
Last edited by Sami32 on Fri May 12, 2017 6:12 am, edited 1 time in total.
Re: Build Failure on Linux - EnforcerRuleException
@Sami32 It seems like there's no need to write to Travis, look at https://github.com/UniversalMediaServer ... c4e2be7887
What is strange, is that the OpenJDK8 build doesn't fail, so the problem must be something else: https://travis-ci.org/UniversalMediaSer ... tification
What is strange, is that the OpenJDK8 build doesn't fail, so the problem must be something else: https://travis-ci.org/UniversalMediaSer ... tification
Re: Build Failure on Linux - EnforcerRuleException
@Nadahar Cool
Don't try to be too smart
Sharing is not a "need", it's our shared responsability/duty, better if it's useful.
Except if you get why a NPE is throwed on this test:

Don't try to be too smart

Except if you get why a NPE is throwed on this test:
Code: Select all
PMS.get()
Re: Build Failure on Linux - EnforcerRuleException
This is getting stranger. I checked and found that I actually had a VM with Fedora 24, so I checked out latest master and built without problem:
@Sami32 I saw that it failed on PMS.get(), the problem is that what happens inside there is a LOT, so we need a proper trace to be any wiser. What PMS.get() does is to instantiate the PMS class itself, which is the "mother class" of UMS. It runs through a lot of initialization stuff, so there's no way to tell what goes wrong from that alone.
Code: Select all
Apache Maven 3.3.9 (NON-CANONICAL_2016-04-07T23:15:34Z_mockbuild; 2016-04-08T01:15:34+02:00)
Maven home: /usr/share/maven
Java version: 1.8.0_111, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-3.b16.fc24.x86_64/jre
Default locale: nb_NO, platform encoding: UTF-8
OS name: "linux", version: "4.8.7-200.fc24.x86_64", arch: "amd64", family: "unix"
Re: Build Failure on Linux - EnforcerRuleException
I updated my VM and did a new build, also without problems. I see that I have an older core, but I can't imagine that's the reason for the difference.
@J.L.C Maybe you should try to reinstall Java, it's very strange that I have no issue with such a similar build environment:
Code: Select all
Apache Maven 3.3.9 (NON-CANONICAL_2016-04-07T23:15:34Z_mockbuild; 2016-04-08T01:15:34+02:00)
Maven home: /usr/share/maven
Java version: 1.8.0_131, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-1.b12.fc24.x86_64/jre
Default locale: nb_NO, platform encoding: UTF-8
OS name: "linux", version: "4.8.7-200.fc24.x86_64", arch: "amd64", family: "unix"
Code: Select all
sudo dnf reinstall java-1.8.0-openjdk
Re: Build Failure on Linux - EnforcerRuleException
I reinstalled Java, but the build still failed.Nadahar wrote: @J.L.C Maybe you should try to reinstall Java, it's very strange that I have no issue with such a similar build environment:Code: Select all
sudo dnf reinstall java-1.8.0-openjdk
Log here:
https://pastebin.com/6YwftMk9
Since both of you can build fine, it must be something with my environment. Is there any other info I can provide that might help debug it?
Thanks for all your efforts!
Re: Build Failure on Linux - EnforcerRuleException
@J.L.C. In your case, a safer workaround, until this issue found a real solution, should be:
Do any of these builds work for you without workaround ?
If not, do building under Java 7 make any difference ?
Code: Select all
mvn -Dtest=\!UMSUtilsTest.setUp package
Code: Select all
git checkout dcbec3f && mvn package
git checkout a3aa8b7 && mvn package
git checkout f2c1099 && mvn package
git checkout 556f4eb && mvn package
git checkout 9372945 && mvn package
Re: Build Failure on Linux - EnforcerRuleException
There is something strange with the build environment. Since the error changed when Maven was upgraded to 3.5, I figured that maybe there was a new and yet unknown problem using that version. I installed Maven 3.5 on my VM and tried, but to no avail. It still builds perfectly fine for me:
Code: Select all
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T21:39:06+02:00)
Maven home: /usr/local/share/apache-maven-3.5.0
Java version: 1.8.0_131, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-1.b12.fc24.x86_64/jre
Default locale: nb_NO, platform encoding: UTF-8
OS name: "linux", version: "4.8.7-200.fc24.x86_64", arch: "amd64", family: "unix"
..
[INFO] Executing tasks
main:
[copy] Copying 1 file to /repos/UniversalMediaServer/target
[INFO] Executed tasks
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 28.559 s
[INFO] Finished at: 2017-05-15T04:07:18+02:00
[INFO] Final Memory: 95M/546M
[INFO] ------------------------------------------------------------------------
Re: Build Failure on Linux - EnforcerRuleException
@Nadahar I have an idea why that happen to him, but as you know i prefer wait for his answer first before saying anything. That's said, that should affect only some Linux OS, AFAIU.
I finally get an answer from Travis, and they will add the missing documentation about OpenJDK 8.
An example of Travis build by it's developper, as you already know:
https://github.com/joepvd/travis-experi ... ff8438e901
I finally get an answer from Travis, and they will add the missing documentation about OpenJDK 8.
An example of Travis build by it's developper, as you already know:
https://github.com/joepvd/travis-experi ... ff8438e901
Re: Build Failure on Linux - EnforcerRuleException
@Sami32 Whatever your suspicion is, I have a more or less identical VM set up running the same versions of Java and Maven - which doesn't have these problems, so whatever the problem is I don't think it's the Linux version itself.