Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1215031

Summary: Errors when starting FSW 6.0.0.GA with Java 7 on system with Java 8
Product: [JBoss] JBoss Fuse Service Works 6 Reporter: Andrej Podhradsky <apodhrad>
Component: ConfigurationAssignee: Julian Coleman <jcoleman>
Status: CLOSED UPSTREAM QA Contact: Jiri Sedlacek <jsedlace>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.0 GACC: ganandan, ldimaggi, max.andersen, oskutka, soa-p-jira, tcunning
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-02-10 03:47:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Server log
none
Script run.sh none

Description Andrej Podhradsky 2015-04-24 07:29:00 UTC
Description of problem:
Errors when starting FSW 6.0.0.GA with Java 7 on system with Java 8.
By system with Java 8 I mean OS where default java is Java 8 (command java -version shows Java 8). Typical use case is with JBDS where we can set which java version should be used for running the server.

Currently, we are not able to run the server correctly from JBDS on system with Java 8, even if we set Java 7 in JBDS (issue JBDS-3345).

Version-Release number of selected component (if applicable):
6.0.0.GA with patch 4

How reproducible:
always

Steps to Reproduce:
1. Ensure that you have installed Java 7 and Java 8 on your system
2. Set default java as Java 8 (check using java -version)
3. Download the attache script (run.sh) and set correct path to Java 7 and to FSW instance (the same command is also used in JBDS)
4. Execute the script

Actual results:
Errors such as "Unsupported major.minor version 52.0"

Expected results:
no errors

Additional info:
https://issues.jboss.org/browse/JBDS-3345

Comment 1 Andrej Podhradsky 2015-04-24 07:29:49 UTC
Created attachment 1018319 [details]
Server log

Comment 2 Andrej Podhradsky 2015-04-24 07:30:27 UTC
Created attachment 1018320 [details]
Script run.sh

Comment 3 tcunning 2015-04-27 15:41:48 UTC
FSW doesn't support Java 8.  We should be setting the JVM to Java 7 in the runtime selected by JBDS, not trying to fix this at the system level.

Comment 4 Andrej Podhradsky 2015-04-28 07:13:04 UTC
>We should be setting the JVM to Java 7 in the runtime selected by JBDS, not trying to fix this at the system level.

Exactly! But this is not possible at the moment.

Comment 5 Len DiMaggio 2015-05-04 15:29:35 UTC
Andrej - is this the situation?

* At the shell level, configure Java8 as the default JRE
* Set JAVA_HOME to the Java8 directory path
* Invoke JBDS
* In JBDS configure (Perferences->Java->Installed JRE) Java 1.7 as the default JRE for new projects
* Create a new FSW server (in the servers view)
* Create a new Java project, deploy to the FSW server

Are these the exact steps?

Comment 6 Andrej Podhradsky 2015-05-04 15:32:06 UTC
It's not necessary to create and deploy the project. The errors occur during starting the server from JBDS.

Comment 7 Andrej Podhradsky 2015-05-04 15:34:17 UTC
Oh.. one more thing. When you create the server (in the servers view) you have to set the correct Java in the wizard.

Comment 8 Andrej Podhradsky 2015-05-05 14:28:54 UTC
Now, I found out that this issue can be reproduced if you install "SwitchYard + "RT-Gov Server+Client".

Note that if you install only "SwitchYard" + "RT-Gov Client-only" then you won't get any error.

Comment 9 Max Rydahl Andersen 2015-05-06 09:48:08 UTC
Andrej - please state why you say the server cannot set runtime to Java 7, on JBDS-3345 is screenshots of you using the UI to set the runtime to Java 7. So the support is definitely there.

The default JRE for projects has very little if anything to do with the version used for *running* the server. 

I really don't understand what the issue is since it obviously in the logs runs with Java 7.

Afaics this looks like a plain runtime side error especially since you can reproduce it with Java 7 in the cli.

Comment 10 Andrej Podhradsky 2015-05-06 10:18:14 UTC
Hi Max, it was my first thought that the problem is in JBDS and now it seems that the JBDS runs the server with correct JRE and the problem is in the server itself.

I didn't close JBDS jira issue since I want to be sure that the problem is really related to the server and not to the JBDS.

Comment 11 Len DiMaggio 2015-05-11 15:17:25 UTC
Big question on running this from the CLI and the run.sh that is attached to this bz:

It looks like what you are trying to do is to:

* Configure the default path to point to Java 1.8
* Explicitly invoke Java 1.7 to run the server

What is the point in doing this?  Thx!

Comment 12 Andrej Podhradsky 2015-05-11 19:07:06 UTC
The script run.sh is not a common use case, the script only serves as an example and it also demonstrates how to reproduce this issue.

The point is pretty simple, imagine that
1. I have a development environment with default Java 8 (and many projects may require this version)
2. Now, I want to develop one application for FSW (which is compatible with Java 6 and 7). Do I really need to change my environment? (due to this issue yes)

Very nice example is with JBDS:
1. Into JBDS you can add any JDK
2. Then, you can run for example SOA-P 5.2.0 with JDK 5
3. Or, you can run SOA-P 5.3.0 with JDK 6
4. All you have to do is just to change a runtime setting in JBDS, you don't need to change your system environment.
5. I expected that I can do this with FSW 6.0.0 but this is not possible

Comment 13 Max Rydahl Andersen 2015-05-11 19:24:06 UTC
Andrej - FSW has no way of knowing you are mingling up your java bin and environment.

In eclipse you actually "setup the env" by choosing the JDK/exec env. From OS you need to setup the environment and actually have it match.

What you do in the script is basically the same as choosing JDK 7 as runtime and then go add Java 8  libraires to the classpath. 

That will also fail. 

i'm going to close the JBIDE/JBDS jiras since this usecase is non-sensical.

Comment 14 JBoss JIRA Server 2015-05-11 19:25:03 UTC
Max Rydahl Andersen <manderse> updated the status of jira JBDS-3345 to Closed

Comment 15 Len DiMaggio 2015-05-11 19:30:17 UTC
Question to everyone:

It sounds like the goal here is to enable the user to run, from a shell, and not necessarily in JBDS, multiple different versions of Java, and select the version that will be used based on the server that they want to run.

Why wouldn't we just require the user, if he/she wants to run multiple servers, where each server will use a different version of Java to:

* Run each server in a different environment
* And - in each environment - define:
  -> PATH
  -> JAVA_HOME
  -> JBOSS_HOME

Comment 18 belong 2015-05-22 01:06:50 UTC
Docs task tracked by https://issues.jboss.org/browse/FUSEDOC-658.

Comment 19 Gomathi Anandan 2015-06-04 14:11:14 UTC
Closing issue per comments from Ben & Len. Docs issue created to track the updates to documentation.

Comment 20 Rick Wagner 2016-09-23 20:22:59 UTC
This BZ is now haunting us.  Here's the scenario:

- JBDS 9 *requires* Java 8.
- JBDS does provide Fuse tooling.  Fuse tooling is useful with FSW6.0.
- As Andrej described, when Java 8 is used to start JBDS, a FSW 6.0 server will not start in JBDS.  (Even if you give it a Runtime that uses Java 6 or 7).  

CEE finds JBDS very handy (the debugger is nice) so we need to find a way to use it with FSW6.0 for the duration of the lifecycle. 

A workaround:
- Maintain a JBDS 8 instance with FSW tooling
- Use scripts to set PATH, JAVA_HOME, etc. to Java 6
- Start JBDS 8 from the command line after setting the above.
- Set up Runtime in JBDS for the server, use Java7.

Comment 22 Red Hat Bugzilla 2025-02-10 03:47:33 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.