Bug 1324473 - engine-setup js-ant failed to execute with java 1.8
Summary: engine-setup js-ant failed to execute with java 1.8
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Python Library
Version: 3.6.1
Hardware: x86_64
OS: Linux
urgent
urgent
Target Milestone: ovirt-3.6.5
: 3.6.5.3
Assignee: Sandro Bonazzola
QA Contact: Petr Kubica
URL:
Whiteboard:
Depends On:
Blocks: 1303132 1315631
TreeView+ depends on / blocked
 
Reported: 2016-04-06 12:11 UTC by Yedidyah Bar David
Modified: 2019-04-28 13:24 UTC (History)
17 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1303132
Environment:
Last Closed: 2016-04-21 14:36:49 UTC
oVirt Team: Reports
Embargoed:
rule-engine: ovirt-3.6.z+
rule-engine: blocker+
sherold: planning_ack+
sbonazzo: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 53773 0 None None None 2016-04-06 12:11:43 UTC
oVirt gerrit 55606 0 None None None 2016-04-06 12:11:43 UTC
oVirt gerrit 55618 0 None None None 2016-04-06 12:11:43 UTC
oVirt gerrit 55619 0 None None None 2016-04-06 12:11:43 UTC
oVirt gerrit 55648 0 None None None 2016-04-06 12:11:43 UTC
oVirt gerrit 55649 0 None None None 2016-04-06 12:11:43 UTC
oVirt gerrit 55650 0 None None None 2016-04-06 12:11:43 UTC

Description Yedidyah Bar David 2016-04-06 12:11:43 UTC
+++ This bug was initially created as a clone of Bug #1303132 +++

Description of problem:
When running engine-setup with reports installation fails to execute stage 'Misc configuration': Command './js-ant' failed to execute

Version-Release number of selected component (if applicable):
3.6.2

How reproducible:
Start without DWH/Reports installed then install and run engine-setup

Actual results:
engine-setup fails and rolls back

Expected results:
engine-setup configures DWH/Reports correctly

Additional info:
It's possible I hit bug #1113094 first as I didn't have a DNS server configured which resolved this hostname. After I configured a DNS server to correctly resolve the hostname the engine-setup log now shows RunTimeException:

[java] Caused by: java.lang.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: java.util.ServiceConfigurationError: javax.xml.xpath.XPathFactory: jar:file:/usr/share/jasperreports-server/buildomatic/conf_source/ieCe/lib/saxonhe-9.2.1.5.jar!/META-INF/services/javax.xml.xpath.XPathFactory:2: Illegal configuration-file syntax

--- Additional comment from Yedidyah Bar David on 2016-01-31 17:07:13 IST ---

Seems like you have openjdk 1.8.

Can you try removing it and installing only 1.7?

--- Additional comment from Alexander Wigen on 2016-01-31 23:50:55 IST ---

Thanks Yedidyah that was the problem. Should I close this ticket or should there be a check added somewhere?

--- Additional comment from Yedidyah Bar David on 2016-02-01 09:34:21 IST ---

(In reply to Alexander Wigen from comment #2)
> Thanks Yedidyah that was the problem. Should I close this ticket or should
> there be a check added somewhere?

Changed the subject for now. Thanks for the report!

reports requires 1.7, but uses whatever the common code (in the engine) chooses.

In <= 3.5 both needed 1.7 so all was ok.

In 3.6 the engine can use either 1.7 or 1.8, and if 1.8 is your default, will pick it up, which fails reports.

See also bug 1211709 comment 5.

We should make the reports plugin in setup choose its own jre (1.7 for now).

--- Additional comment from Yedidyah Bar David on 2016-02-21 17:21:16 IST ---

Relevant test flows (both for reproduction, using a broken version, and for verification, using a fixed version - behavior will be different):

1. Should check on all of:
centos 6 and 7
rhel 6 and 7
We do not ship 3.6 reports builds for fedora currently

2. Simple:
Install a clean os
Install engine+dwh+reports
setup

3. Pre-install 1.8
Install clean OS
yum install java-1.8.0-openjdk
install engine+dwh+reports
setup

4. Upgrade
Install clean OS
install older engine+dwh+reports
setup
yum install java-1.8.0-openjdk
setup

See also bug 1140746. Current is in principle a duplicate.

--- Additional comment from Yedidyah Bar David on 2016-02-21 17:26:20 IST ---

Forgot to add: For broken versions, which do not prevent 1.8, you can also try changing the default using 'update-alternatives --config java'. If you choose 1.7, reports will still work. This is also a workaround.

--- Additional comment from Yedidyah Bar David on 2016-03-02 12:22:18 IST ---

Copying the specific error message from the setup log, so it's easier to find:

     [java] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'actionModelService' defined in file [/usr/share/jasperreports-server/buildomatic/conf_source/ieCe/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.ExceptionInInitializerError

--- Additional comment from Yedidyah Bar David on 2016-03-07 15:22:11 IST ---



--- Additional comment from Petr Kubica on 2016-04-01 11:54:15 IDT ---

Verified with rhevm-reports-setup-3.6.5-1.el6ev.noarch

rhevm-reports-setup conflicts with 1:java-1.8.0-openjdk-headless-1.8.0.77-2.b03.el6.x86_64

--- Additional comment from Yedidyah Bar David on 2016-04-03 12:30:30 IDT ---

Not sure how this was VERIFIED when bug 1322528 is one of the flows that should have been tested, see comment 4.

Moving back to assigned.

Next plans:

1. Revert the existing patches for current bug.

2. Copy existing engine's script java-home to java-home-reports which will be adapted for Reports needs. Currently this will mean to first try 1.7.0, then system default, and only allow 1.7.0.

--- Additional comment from Red Hat Bugzilla Rules Engine on 2016-04-03 12:30:37 IDT ---

Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

--- Additional comment from Yedidyah Bar David on 2016-04-03 16:38:01 IDT ---

55606 is reverting the previous patch to conflict with java 1.8.

--- Additional comment from Shirly Radco on 2016-04-04 10:10:47 IDT ---



--- Additional comment from Gil Klein on 2016-04-04 11:59:35 IDT ---

Setting this BZ as urgent severity due to the impact on the very basic upgrade flow (described in BZ #1322818)

--- Additional comment from Yedidyah Bar David on 2016-04-04 15:51:42 IDT ---

Note to QE and a summary:

Test flows are discussed in comment 4. In addition, since the fix is different now that when it was written (see below), you can also change the default java version (with update-alternatives --config java), restart services, and see how they are affected. You can (also) use 'ps' to find the pid of each of engine/dwh/reports java process and ls -l /proc/PID/exe to see which version it actually runs under.

We tried to fix this bug by conflicting with java 1.8. This turned out to not work well, see bug 1323461.

The current solution, instead, allow different java versions to be used for the engine and for reports. In 3.6, the engine can use either 1.7 or 1.8, and reports requires 1.7.

Comment 1 Yedidyah Bar David 2016-04-06 12:14:38 UTC
bug 1303132 required also a change in the engine.

Cloning to assist handling.

Comment 2 Red Hat Bugzilla Rules Engine 2016-04-06 12:48:50 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 3 Lukas Svaty 2016-04-14 08:50:25 UTC
VERIFIED on up to date RHEL-6.7

Used suggested scenarios of simple installation engine+dwh+reports, upgrade test and scenario with preinstalled java 1.8. In all cases installation of packages does not have conflict as it previously have in other bug and engine setup does not report any issues during installation.


Note You need to log in before you can comment on or make changes to this bug.