Bug 1323127 - /usr/share/ovirt-engine/bin/java-home should take into account reports and then exclude java 1.8
Summary: /usr/share/ovirt-engine/bin/java-home should take into account reports and th...
Keywords:
Status: CLOSED DUPLICATE of bug 1303132
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Setup.Core
Version: 3.6.5
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ovirt-3.6.5
: ---
Assignee: Yedidyah Bar David
QA Contact: Pavel Stehlik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-01 10:43 UTC by Jiri Belka
Modified: 2017-05-11 09:30 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-04-10 09:11:58 UTC
oVirt Team: Integration
Embargoed:
sbonazzo: ovirt-3.6.z?
rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?


Attachments (Terms of Use)

Description Jiri Belka 2016-04-01 10:43:46 UTC
Description of problem:

reports do not work with java 1.8.x, unsupported by jaspersoft, but /usr/share/ovirt-engine/bin/java-home acceptes java 1.8.x blindly - if available on system and set as default by "alternatives". this causes engine-setup to fail if reports are installed as 1.8.x is not supported.

imo /usr/share/ovirt-engine/bin/java-home should take into account installed reports and then exclude 1.8.x or there should be separate check for reports setup to "always" use 1.7.x.

[ INFO  ] Exporting data out of Jasper
[ ERROR ] Failed to execute stage 'Misc configuration': Command './js-export.sh' failed to execute
[ INFO  ] Stage: Clean up
          Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20160331134938-z7s8ug.log
[ INFO  ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20160331140054-setup.conf'
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination
[ ERROR ] Execution of setup failed


# /usr/share/ovirt-engine/bin/java-home                                                                  
/usr/lib/jvm/jre
]# /usr/lib/jvm/jre/bin/java -version                                                                                                                                                           
openjdk version "1.8.0_77"
OpenJDK Runtime Environment (build 1.8.0_77-b03)
OpenJDK 64-Bit Server VM (build 25.77-b03, mixed mode)

update-alternatives --config java and selecting 1.7.x solves the issue as default java would be 1.7.x which satisfies both engine jboss and jasper reports.

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

How reproducible:
100%

Steps to Reproduce:
1. install openjdk 1.8.x and openjdk 1.7.x
2. ensure java -version returns 1.8.x
3. engine-setup with reports installed (i had reports for long time, so i'm not
   sure if this would be "visible" on clean env)

Actual results:
1.8.x java causes engine-setup failure as jasper reports do not support 1.8.x java

Expected results:
we should have a workaround for it when java -version returns 1.8.x as default system java and force 1.7.x for reports _EVEN_ during engine-setup (as engine-setup calls jasper scripts which would load default java).

Additional info:

Comment 1 Jiri Belka 2016-04-01 10:54:56 UTC
this is especially more serious in 4.0 where java-home script has hardcoded 1.8.x java only!

Comment 2 Jiri Belka 2016-04-01 11:08:11 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=1303132 IMO this is not real solution but manual workaround which would probably break on every other java implementation/version installation as i bet it would change default system java :)

Comment 3 Sandro Bonazzola 2016-04-07 13:27:21 UTC
Didi isn't this solved by your recent patches?

Comment 4 Yedidyah Bar David 2016-04-10 09:11:58 UTC
(In reply to Sandro Bonazzola from comment #3)
> Didi isn't this solved by your recent patches?

Should be.

*** This bug has been marked as a duplicate of bug 1303132 ***


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