Intermittent errors while compiling "Error: Bad class file format: 93"

I have recently begun to have problems compiling using IntelliJ IDEA 5.1.1. I have searched these forums and have only seen this problem referenced with long class names and/or when using annotations. We are using neither and I do not see this problem the very first time I compile, usually it is the second or third time I compile.

When I try to compile my code, I get the following type of errors:

Error: Bad class file format: 93
Error: Bad class file format: 78
Error: Bad class file format: 157

I get anywhere from about 1 to 6 of these errors and the numbers at the end do not appear to be consistent.

Usually, I do not see this error the first time I compile after restarting IntelliJ. I don't think I've been able to compile more that three times in a row without hitting this error though.

I can successfully compile the code (using ant) outside of IntelliJ, however that defeats the purpose of having a great IDE.

This problem is not limited to one codebase or one IntelliJ project; I get this error in multiple codebases and projects. As you can imagine, it is very frustrating and time consuming to keep restarting IntelliJ as I need to compile.

Thanks for any help and feedback!

13 comments
Comment actions Permalink

eek !

I have just invested a significant amount of time configuring a new project to work in IntelliJ (from Eclipse) and I am seeing the same error when I try and run a main method or a unit test on a new class ? Once the error has started I can do nothing but revert, rollback the class (and restart the IDE) and then all previous classes compile ?!?

What's going on here ?

Switching to Jikes seems to sort out the individual class but my project is Java 1.5 so Jikes is no good (i think, it's late.... )

Please help :(

Is it related to this <http://www.jetbrains.net/jira/browse/MPS-318> ?

Matt

0
Comment actions Permalink

Hello,
although I don't use annotations and my class names are not too long, I have this error message as you have.
intellij version is 5.1 and java version is 1.5.0_06. When java version was 1.4 ,I did'n have this problem..
even I reinstalled the java .but I keep getting errors..
What's the problem ? Does the problem occur because of jvm?
sule

0
Comment actions Permalink

Hi all,
The error occurs only when the JDK version of the module and system Java version doesnt coincide.
The problem was resolved when i changed the path in environment variable.
Check whether the JDK version of module/project is not the lower version to the one that is set in the EV.

Thanks,
Hema

0
Comment actions Permalink

hi,
I changed the path in environment variable but the problem wasn't resolved.
so much so that I checked all version.Now I have only once version which is 1.5.0_06.
Thanks for any help,
sule

0
Comment actions Permalink

hi all,

i had the same problem and i believe that the version 5 of the software is to be blamed. In my case the error appeared at the end of the compilation process. However, I tried to make the jar file from the source and it works perfect (even if the compilation process gave me that error).

So I uninstalled the version 5 and installed an older one (4.5) and with the same jdk and same source files the error disappeared.

0
Comment actions Permalink

hi all,
The problem was resolved when i reinstalled the intellij.
still intellij version is 5.1 and java version is 1.5.0_06.I don't know what's the problem.
Thanks for any help.
sule

0
Comment actions Permalink

I just upgraded from IntelliJ 5.0 to 5.1 and now I get:

Error: Bad class file format: 31
Error: Bad class file format: 16

I have tried rebuilding, changing java versions... nothing has worked.

0
Comment actions Permalink

1) Check that your JVM settings are set to the right jvm.

2) Check that IntelliJ is running with the latest VM on your pc or the one it (IJ) came with.

3) Try wiping your output folder where class files go (Idea will create a whole new one). Perhaps they have changed something in the format.

0
Comment actions Permalink

I've tried all the suggestions and am still having this problem. I've recently upgraded to the latest version of IntelliJ, but the problem still exists.

Also, now I get the errors the first time I compile upon a restart of IntelliJ. Before I didn't get the errors until after a few builds. This basically renders the compile and debug inside IntelliJ useless.

Other suggestions?

Thanks!

Message was edited by:
J Mason

0
Comment actions Permalink

I am getting the exact same thing.

0
Comment actions Permalink

I've been using IntelliJ 5.1.2 with the JDK 1.4.2_4_11. I've had the same error till I upgraded to JDK 1.4.2_2_4_12.

It worked then. So if you wanna use IDEA try to upgrade the JDK.

0
Comment actions Permalink

Hi,
I am also getting the same error
Error: Bad class file format.
When I tried to compile the project, it gets compiled & copies files to destination folder.
& also shows the above error.
But the other files like JSPs are not validated.
I have to do that manually.

  • When I have done same thing with idea 5.0 it was working fine. & there was no need to manually validate JSPs after compiling project.

Can U give its reason?
Is there any problem with version 5.1?

Any suggestions other than above which givem to others as I had tried those.

0
Comment actions Permalink

Check file types in intellij settings - I had a blank line under Java class files. When removed that then everything worked just fine.

0

Please sign in to leave a comment.