Bug 1302112

Summary: UnsupportedClassVersionError when applying the patch on jdk1.6
Product: [JBoss] JBoss Operations Network Reporter: Filip Brychta <fbrychta>
Component: ProductizationAssignee: Simeon Pinder <spinder>
Status: CLOSED CURRENTRELEASE QA Contact: Filip Brychta <fbrychta>
Severity: high Docs Contact:
Priority: unspecified    
Version: JON 3.3.5Keywords: Triaged
Target Milestone: CR01   
Target Release: JON 3.3.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-18 13:41:18 UTC Type: Task
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Filip Brychta 2016-01-26 19:54:13 UTC
Description of problem:
$Summary

Version-Release number of selected component (if applicable):
JON3.3.5.ER01

How reproducible:
3/3

Steps to Reproduce:
1. use open JDK 1.6.0_34
2. install JON 3.3.0
3. jon-server-3.3.0.GA-update-05/apply-updates.sh jon-server-3.3.0.GA

Actual results:
Testing for INSTALL_PATCH_DEST[JON Server|JON agent] directory.
	Successfully detected server [jon-server-3.3.0.GA] to be upgraded. Proceeding...
	Proceeding with application of patch '05' to jon-server-3.3.0.GA
	Checking [Server] file permissions...
	Verifying that all [Server] component(s) are stopped...
	Successfully verified that [Server] is already shut down.
	Successfully detected agent [/home/hudson/rhq-agent] to be upgraded. Proceeding...
	Proceeding with application of patch '05' to /home/hudson/rhq-agent
	Verifying that agent is stopped...
	Checking [Agent] file permissions...
	Verifying that [Agent] is stopped...
	Successfully verified that [Agent] is already shut down.
	Archiving legacy files. This list is cumulative and may attempt to remove files handled by earlier updates.
	Moving the following files to [jon-server-3.3.0.GA/.patched/3.3.0.GA-update-05_01-26-16_14-47-18/.old] for server and/or [jon-server-3.3.0.GA/.patched/3.3.0.GA-update-05_01-26-16_14-47-18/.old-agent] for agent:
	See 'jon-server-3.3.0.GA/.patched/3.3.0.GA-update-05_01-26-16_14-47-18/update.log' for more archive details.
	Applying the update contents.
	Running 'UpdateProperties' to repair invalid properties(if necessary/possible)... 
	/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.34.x86_64/jre/bin/java
	-cp jon-server-3.3.0.GA-update-05/.patched/.bin:jon-server-3.3.0.GA-update-05/jon-agent-updates/lib/* org.rhq.prod.UpdateProperties
	[jon-server-3.3.0.GA-update-05]
	[jon-server-3.3.0.GA]
	[jon-server-3.3.0.GA/.patched/3.3.0.GA-update-05_01-26-16_14-47-18/update.log]
	[.patched/3.3.0.GA-update-05_01-26-16_14-47-18]
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/rhq/prod/UpdateProperties : Unsupported major.minor version 51.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
	at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
Could not find the main class: org.rhq.prod.UpdateProperties. Program will exit.
	No CLI updates to apply. Continuing...

	You have successfully extracted patch contents into (JON server) and/or (JON agent) installation folder(s).
	You should do the following as is necessary: 
	 i)Closely follow the remainder of the instructions delivered with this update.
	 ii)restart your server(s)* 
	 iii)restart agents and request agent updates
	*NOTE: for HA environments you may need to repeat the steps here for each server before patch application is complete.

Expected results:
No errors

Additional info:
Not visible in CP04

Comment 1 Simeon Pinder 2016-01-28 05:09:23 UTC
This is fixed with commit: a98720dd698f9d777b to jon.git

Moving to ON_QA as available to test with the following brew build:
https://brewweb.devel.redhat.com//buildinfo?buildID=476409

Comment 2 Filip Brychta 2016-01-28 11:29:41 UTC
Verified on JON3.3.5.CR01