Project
IntelliJ IDEA
Priority
Normal
Type
Bug
Fix versions
No Fix versions
State
Fixed
Assignee
Dmitry Jemerov
Subsystem
No subsystem
Affected versions
No Affected versions
Fixed in build
108.65  
  • Created by   Igor Sereda
    5 years ago (16 Dec 2006 05:21)
  • Updated by   root
    2 years ago (17 Jan 2010 20:39)
  • Jira: IDEADEV-12742
    (history, comments)
 
IDEA-36039 Cache corrupts after every compile/run
0
Issue is visible to: All Users
  The issue is visible to the selected user group only
A quite large project that has been going on jdk 1.5 previously. Setting JDK to 1.6 and trying to run it. Each attempt results in "caches corrupt" message and full rebuild. Trying to run after the full rebuild - caches corrupt again, full rebuild again.

What have I tried and it did not help:
1. Cleared IDEA caches in ~/.IntelliJIDEA6/system
2. Run rebuild all manually
3. Run rebuild and kept IDEA window on the front - i.e. no syncs

The following exception has shown up during the process:

java.lang.UnsupportedClassVersionError: Bad version number in .class file
java.lang.UnsupportedClassVersionError: Bad version number in .class file
java.lang.RuntimeException: java.lang.UnsupportedClassVersionError: Bad version number in .class file
 at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:642)
 at com.intellij.compiler.impl.CompileDriver.access$400(CompileDriver.java:609)
 at com.intellij.compiler.impl.CompileDriver$5$1.run(CompileDriver.java:5)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:38)
 at com.intellij.compiler.impl.CompileDriver$5.run(CompileDriver.java:3)
Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
 at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
 at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:242)
 at com.intellij.uiDesigner.compiler.Utils.validateJComponentClass(Utils.java:138)
 at com.intellij.uiDesigner.lw.CompiledClassPropertiesProvider.getLwProperties(CompiledClassPropertiesProvider.java:49)
 at com.intellij.uiDesigner.lw.LwComponent.readProperties(LwComponent.java:219)
 at com.intellij.uiDesigner.lw.LwAtomicComponent.read(LwAtomicComponent.java:32)
 at com.intellij.uiDesigner.lw.LwContainer.readChildren(LwContainer.java:262)
 at com.intellij.uiDesigner.lw.LwContainer.read(LwContainer.java:367)
 at com.intellij.uiDesigner.lw.LwRootContainer.read(LwRootContainer.java:84)
 at com.intellij.uiDesigner.compiler.Utils.getRootContainer(Utils.java:72)
 at com.intellij.uiDesigner.make.Form2ByteCodeCompiler$2.run(Form2ByteCodeCompiler.java:3)
 at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:308)
 at com.intellij.uiDesigner.make.Form2ByteCodeCompiler.process(Form2ByteCodeCompiler.java:15)
 at com.intellij.compiler.impl.FileProcessingCompilerAdapter.process(FileProcessingCompilerAdapter.java:5)
 at com.intellij.compiler.impl.FixedTimestampCompilerAdapter.process(FixedTimestampCompilerAdapter.java:14)
 at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:59)
 at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:288)
 at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:578)
 at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:626)
 ... 4 more



Environment: Windows XP
Java 1.5.0_05 (IDEA)
Java 1.6.0 (Project)

Issue was resolved
Comments (2)
 
History
 
Linked Issues (?)
 
Maxim Mossienko
  Maxim Mossienko
16 Dec 2006 14:52
5 years ago
As workaround use JDK 6 to run IDEA
David
  David
03 May 2007 19:34
4 years ago
How to implement the workaround:

1. Install JDK 1.6 if you don't have it already
2. Delete IDEA_HOME\jre
3. Copy JDK_16_HOME\jre into IDEA_HOME\jre
4. Copy JDK_16_HOME\lib\tools.jar into IDEA_HOME\jre\lib
5. Add -Didea.no.jdk.check=true to IDEA_HOME\bin\idea.exe.vmoptions