Unsupported major.minor version ERROR

Hi, some users are informing they have problems with my last update, they are getting this error:

Unsupported major.minor version 51.0 [Plugin: Magicento]: com/magicento/MagicentoProjectComponent : Unsupported major.minor version 51.0 [Plugin: Magicento]
com.intellij.diagnostic.PluginException: com/magicento/MagicentoProjectComponent : Unsupported major.minor version 51.0 [Plugin: Magicento]
     at com.intellij.ide.plugins.cl.PluginClassLoader.b(PluginClassLoader.java:108)
     at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:63)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
     at java.lang.Class.forName0(Native Method)
     at java.lang.Class.forName(Class.java:249)
     at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:445)
     at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:435)
     at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.access$000(ComponentManagerImpl.java:421)
     at com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:102)
     at com.intellij.openapi.components.impl.ComponentManagerImpl.initComponents(ComponentManagerImpl.java:346)
     at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:86)
     at com.intellij.openapi.project.impl.ProjectImpl.init(ProjectImpl.java:307)
     at com.intellij.openapi.project.impl.ProjectManagerImpl.a(ProjectManagerImpl.java:282)
     at com.intellij.openapi.project.impl.ProjectManagerImpl.access$400(ProjectManagerImpl.java:82)
     at com.intellij.openapi.project.impl.ProjectManagerImpl$10.compute(ProjectManagerImpl.java:562)
     at com.intellij.openapi.project.impl.ProjectManagerImpl$10.compute(ProjectManagerImpl.java:558)
     at com.intellij.openapi.progress.impl.ProgressManagerImpl$4.run(ProgressManagerImpl.java:269)
     at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:495)
     at com.intellij.openapi.progress.impl.ProgressManagerImpl$6.run(ProgressManagerImpl.java:304)
     at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:185)
     at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:226)
     at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:175)
     at com.intellij.openapi.application.impl.ApplicationImpl$9$1.run(ApplicationImpl.java:676)
     at com.intellij.openapi.application.impl.ApplicationImpl$7.run(ApplicationImpl.java:449)
     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
     at java.lang.Thread.run(Thread.java:680)
     at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:152)
Caused by: java.lang.UnsupportedClassVersionError: com/magicento/MagicentoProjectComponent : 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 java.lang.ClassLoader.defineClass(ClassLoader.java:465)
     at com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java:150)
     at com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:146)
     at com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:122)
     at com.intellij.ide.plugins.cl.PluginClassLoader.b(PluginClassLoader.java:102)


The strange part is I cannot reproduce it, and it doesn't happen to all users, I've tested on Windows PHPStorm 6 and he new EAP, and also on RedHat PHPStorm v5 and it works fine.
Could somebody help me to understand what this error means and how to solve it?

Could be related to this in my plugin.xml?

<idea-version since-build="117.105"/>         // prior was 111.296
<depends>com.intellij.modules.lang</depends>
<depends>com.jetbrains.php</depends>



Thanks !
4 comments

Hi Enrique,

Looks like you compile by java7 but run under java6

Denis

0

Yes I used JDK7 :(
Should I use JDK 6? is not unsafe?

0

Well, you shoudn't try to run classes by a jre which version is lower than version of the jdk used to compile the classes. I.e. you can compile and run by the same version or compile by old version and run by a new version or compile by a new version with target *.class level set to old jdk.

Denis

0

The Mac version of IntelliJ IDEA runs under JDK 6. Therefore, all plugins must be compiled with target Java version 6.

0

Please sign in to leave a comment.