[
https://issues.jboss.org/browse/WFLY-3068?page=com.atlassian.jira.plugin....
]
Tomaz Cerar updated WFLY-3068:
------------------------------
Component/s: Class Loading
could fail more gracefully when wrong Java version used
-------------------------------------------------------
Key: WFLY-3068
URL:
https://issues.jboss.org/browse/WFLY-3068
Project: WildFly
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Class Loading, Server
Affects Versions: 8.0.0.Final
Environment: Java version < 7
Reporter: dpocock
Priority: Minor
If I try to start Wildfly with Java 6 (which is no longer support of course) it just
fails with a stack:
09:51:00,536 INFO [org.jboss.modules] (main) JBoss Modules version 1.3.0.Final
09:51:00,543 WARN [org.jboss.modules] (main) Failed to define class
org.jboss.as.jmx.PluggableMBeanServerBuilder in Module "org.jboss.as.jmx:main"
from local module loader @36b60b93 (finder: local module finder @69b1fbf4 ()):
java.lang.UnsupportedClassVersionError: org/jboss/as/jmx/PluggableMBeanServerBuilder :
Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_26]
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [rt.jar:1.6.0_26]
at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [rt.jar:1.6.0_26]
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345)
[jboss-modules.jar:1.3.0.Final]
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423)
[jboss-modules.jar:1.3.0.Final]
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261)
[jboss-modules.jar:1.3.0.Final]
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76)
[jboss-modules.jar:1.3.0.Final]
at org.jboss.modules.Module.loadModuleClass(Module.java:548)
[jboss-modules.jar:1.3.0.Final]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189)
[jboss-modules.jar:1.3.0.Final]
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443)
[jboss-modules.jar:1.3.0.Final]
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431)
[jboss-modules.jar:1.3.0.Final]
at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373)
[jboss-modules.jar:1.3.0.Final]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118)
[jboss-modules.jar:1.3.0.Final]
at javax.management.MBeanServerFactory.loadBuilderClass(MBeanServerFactory.java:423)
[rt.jar:1.6.0_26]
at
javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:465)
[rt.jar:1.6.0_26]
at
javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:511)
[rt.jar:1.6.0_26]
at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:298)
[rt.jar:1.6.0_26]
at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:213)
[rt.jar:1.6.0_26]
at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:174)
[rt.jar:1.6.0_26]
at
sun.management.ManagementFactory.createPlatformMBeanServer(ManagementFactory.java:302)
[rt.jar:1.6.0_26]
at
java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:504)
[rt.jar:1.6.0_26]
at org.jboss.modules.Main.main(Main.java:449) [jboss-modules.jar:1.3.0.Final]
Exception in thread "main" java.lang.UnsupportedClassVersionError:
org/jboss/as/jmx/PluggableMBeanServerBuilder : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76)
at org.jboss.modules.Module.loadModuleClass(Module.java:548)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118)
at javax.management.MBeanServerFactory.loadBuilderClass(MBeanServerFactory.java:423)
at
javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:465)
at
javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:511)
at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:298)
at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:213)
at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:174)
at
sun.management.ManagementFactory.createPlatformMBeanServer(ManagementFactory.java:302)
at
java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:504)
at org.jboss.modules.Main.main(Main.java:449)
It would be more friendly if it checked the Java version in the main() function and
stopped gracefully. The stack trace is not hard to understand but may not be obvious to
everybody.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira