0

I have set up a build job in Bluemix using Delivery Pipeline. Unfortunately some of my unit tests which use Mockito failed due to IBM Java issue. The message I get from the build log:

Early IBM virtual machine are known to have issues with Mockito, please upgrade to an up-to-date version.

Java               : 1.8
JVM vendor name    : IBM Corporation
JVM vendor version : 2.8
JVM name           : IBM J9 VM
JVM version        : pxa6480ifx-20150313_01 (IV70681 IV70681)
JVM info           : JRE 1.8.0 Linux amd64-64 Compressed References 20150116_231420 (JIT enabled, AOT enabled)
J9VM - R28_Java8_GA_20150116_2030_B231420
JIT  - tr.r14.java_20150109_82886.02
GC   - R28_Java8_GA_20150116_2030_B231420_CMPRSS
J9CL - 20150116_231420
OS name            : Linux
OS version         : 4.4.0-77-generic

The script used to run the job is:

# enable Java 8
export JAVA_HOME=$JAVA8_HOME
mvn install

At my local environment I use IBM Java 8 SR4 FP5 for running unit test with success.

Is there a way to use different version of IBM Java 8 for Bluemix DevOps? In my case I need to upgrade it.

Veliko
  • 1

3 Answers3

1

There is support for changing which Java version is used, but I don't know if the version you are looking for is available or not. For more info, see:

https://console.bluemix.net/docs/runtimes/liberty/customizingJRE.html

McQ Wilson
  • 131
  • 3
  • The document you provided shows a way how to configure the Java version used for running an application. For building an app, Delivery Pipeline has its own documentation [here](https://console.bluemix.net/docs/services/DeliveryPipeline/deploy_var.html#deliverypipeline_environment). Unfortunately Delivery Pipeline doesn't provide the same set of available Java versions. So I end up with building my app with one kind of IBM Java and run it with different one. – Veliko Jun 20 '17 at 13:56
1

The version of java included in the pipeline will increase to 8.0-4.6 some time in the next 2 weeks. Until then, I'd try https://stackoverflow.com/a/44654434/713646

EDIT: the change has been deployed and should be available.

Paul Webster
  • 10,614
  • 1
  • 25
  • 32
0

A kind-of non-answer here: you shouldn't need to "switch" anything here.

Notice that line:

J9VM - R28_Java8_GA_20150116_2030_B231420

This version of IBM Java is seriously outdated.

Nobody should be running any workload on outdated versions of software.

So, the real answer here: turn to Bluemix support and politely tell them to fix their product.

Meaning: it is not the responsibility of the user of such a "platform a service" to workaround outdated software versions. It is the responsibility of the platform maintainer to do that.

In other words: of course, it might be easier for you to find a workaround for this problem; but you shouldn't have to. Make the provider fulfill its duties; instead of allowing him to go on with such behavior.

GhostCat
  • 137,827
  • 25
  • 176
  • 248