[Axis2] - java.lang.UnsupportedClassVersionError: Bad version number in .class file

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Axis2] - java.lang.UnsupportedClassVersionError: Bad version number in .class file

Luis D. Arrieta

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

 

 

 

Luis Daniel Arrieta

logo para firma

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: [hidden email]

Website: http://advancedservicesintl.com/

 

fb  Advanced Services International     tw @ADSINTL       in  Advanced Services International, In.      gp Advanced Services International, In.

 

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

 

This email is intended for the exclusive use of the individual or entity named above and may constitue information that is privileged or confidential or otherwise protected from disclosure. Dissemination, distribution, forwarding or copying of this email by anyone other tan the indented recipient is prohibited. If you have received this email, please notify us immediately by email and completely delete or destroy any and all electronic. Thanks for your cooperation.

 

Este correo electrónico está destinado al uso exclusivo de la persona o entidad mencionada anteriormente y puede constituir information privilegiada o confidencial o protegida contra su divulgación. Se prohíbe la divulgación, distribución, renevío o copia de este email por cualquier persona que no sea el destinatario. Sí usted ha recibido este correo electrónico, por favor, notifique inmediatamente por correo electrónico y borre completamente o destruya todos los correos electrónicos recibidos incorrectamente. Gracias por su colaboración.

 

Reply | Threaded
Open this post in threaded view
|

Re: [Axis2] - java.lang.UnsupportedClassVersionError: Bad version number in .class file

robertlazarski .


On Wed, Aug 16, 2017 at 4:00 PM, Luis D. Arrieta <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

RE: [Axis2] - java.lang.UnsupportedClassVersionError: Bad version number in .class file

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

 

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: [hidden email]

Website: http://advancedservicesintl.com/

 

fb  Advanced Services International     tw @ADSINTL       in  Advanced Services International, In.      gp Advanced Services International, In.

 

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

 

De: robertlazarski . [mailto:[hidden email]]
Enviado el: miércoles, 16 de agosto de 2017 5:16 p. m.
Para: [hidden email]
CC: [hidden email]
Asunto: Re: [Axis2] - java.lang.UnsupportedClassVersionError: Bad version number in .class file

 

 

 

On Wed, Aug 16, 2017 at 4:00 PM, Luis D. Arrieta <[hidden email]> 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

Reply | Threaded
Open this post in threaded view
|

Re: [Axis2] - java.lang.UnsupportedClassVersionError: Bad version number in .class file

robertlazarski .


On Wed, Aug 16, 2017 at 5:38 PM, Luis D. Arrieta <[hidden email]> 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

 


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.
Reply | Threaded
Open this post in threaded view
|

RE: [Axis2] - java.lang.UnsupportedClassVersionError: Bad version number in .class file

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

mail: [hidden email]

Website: http://advancedservicesintl.com/

 

fb  Advanced Services International     tw @ADSINTL       in  Advanced Services International, In.      gp Advanced Services International, In.

 

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

 

De: robertlazarski . [mailto:[hidden email]]
Enviado el: miércoles, 16 de agosto de 2017 6:46 p. m.
Para: Luis D. Arrieta <[hidden email]>
CC: [hidden email]; [hidden email]
Asunto: Re: [Axis2] - java.lang.UnsupportedClassVersionError: Bad version number in .class file

 

 

 

On Wed, Aug 16, 2017 at 5:38 PM, Luis D. Arrieta <[hidden email]> 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

 

 

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.

Reply | Threaded
Open this post in threaded view
|

Re: [Axis2] - java.lang.UnsupportedClassVersionError: Bad version number in .class file

robertlazarski .


On Wed, Aug 16, 2017 at 6:12 PM, Luis D. Arrieta <[hidden email]> wrote:

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)

 


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());

On Wed, Aug 16, 2017 at 6:12 PM, Luis D. Arrieta <[hidden email]> wrote:

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

mail: [hidden email]

Website: http://advancedservicesintl.com/

 

fb  Advanced Services International     tw @ADSINTL       in  Advanced Services International, In.      gp Advanced Services International, In.

 

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

 

De: robertlazarski . [mailto:[hidden email]]
Enviado el: miércoles, 16 de agosto de 2017 6:46 p. m.
Para: Luis D. Arrieta <[hidden email]>
CC: [hidden email]; [hidden email]
Asunto: Re: [Axis2] - java.lang.UnsupportedClassVersionError: Bad version number in .class file

 

 

 

On Wed, Aug 16, 2017 at 5:38 PM, Luis D. Arrieta <[hidden email]> 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

 

 

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.