java.lang.UnsupportedClassVersionError

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

Samebug tips2

Update "latest" to Java 8 on DockerHub.

You're using an older version of java with classes compiled for java7

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web4831

  • via Hibernate JIRA by Dan Bradley, 1 year ago
    com/mycompany/MyClass (Unsupported major.minor version 49.0)
  • via Hibernate JIRA by Dan Bradley, 1 year ago
    com/mycompany/MyClass (Unsupported major.minor version 49.0)
  • via Coderanch by Aditya Kanitkar, 9 months ago
    MyClass (Unsupported major.minor version 49.0)
  • Stack trace

    • 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)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Once, 1 month ago
    Unknown user
    Once, 3 months ago
    2 times, 3 months ago
    Unknown user
    Once, 6 months ago
    Once, 7 months ago
    66 more bugmates