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

"robertlazarski ." <[email protected]>
Newsgroups gmane.text.xml.axis.user
Message-ID <CABpPLBX8WyNs2=Y5GzhKhN+VfX+GFPNhGw0RSmvOpNGwZkYmsg@mail.gmail.com>
On Wed, Aug 16, 2017 at 6:12 PM, Luis D. Arrieta <[email protected]>
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 <[email protected]>
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: [email protected] <[email protected]?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:[email protected]]
> *Enviado el:* miércoles, 16 de agosto de 2017 6:46 p. m.
> *Para:* Luis D. Arrieta <[email protected]>
> *CC:* [email protected]; [email protected]
> *Asunto:* Re: [Axis2] - java.lang.UnsupportedClassVersionError: Bad
> version number in .class file
>
>
>
>
>
>
>
> On Wed, Aug 16, 2017 at 5:38 PM, Luis D. Arrieta <[email protected]>
> 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.
>
image009.png (image/png, 13 KB) - not displayed
image004.jpg (image/jpeg, 44.3 KB) - not displayed
image006.png (image/png, 640 B) - not displayed
image008.png (image/png, 696 B) - not displayed
image007.png (image/png, 653 B) - not displayed
image002.png (image/png, 3.6 KB) - not displayed
image012.jpg (image/jpeg, 18.3 KB) - not displayed
image005.png (image/png, 673 B) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.