cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wilder Rodrigues <WRodrig...@schubergphilis.com>
Subject Re: [JENKINS] Java 8 job doesn't use Java 8 at all
Date Tue, 19 May 2015 09:20:17 GMT
Hi Rafael,

I know that.

The problem here is because we have a job called jdk18 which actually just build ACS using
jdk 1.7 and the error was completely unrelated to the constant type.

Concerning the PowerMock runner, it was not needed, so using the Mockito runner will get it
working fine.

I will have a look at your PR, because if we need the powermock runner in the future it will
be useful.

In order to get the jdk18 job doing what is expected, we need to install java openjdk 1.8
in the slave node. Unfortunately, I cannot do that because I do not have access to the slave.

Thanks for the email and PR. :)

Cheers,
Wilder



On 19 May 2015, at 10:13, Rafael Fonseca <rsafonseca@gmail.com<mailto:rsafonseca@gmail.com>>
wrote:

Hi :)

The jdk 7 is always installed because of the requires in the spec file.

BuildRequires: java-1.7.0-openjdk-devel
BuildRequires: ws-commons-util

The ws-commons-util is downloaded through maven and is not needed as a OS
package, in rhel 7 this depends on java 7, so it's always installed if
listed in the buildrequires.
The error you're seeing: Error: java.io.IOException: invalid constant type:
18
Is caused by a bug in a dependency of reflections, upgrade reflections from
0.9.8 to 0.9.9 to fix that ;)

Both these fixes are implemented in my pull request:

https://github.com/apache/cloudstack/pull/238

;)




On Tue, May 19, 2015 at 9:24 AM, Wilder Rodrigues <
WRodrigues@schubergphilis.com<mailto:WRodrigues@schubergphilis.com>> wrote:

Hi Pierre-Luc,

Is that possible to have Java OpenJDK 8 Devel installed and marked as the
alternative in the slave that builds the jdk18 job?

It’s also important to say that both java and java point to the correct
version.

I am now testing a fix I added for a couple of test suites that were using
PowerMock as Junit Runner. Instead, I’m simply using the mockito runner,
which works fine with java 8. I’m able to build, run tests and run the
management server with java-1.8.0-openjdk-1.8.0.45-30.b13.el7_1.x86_64

In order to test the build, I did:

== Using java-1.7.0-openjdk-1.7.0.79-2.5.5.1.el7_1.x86_64 ==
mvn -P developer,systemvm clean install

== Using java-1.8.0-openjdk-1.8.0.45-30.b13.el7_1.x86_64 ==
mvn -P developer,systemvm clean install
mvn -P developer,systemvm clean install -Dmaven.compiler.source=1.8
-Dmaven.compiler.target=1.8

It all works fine. I will create a PR once the test_vm_life_cycle.py is
done.

Thanks in advance.

Cheers,
Wilder

On 18 May 2015, at 13:45, Wilder Rodrigues <WRodrigues@schubergphilis.com<mailto:WRodrigues@schubergphilis.com>
<mailto:WRodrigues@schubergphilis.com>> wrote:

Hi guys,

After [a guy] reported that the Java 8 build was broken due to a failure
in an Unit Test, I traced the route cause and tried to build ACS using the
OpenJDK 1.8 in my test environment. Unfortunately, it did not work due to
an error when loading the Mockito classes :

Error: java.io.IOException: invalid constant type: 18

After that, I had a look at the Jenkins  build logs and found out the
following:


[build-master-jdk18] $
/home/jenkins/acs/tools/hudson.tasks.Maven_MavenInstallation/maven-3.1.1/bin/mvn
--version
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17
15:22:22+0000)
Maven home:
/home/jenkins/acs/tools/hudson.tasks.Maven_MavenInstallation/maven-3.1.1
Java version: 1.7.0_75, vendor: Oracle Corporation
Java home:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-123.20.1.el7.x86_64", arch: "amd64",
family: "unix"

Based on the output, we are not even using Java 8 for the build called
JDK18.

Before making any assumption and sending this email, I had a look at the
slave node with Daan and we found out that OpenJDK 1.8 is not even
installed:

javac - status is auto.
link currently points to
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/javac
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/javac -
priority 170075
slave appletviewer:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/appletviewer
slave apt:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/apt
slave extcheck:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/extcheck
slave idlj:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/idlj
slave jar:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/jar
slave jarsigner:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/jarsigner
slave javadoc:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/javadoc
slave javah:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/javah
slave javap:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/javap
slave jcmd:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/jcmd
slave jconsole:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/jconsole
slave jdb:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/jdb
slave jhat:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/jhat
slave jinfo:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/jinfo
slave jmap:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/jmap
slave jps:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/jps
slave jrunscript:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/jrunscript
slave jsadebugd:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/jsadebugd
slave jstack:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/jstack
slave jstat:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/jstat
slave jstatd:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/jstatd
slave native2ascii:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/native2ascii
slave policytool:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/policytool
slave rmic:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/rmic
slave schemagen:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/schemagen
slave serialver:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/serialver
slave wsgen:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/wsgen
slave wsimport:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/wsimport
slave xjc:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/xjc
slave java_sdk_exports:
/usr/lib/jvm-exports/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64
slave java_sdk:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64
slave appletviewer.1.gz:
/usr/share/man/man1/appletviewer-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
slave apt.1.gz:
/usr/share/man/man1/apt-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
slave extcheck.1.gz:
/usr/share/man/man1/extcheck-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
slave jar.1.gz:
/usr/share/man/man1/jar-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
slave jarsigner.1.gz:
/usr/share/man/man1/jarsigner-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
slave javac.1.gz:
/usr/share/man/man1/javac-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
slave javadoc.1.gz:
/usr/share/man/man1/javadoc-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
slave javah.1.gz:
/usr/share/man/man1/javah-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
slave javap.1.gz:
/usr/share/man/man1/javap-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
slave jconsole.1.gz:
/usr/share/man/man1/jconsole-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
slave jdb.1.gz:
/usr/share/man/man1/jdb-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
slave jhat.1.gz:
/usr/share/man/man1/jhat-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
slave jinfo.1.gz:
/usr/share/man/man1/jinfo-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
slave jmap.1.gz:
/usr/share/man/man1/jmap-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
slave jps.1.gz:
/usr/share/man/man1/jps-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
slave jrunscript.1.gz:
/usr/share/man/man1/jrunscript-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
slave jsadebugd.1.gz:
/usr/share/man/man1/jsadebugd-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
slave jstack.1.gz:
/usr/share/man/man1/jstack-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
slave jstat.1.gz:
/usr/share/man/man1/jstat-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
slave jstatd.1.gz:
/usr/share/man/man1/jstatd-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
slave native2ascii.1.gz:
/usr/share/man/man1/native2ascii-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
slave policytool.1.gz:
/usr/share/man/man1/policytool-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
slave rmic.1.gz:
/usr/share/man/man1/rmic-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
slave schemagen.1.gz:
/usr/share/man/man1/schemagen-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
slave serialver.1.gz:
/usr/share/man/man1/serialver-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
slave wsgen.1.gz:
/usr/share/man/man1/wsgen-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
slave wsimport.1.gz:
/usr/share/man/man1/wsimport-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
slave xjc.1.gz:
/usr/share/man/man1/xjc-java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64.1.gz
Current `best' version is
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/bin/javac.

I will push the fix I did on the test, which now uses a mock path instead
of /bin/bash.

Concerning the slave node, could someone have a look at that?

Cheers,
Wilder

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message