Discussion:
[Axis2] - java.lang.UnsupportedClassVersionError: Bad version number in .class file
robertlazarski .
2017-08-16 22:15:41 UTC
Permalink
Hello,
I would like to know if Apche Axis2 is actually copiable with java 1.5 as
stated in the installation guide
I’m getting the error in the subject using Java 1.5.0_22
best
That error typically means your compiled classes and runtime JVM are
different major versions - for example you compiled your axis2 classes with
1.8 and tried to run axis2 in a web container using 1.5.

You can use Java 1.8 with the latest version of axis2.

If you still have problems, paste your entire stack trace.

- R
Luis D. Arrieta
2017-08-16 23:38:58 UTC
Permalink
Hello Robert

Thnx for your help

Unfornatelly i’m force to use java 1.5 execution enviroment so 1.8 is not posible

Its there a way to make axis2 v 1.7.X compatible with JRE 1.5

Sorry but my english its not very good! I hope you understand me

Luis Daniel Arrieta
Advanced Services International, Inc.
Software developer & Junior Consultant
Office Phone Bogotá - Colombia: +57 1 805 1527
Office Phone Miami/Miramar: +1 954 889 1366 / 1476
Office Phone USA: 00 1954.889.13.66
mail: ***@adsintl.net<mailto:***@adsintl.net?subject=Contacto>
Website: http://advancedservicesintl.com/

[fb] Advanced Services International<https://www.facebook.com/advancedservicesinternational> [tw] @ADSINTL<https://twitter.com/ADSINTL> [in] Advanced Services International, In.<https://www.linkedin.com/company/advanced-services-international-inc> [gp] Advanced Services International, In.<https://plus.google.com/u/0/+AdvancedServicesInternationalIncMiramar/>

“Lo que sabemos es una gota de agua, lo que ignoramos es el océano” - Isaac Newton)

De: robertlazarski . [mailto:***@gmail.com]
Enviado el: miércoles, 16 de agosto de 2017 5:16 p. m.
Para: java-***@axis.apache.org
CC: axis-***@ws.apache.org
Asunto: Re: [Axis2] - java.lang.UnsupportedClassVersionError: Bad version number in .class file



On Wed, Aug 16, 2017 at 4:00 PM, Luis D. Arrieta <***@adsintl.net<mailto:***@adsintl.net>> wrote:
Hello,

I would like to know if Apche Axis2 is actually copiable with java 1.5 as stated in the installation guide

I’m getting the error in the subject using Java 1.5.0_22

best



That error typically means your compiled classes and runtime JVM are different major versions - for example you compiled your axis2 classes with 1.8 and tried to run axis2 in a web container using 1.5.

You can use Java 1.8 with the latest version of axis2.
If you still have problems, paste your entire stack trace.
- R
robertlazarski .
2017-08-16 23:45:38 UTC
Permalink
Post by Luis D. Arrieta
Hello Robert
Thnx for your help
Unfornatelly i’m force to use java 1.5 execution enviroment so 1.8 is not posible
Its there a way to make axis2 v 1.7.X compatible with JRE 1.5
Sorry but my english its not very good! I hope you understand me
According to the docs, 1.5 is supported by axis2.

https://axis.apache.org/axis2/java/core/docs/installationguide.html#requirements

Are you using the same compiler version to build your class files, as the
JDK version running your application container (tomcat) etc? You should use
the same major JDK version (1.5 should be ok) for compiling and running the
application.

Its hard to help further without a stack trace.
Luis D. Arrieta
2017-08-17 00:12:25 UTC
Permalink
Here is the ST


Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
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:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at bmsc.transferencias.MovilBilleteraServiceStub.populateAxisService(MovilBilleteraServiceStub.java:69)
at bmsc.transferencias.MovilBilleteraServiceStub.<init>(MovilBilleteraServiceStub.java:120)
at bmsc.transferencias.MovilBilleteraServiceStub.<init>(MovilBilleteraServiceStub.java:111)
at bmsc.transferencias.MovilBilleteraServiceStub.<init>(MovilBilleteraServiceStub.java:154)
at postilion.realtime.bmscmobilewallet.BMSCMobileWallet.callWalletWebservice(BMSCMobileWallet.java:197)
at postilion.realtime.bmscmobilewallet.BMSCMobileWallet.main(BMSCMobileWallet.java:397)


The stack trace points to this line in the src code
[cid:***@01D316C4.14A9F4C0]

major version number of the class file for org.apache.axis2.description.AxisService.class is set to Java SE 5.0 = 49 (0x31 hex),

[cid:***@01D316C4.30A64340]

This are the configurations for buildpath and run configurations in my eclipse project

[cid:***@01D316C4.30A64340]

[cid:***@01D316C4.30A64340]




Luis Daniel Arrieta
Advanced Services International, Inc.
Software developer & Junior Consultant
Office Phone Bogotá - Colombia: +57 1 805 1527
Office Phone Miami/Miramar: +1 954 889 1366 / 1476
Office Phone USA: 00 1954.889.13.66
mail: ***@adsintl.net<mailto:***@adsintl.net?subject=Contacto>
Website: http://advancedservicesintl.com/

[fb] Advanced Services International<https://www.facebook.com/advancedservicesinternational> [tw] @ADSINTL<https://twitter.com/ADSINTL> [in] Advanced Services International, In.<https://www.linkedin.com/company/advanced-services-international-inc> [gp] Advanced Services International, In.<https://plus.google.com/u/0/+AdvancedServicesInternationalIncMiramar/>

“Lo que sabemos es una gota de agua, lo que ignoramos es el océano” - Isaac Newton)

De: robertlazarski . [mailto:***@gmail.com]
Enviado el: miércoles, 16 de agosto de 2017 6:46 p. m.
Para: Luis D. Arrieta <***@adsintl.net>
CC: axis-***@ws.apache.org; java-***@axis.apache.org
Asunto: Re: [Axis2] - java.lang.UnsupportedClassVersionError: Bad version number in .class file



On Wed, Aug 16, 2017 at 5:38 PM, Luis D. Arrieta <***@adsintl.net<mailto:***@adsintl.net>> wrote:
Hello Robert

Thnx for your help

Unfornatelly i’m force to use java 1.5 execution enviroment so 1.8 is not posible

Its there a way to make axis2 v 1.7.X compatible with JRE 1.5

Sorry but my english its not very good! I hope you understand me


According to the docs, 1.5 is supported by axis2.

https://axis.apache.org/axis2/java/core/docs/installationguide.html#requirements
Are you using the same compiler version to build your class files, as the JDK version running your application container (tomcat) etc? You should use the same major JDK version (1.5 should be ok) for compiling and running the application.
Its hard to help further without a stack trace.
robertlazarski .
2017-08-17 15:25:48 UTC
Permalink
Post by Luis D. Arrieta
Here is the ST
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad
version number in .class file
at java.lang.ClassLoader.defineClass1(*Native Method*)
at java.lang.ClassLoader.defineClass(*ClassLoader.java:621*)
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:307*)
at sun.misc.Launcher$AppClassLoader.loadClass(*Launcher.java:268*)
at java.lang.ClassLoader.loadClass(*ClassLoader.java:252*)
at java.lang.ClassLoader.loadClassInternal(*ClassLoader.java:320*)
at bmsc.transferencias.MovilBilleteraServiceStub.populateAxisSe
rvice(*MovilBilleteraServiceStub.java:69*)
at bmsc.transferencias.MovilBilleteraServiceStub.<init>(
*MovilBilleteraServiceStub.java:120*)
at bmsc.transferencias.MovilBilleteraServiceStub.<init>(
*MovilBilleteraServiceStub.java:111*)
at bmsc.transferencias.MovilBilleteraServiceStub.<init>(
*MovilBilleteraServiceStub.java:154*)
at postilion.realtime.bmscmobilewallet.BMSCMobileWallet.callWal
letWebservice(*BMSCMobileWallet.java:197*)
at postilion.realtime.bmscmobilewallet.BMSCMobileWallet.main(
*BMSCMobileWallet.java:397*)
I would double check your Eclipse compiler level, even if it says you are
using 1.5. See here how that could go wrong:

https://stackoverflow.com/questions/2466828/java-lang-unsupportedclassversionerror-bad-version-number-in-class-file

I would also check the server logs to verify you are running 1.5, less
ideally you can run "java -version" in the OS shell.

If you are still stuck, I suggest you verify your axis2 is really the
version you think is running:

logger.debug("AxisServer class loaded from jar location: : " +
AxisServer.class.getClass().getProtectionDomain().getCodeSource().getLocation());
Post by Luis D. Arrieta
Here is the ST
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad
version number in .class file
at java.lang.ClassLoader.defineClass1(*Native Method*)
at java.lang.ClassLoader.defineClass(*ClassLoader.java:621*)
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:307*)
at sun.misc.Launcher$AppClassLoader.loadClass(*Launcher.java:268*)
at java.lang.ClassLoader.loadClass(*ClassLoader.java:252*)
at java.lang.ClassLoader.loadClassInternal(*ClassLoader.java:320*)
at bmsc.transferencias.MovilBilleteraServiceStub.
populateAxisService(*MovilBilleteraServiceStub.java:69*)
at bmsc.transferencias.MovilBilleteraServiceStub.<init>(
*MovilBilleteraServiceStub.java:120*)
at bmsc.transferencias.MovilBilleteraServiceStub.<init>(
*MovilBilleteraServiceStub.java:111*)
at bmsc.transferencias.MovilBilleteraServiceStub.<init>(
*MovilBilleteraServiceStub.java:154*)
at postilion.realtime.bmscmobilewallet.BMSCMobileWallet.
callWalletWebservice(*BMSCMobileWallet.java:197*)
at postilion.realtime.bmscmobilewallet.BMSCMobileWallet.main(
*BMSCMobileWallet.java:397*)
The stack trace points to this line in the src code
major version number of the class file for org.apache.axis2.description.AxisService.class
is set to Java SE 5.0 = 49 (0x31 hex),
This are the configurations for buildpath and run configurations in my eclipse project
*Luis Daniel Arrieta*
*Advanced Services International, Inc.*
*Software developer & Junior Consultant*
Office Phone Bogotá - Colombia: +57 1 805 1527
Office Phone Miami/Miramar: +1 954 889 1366 / 1476
Office Phone USA: 00 1954.889.13.66
Website: http://advancedservicesintl.com/
*[image: fb]* *Advanced Services International
Services International, In.
<https://www.linkedin.com/company/advanced-services-international-inc>*
*[image: gp]* *Advanced Services International, In.
<https://plus.google.com/u/0/+AdvancedServicesInternationalIncMiramar/>*
*“Lo que sabemos es una gota de agua, lo que ignoramos es el océano” -
Isaac Newton)*
*Enviado el:* miércoles, 16 de agosto de 2017 6:46 p. m.
*Asunto:* Re: [Axis2] - java.lang.UnsupportedClassVersionError: Bad
version number in .class file
Hello Robert
Thnx for your help
Unfornatelly i’m force to use java 1.5 execution enviroment so 1.8 is not posible
Its there a way to make axis2 v 1.7.X compatible with JRE 1.5
Sorry but my english its not very good! I hope you understand me
According to the docs, 1.5 is supported by axis2.
https://axis.apache.org/axis2/java/core/docs/installationguide.html#
requirements
Are you using the same compiler version to build your class files, as the
JDK version running your application container (tomcat) etc? You should use
the same major JDK version (1.5 should be ok) for compiling and running the
application.
Its hard to help further without a stack trace.
Loading...