You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Luis D. Arrieta" <lu...@adsintl.net> on 2017/08/16 22:00:19 UTC

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

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]<../../../../Desktop/logo%20para%20firma.jpg>
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: luis.arrieta@adsintl.net<mailto:luis.arrieta@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)

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.


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

Posted by "robertlazarski ." <ro...@gmail.com>.
On Wed, Aug 16, 2017 at 6:12 PM, Luis D. Arrieta <lu...@adsintl.net>
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.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());


On Wed, Aug 16, 2017 at 6:12 PM, Luis D. Arrieta <lu...@adsintl.net>
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: luis.arrieta@adsintl.net <luis.arrieta@adsintl.net?subject=Contacto>
>
> Website: http://advancedservicesintl.com/
>
>
>
> *[image: fb]*  *Advanced Services International
> <https://www.facebook.com/advancedservicesinternational>*     *[image:
> tw]* *@ADSINTL <https://twitter.com/ADSINTL>*       *[image: in]*  *Advanced
> 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)*
>
>
>
> *De:* robertlazarski . [mailto:robertlazarski@gmail.com]
> *Enviado el:* miércoles, 16 de agosto de 2017 6:46 p. m.
> *Para:* Luis D. Arrieta <lu...@adsintl.net>
> *CC:* axis-user@ws.apache.org; java-user@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 <lu...@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.
>

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

Posted by "Luis D. Arrieta" <lu...@adsintl.net>.
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:image009.png@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:image002.png@01D316C4.30A64340]

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

[cid:image004.jpg@01D316C4.30A64340]

[cid:image012.jpg@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: luis.arrieta@adsintl.net<mailto:luis.arrieta@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:robertlazarski@gmail.com]
Enviado el: miércoles, 16 de agosto de 2017 6:46 p. m.
Para: Luis D. Arrieta <lu...@adsintl.net>
CC: axis-user@ws.apache.org; java-user@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 <lu...@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.

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

Posted by "robertlazarski ." <ro...@gmail.com>.
On Wed, Aug 16, 2017 at 5:38 PM, Luis D. Arrieta <lu...@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.

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

Posted by "Luis D. Arrieta" <lu...@adsintl.net>.
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: luis.arrieta@adsintl.net<mailto:luis.arrieta@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:robertlazarski@gmail.com]
Enviado el: miércoles, 16 de agosto de 2017 5:16 p. m.
Para: java-user@axis.apache.org
CC: axis-user@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 <lu...@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

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

Posted by "robertlazarski ." <ro...@gmail.com>.
On Wed, Aug 16, 2017 at 4:00 PM, Luis D. Arrieta <lu...@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