java.lang.UnsupportedClassVersionError: com/mycompany/MyClass (Unsupported major.minor version 49.0)

Hibernate JIRA | Dan Bradley | 1 decade ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to poroszd . Or join the community to write better ones.
  1. 0

    The tools were working fine for me, then at one point when I went to use the session for my config, which was previously working. I get the following error that seems to suggest that the Tools don't like that my classes were compiled for Java 5. My compiler settings are set to use JDK 5.0, my app still builds and runs using HIbernate. I've done clean builds and remade my tools config. It's just the tools that complain, as if they are trying to use a different JDK? An internal error occurred during: "Fetching children of myConfig". java.lang.UnsupportedClassVersionError: com/mycompany/MyClass (Unsupported major.minor version 49.0) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:101) at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:76) at org.hibernate.mapping.SimpleValue.setTypeUsingReflection(SimpleValue.java:275) at org.hibernate.cfg.HbmBinder.bindSimpleId(HbmBinder.java:411) at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:344) at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:285) at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:156) at org.hibernate.cfg.Configuration.add(Configuration.java:378) at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:417) at org.hibernate.cfg.Configuration.addFile(Configuration.java:259) at org.hibernate.console.ConsoleConfiguration$1.execute(ConsoleConfiguration.java:144) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35) at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:123) at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:107) at org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter.getChildren(ConsoleConfigurationWorkbenchAdapter.java:19) at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:68) at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:192) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)

    Hibernate JIRA | 1 decade ago | Dan Bradley
    java.lang.UnsupportedClassVersionError: com/mycompany/MyClass (Unsupported major.minor version 49.0)
  2. 0

    The tools were working fine for me, then at one point when I went to use the session for my config, which was previously working. I get the following error that seems to suggest that the Tools don't like that my classes were compiled for Java 5. My compiler settings are set to use JDK 5.0, my app still builds and runs using HIbernate. I've done clean builds and remade my tools config. It's just the tools that complain, as if they are trying to use a different JDK? An internal error occurred during: "Fetching children of myConfig". java.lang.UnsupportedClassVersionError: com/mycompany/MyClass (Unsupported major.minor version 49.0) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:101) at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:76) at org.hibernate.mapping.SimpleValue.setTypeUsingReflection(SimpleValue.java:275) at org.hibernate.cfg.HbmBinder.bindSimpleId(HbmBinder.java:411) at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:344) at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:285) at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:156) at org.hibernate.cfg.Configuration.add(Configuration.java:378) at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:417) at org.hibernate.cfg.Configuration.addFile(Configuration.java:259) at org.hibernate.console.ConsoleConfiguration$1.execute(ConsoleConfiguration.java:144) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35) at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:123) at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:107) at org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter.getChildren(ConsoleConfigurationWorkbenchAdapter.java:19) at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:68) at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:192) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)

    Hibernate JIRA | 1 decade ago | Dan Bradley
    java.lang.UnsupportedClassVersionError: com/mycompany/MyClass (Unsupported major.minor version 49.0)
  3. 0
    samebug tip
    Update "latest" to Java 8 on DockerHub.
    via Google Groups by Marcus Haebler
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    You're using an older version of java with classes compiled for java7
    via GitHub by Athou
  6. 0

    SuiteRunner Forum - Unsupported major.minor version 48.0

    artima.com | 2 years ago
    java.lang.UnsupportedClassVersionError: si/marand/tools/client/MToolsClientTestSuite (Unsupported major.minor version 48.0)
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

    com/mycompany/MyClass (Unsupported major.minor version 49.0)

    at java.lang.ClassLoader.defineClass0()
  2. Java RT
    ClassLoader.loadClass
    1. java.lang.ClassLoader.defineClass0(Native Method)
    2. java.lang.ClassLoader.defineClass(Unknown Source)
    3. java.security.SecureClassLoader.defineClass(Unknown Source)
    4. java.net.URLClassLoader.defineClass(Unknown Source)
    5. java.net.URLClassLoader.access$100(Unknown Source)
    6. java.net.URLClassLoader$1.run(Unknown Source)
    7. java.security.AccessController.doPrivileged(Native Method)
    8. java.net.URLClassLoader.findClass(Unknown Source)
    9. java.lang.ClassLoader.loadClass(Unknown Source)
    10. java.lang.ClassLoader.loadClass(Unknown Source)
    10 frames
  3. Hibernate
    ReflectHelper.reflectedPropertyClass
    1. org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:101)
    2. org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:76)
    2 frames
  4. Hibernate
    Configuration.addFile
    1. org.hibernate.mapping.SimpleValue.setTypeUsingReflection(SimpleValue.java:275)
    2. org.hibernate.cfg.HbmBinder.bindSimpleId(HbmBinder.java:411)
    3. org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:344)
    4. org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:285)
    5. org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:156)
    6. org.hibernate.cfg.Configuration.add(Configuration.java:378)
    7. org.hibernate.cfg.Configuration.addInputStream(Configuration.java:417)
    8. org.hibernate.cfg.Configuration.addFile(Configuration.java:259)
    8 frames
  5. org.hibernate.console
    ConsoleConfiguration.build
    1. org.hibernate.console.ConsoleConfiguration$1.execute(ConsoleConfiguration.java:144)
    2. org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
    3. org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:123)
    4. org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:107)
    4 frames
  6. org.hibernate.eclipse
    BasicWorkbenchAdapter.fetchDeferredChildren
    1. org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter.getChildren(ConsoleConfigurationWorkbenchAdapter.java:19)
    2. org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:68)
    2 frames
  7. Workbench
    DeferredTreeContentManager$1.run
    1. org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:192)
    1 frame
  8. Eclipse Jobs
    Worker.run
    1. org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
    1 frame