open-power / serverwiz

Apache License 2.0
4 stars 18 forks source link

Unable to run on Java 1.7.x or earlier. #10

Closed williamspatrick closed 8 years ago

williamspatrick commented 9 years ago

The latest versions seem to have been compiled with a pretty recent version of java and not compiled with backwards compatability. I'm unable to run this on either of the systems I have access to.

Most recent Linux distributions are still running 1.7 and most open source Java packages still support 1.7. (Ex. Gerrit and Jenkins both run on 1.7). I think we should compile serverwiz to target Java 1.7.

$ java -version java version "1.7.0_76" Java(TM) SE Runtime Environment (build 1.7.0_76-b13) Java HotSpot(TM) 64-Bit Server VM (build 24.76-b04, mixed mode)

Error seen: 09:51:47.349 - [INFO] - Exception in thread "main" java.lang.UnsupportedClassVersionError: com/ibm/ServerWizard2/ServerWizard2 : Unsupported major.minor version 52.0

brihh commented 9 years ago

i've seen this here as well

java -jar serverwiz2.jar

Exception in thread "main" java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=com/ibm/ServerWizard2/Launcher, offset=6 at java.lang.ClassLoader.defineClass(ClassLoader.java:384) at com.simontuffs.onejar.JarClassLoader.defineClass(JarClassLoader.java:803) at com.simontuffs.onejar.JarClassLoader.findClass(JarClassLoader.java:710) at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:942) at java.lang.ClassLoader.loadClass(ClassLoader.java:877) at com.simontuffs.onejar.JarClassLoader.loadClass(JarClassLoader.java:630) at java.lang.ClassLoader.loadClass(ClassLoader.java:847) at com.simontuffs.onejar.Boot.run(Boot.java:336) at com.simontuffs.onejar.Boot.main(Boot.java:168)

java -version

java version "1.7.0" Java(TM) SE Runtime Environment (build pxa6470_27sr2-20141026_01(SR2)) IBM J9 VM (build 2.7, JRE 1.7.0 Linux amd64-64 Compressed References 20141017_217728 (JIT enabled, AOT enabled) J9VM - R27_Java727_SR2_20141017_1632_B217728 JIT - tr.r13.java_20141003_74587.01 GC - R27_Java727_SR2_20141017_1632_B217728_CMPRSS J9CL - 20141017_217728) JCL - 20141004_01 based on Oracle 7u71-b13

also another external user had issues:

I did have some issues with java though... the default-jre doesn't seem to work for serverwiz2.jar so I ended up using the oracle-java8-installer instead. But that still has some issues with serverwiz2.jar so I ended up using serverwiz2_linux64.jar in order to get the GUI to finally launch. I think it would be nice if the serverwiz project had a README file with some guidance on choosing the jre and the .jar files for a hand full of distributions at some future point.

williamspatrick commented 9 years ago

When you compile a Java application you can usually choose the Java level to target. Eclipse has a way to do this. I assume that the latest packages simply used the default and thus targeted 1.8. We should target 1.7 at a minimum.

On May 21, 2015, at 9:28 AM, brian horton notifications@github.com wrote:

i've seen this here as well

java -jar serverwiz2.jar

Exception in thread "main" java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=com/ibm/ServerWizard2/Launcher, offset=6 at java.lang.ClassLoader.defineClass(ClassLoader.java:384) at com.simontuffs.onejar.JarClassLoader.defineClass(JarClassLoader.java:803) at com.simontuffs.onejar.JarClassLoader.findClass(JarClassLoader.java:710) at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:942) at java.lang.ClassLoader.loadClass(ClassLoader.java:877) at com.simontuffs.onejar.JarClassLoader.loadClass(JarClassLoader.java:630) at java.lang.ClassLoader.loadClass(ClassLoader.java:847) at com.simontuffs.onejar.Boot.run(Boot.java:336) at com.simontuffs.onejar.Boot.main(Boot.java:168)

java -version

java version "1.7.0" Java(TM) SE Runtime Environment (build pxa6470_27sr2-20141026_01(SR2)) IBM J9 VM (build 2.7, JRE 1.7.0 Linux amd64-64 Compressed References 20141017_217728 (JIT enabled, AOT enabled) J9VM - R27_Java727_SR2_20141017_1632_B217728 JIT - tr.r13.java_20141003_74587.01 GC - R27_Java727_SR2_20141017_1632_B217728_CMPRSS J9CL - 20141017_217728) JCL - 20141004_01 based on Oracle 7u71-b13

also another external user had issues:

I did have some issues with java though... the default-jre doesn't seem to work for serverwiz2.jar so I ended up using the oracle-java8-installer instead. But that still has some issues with serverwiz2.jar so I ended up using serverwiz2_linux64.jar in order to get the GUI to finally launch. I think it would be nice if the serverwiz project had a README file with some guidance on choosing the jre and the .jar files for a hand full of distributions at some future point.

— Reply to this email directly or view it on GitHub.

nkskjames commented 9 years ago

I am compiling with 1.7 as a minimum and it is still not working

williamspatrick commented 9 years ago

Seems to work now for me on Linux using Serverwiz release 1.10.

brihh commented 9 years ago

still fails for me on the pool machines, but works on my office RHEL6.6 machine....

.bri.

On Thu, May 28, 2015 at 12:55 PM, Patrick Williams <notifications@github.com

wrote:

Seems to work now for me on Linux using Serverwiz release 1.10.

— Reply to this email directly or view it on GitHub https://github.com/open-power/serverwiz/issues/10#issuecomment-106528649 .

nkskjames commented 9 years ago

which pool machine is it not working on? it works on gfw172.

brihh commented 9 years ago

yes works now, thx. not sure what happened when i ran it earlier.

On Fri, May 29, 2015 at 10:29 PM, nkskjames notifications@github.com wrote:

which pool machine is it not working on? it works on gfw172.

— Reply to this email directly or view it on GitHub https://github.com/open-power/serverwiz/issues/10#issuecomment-106981486 .