user743489
user743489

Reputation:

Axis: getting java.lang.RuntimeException: java.lang.UnsupportedClassVersionError: Bad version number in .class file

I've been getting this error several times, and preceeding it I'm also getting:

[JavaUtils] Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled

I've added activation.jar and mail.jar to my classpath but it's no good. Could anybody help me with this.

Thanks in advance,

PS: The issue occurs when invoking a certain web-services.

EDIT: After deploying the project and trying to acces ws for the first time I got the exception, then, invoking the ws again does not cause any exception throwing. This is getting very weird.

Upvotes: 1

Views: 2083

Answers (1)

bmargulies
bmargulies

Reputation: 100051

The error in your subject line happens when you try to use .class files compiled with the compiler for Java version X with the runtime for java version Y, X>Y. You need to use a more recent runtime, or you need to 'compile down' with the appropriate options to javac.

Upvotes: 1

Related Questions