java.lang.UnsupportedClassVersionError: org/springframework/context/annotation/AnnotationConfigUtils (Unsupported major.minor version 49.0)

Spring JIRA | Udo Wagner | 9 years ago
  1. 0

    The method createFlowApplicationContext() in org.springframework.webflow.engine.builder.xml.XmlFlowBuilder tries to register AnnotationConfigProcessors, but Annotations are available from JDK1.5 onward. This results in the following Exception: java.lang.UnsupportedClassVersionError: org/springframework/context/annotation/AnnotationConfigUtils (Unsupported major.minor version 49.0) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:539) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1852) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:876) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1329) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1208) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at org.springframework.webflow.engine.builder.xml.XmlFlowBuilder.createFlowApplicationContext(XmlFlowBuilder.java:330) at org.springframework.webflow.engine.builder.xml.XmlFlowBuilder.initLocalFlowContext(XmlFlowBuilder.java:305) at org.springframework.webflow.engine.builder.xml.XmlFlowBuilder.doInit(XmlFlowBuilder.java:172) at org.springframework.webflow.engine.builder.support.AbstractFlowBuilder.init(AbstractFlowBuilder.java:54) at org.springframework.webflow.engine.builder.FlowAssembler.assembleFlow(FlowAssembler.java:90) at org.springframework.webflow.engine.builder.RefreshableFlowDefinitionHolder.assembleFlow(RefreshableFlowDefinitionHolder.java:127) at org.springframework.webflow.engine.builder.RefreshableFlowDefinitionHolder.getFlowDefinition(RefreshableFlowDefinitionHolder.java:88) at org.springframework.webflow.definition.registry.FlowDefinitionRegistryImpl.getFlowDefinition(FlowDefinitionRegistryImpl.java:61) at org.springframework.webflow.executor.FlowExecutorImpl.launchExecution(FlowExecutorImpl.java:110) at org.springframework.webflow.mvc.FlowController.handleRequestInternal(FlowController.java:80) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441) ...

    Spring JIRA | 9 years ago | Udo Wagner
    java.lang.UnsupportedClassVersionError: org/springframework/context/annotation/AnnotationConfigUtils (Unsupported major.minor version 49.0)
  2. 0

    The method createFlowApplicationContext() in org.springframework.webflow.engine.builder.xml.XmlFlowBuilder tries to register AnnotationConfigProcessors, but Annotations are available from JDK1.5 onward. This results in the following Exception: java.lang.UnsupportedClassVersionError: org/springframework/context/annotation/AnnotationConfigUtils (Unsupported major.minor version 49.0) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:539) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1852) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:876) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1329) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1208) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at org.springframework.webflow.engine.builder.xml.XmlFlowBuilder.createFlowApplicationContext(XmlFlowBuilder.java:330) at org.springframework.webflow.engine.builder.xml.XmlFlowBuilder.initLocalFlowContext(XmlFlowBuilder.java:305) at org.springframework.webflow.engine.builder.xml.XmlFlowBuilder.doInit(XmlFlowBuilder.java:172) at org.springframework.webflow.engine.builder.support.AbstractFlowBuilder.init(AbstractFlowBuilder.java:54) at org.springframework.webflow.engine.builder.FlowAssembler.assembleFlow(FlowAssembler.java:90) at org.springframework.webflow.engine.builder.RefreshableFlowDefinitionHolder.assembleFlow(RefreshableFlowDefinitionHolder.java:127) at org.springframework.webflow.engine.builder.RefreshableFlowDefinitionHolder.getFlowDefinition(RefreshableFlowDefinitionHolder.java:88) at org.springframework.webflow.definition.registry.FlowDefinitionRegistryImpl.getFlowDefinition(FlowDefinitionRegistryImpl.java:61) at org.springframework.webflow.executor.FlowExecutorImpl.launchExecution(FlowExecutorImpl.java:110) at org.springframework.webflow.mvc.FlowController.handleRequestInternal(FlowController.java:80) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441) ...

    Spring JIRA | 9 years ago | Udo Wagner
    java.lang.UnsupportedClassVersionError: org/springframework/context/annotation/AnnotationConfigUtils (Unsupported major.minor version 49.0)
  3. 0

    Unsupported class version error in java?

    Stack Overflow | 4 years ago | Anil M
    java.lang.UnsupportedClassVersionError: Bad version number in .class file
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How to use guava-18.0.jar in Liferay 5.2.3

    Stack Overflow | 2 years ago
    java.lang.UnsupportedClassVersionError: Bad version number in .class file
  6. 0

    Greetings, I have upgraded my Jenkins server at home using the latest 1.399 WAR with the intention to fix #JENKINS-8647 (growing log files due to an issue in JmDNS) but it seems that the compatibility with Java 5 is broken by jmdns-3.4.0.jar I get the following stack trace in my catalina.log at server initialization: {noformat}---------- 28 févr. 2011 22:59:49 hudson.WebAppMain$2 run GRAVE: Failed to initialize Hudson java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1853) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:875) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1330) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at hudson.DNSMultiCast.<init>(DNSMultiCast.java:26) at hudson.model.Hudson.<init>(Hudson.java:691) at hudson.model.Hudson.<init>(Hudson.java:605) at hudson.WebAppMain$2.run(WebAppMain.java:221) ----------{noformat} I will try to build JmDNS 3.4.0 with a Java 5 JDK and see if it fixes the issue. I believe this should be patched in the next release, I might not be the last person stuck with Java 5 :) Thanks & regards, --JB.L

    Jenkins JIRA | 6 years ago | Jean-Baptiste Lièvremont
    java.lang.UnsupportedClassVersionError: Bad version number in .class file

    11 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.UnsupportedClassVersionError

      org/springframework/context/annotation/AnnotationConfigUtils (Unsupported major.minor version 49.0)

      at java.lang.ClassLoader.defineClass0()
    2. Java RT
      SecureClassLoader.defineClass
      1. java.lang.ClassLoader.defineClass0(Native Method)
      2. java.lang.ClassLoader.defineClass(ClassLoader.java:539)
      3. java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
      3 frames
    3. Glassfish Core
      WebappClassLoader.loadClass
      1. org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1852)
      2. org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:876)
      3. org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1329)
      4. org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1208)
      4 frames
    4. Java RT
      ClassLoader.loadClassInternal
      1. java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
      1 frame
    5. Spring Web Flow
      XmlFlowBuilder.doInit
      1. org.springframework.webflow.engine.builder.xml.XmlFlowBuilder.createFlowApplicationContext(XmlFlowBuilder.java:330)
      2. org.springframework.webflow.engine.builder.xml.XmlFlowBuilder.initLocalFlowContext(XmlFlowBuilder.java:305)
      3. org.springframework.webflow.engine.builder.xml.XmlFlowBuilder.doInit(XmlFlowBuilder.java:172)
      3 frames
    6. Spring Web Flow
      FlowExecutorImpl.launchExecution
      1. org.springframework.webflow.engine.builder.support.AbstractFlowBuilder.init(AbstractFlowBuilder.java:54)
      2. org.springframework.webflow.engine.builder.FlowAssembler.assembleFlow(FlowAssembler.java:90)
      3. org.springframework.webflow.engine.builder.RefreshableFlowDefinitionHolder.assembleFlow(RefreshableFlowDefinitionHolder.java:127)
      4. org.springframework.webflow.engine.builder.RefreshableFlowDefinitionHolder.getFlowDefinition(RefreshableFlowDefinitionHolder.java:88)
      5. org.springframework.webflow.definition.registry.FlowDefinitionRegistryImpl.getFlowDefinition(FlowDefinitionRegistryImpl.java:61)
      6. org.springframework.webflow.executor.FlowExecutorImpl.launchExecution(FlowExecutorImpl.java:110)
      6 frames
    7. org.springframework.webflow
      FlowController.handleRequestInternal
      1. org.springframework.webflow.mvc.FlowController.handleRequestInternal(FlowController.java:80)
      1 frame
    8. Spring MVC
      FrameworkServlet.doPost
      1. org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
      2. org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
      3. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
      4. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
      5. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)
      6. org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441)
      6 frames