I am using UWC to covert my Mediawiki pages into text file which I will later import it to Confluence. My Mediwiki is installed on a linux box and I am using command line to export the pages. UWC is installed on the same machine on which Mediawiki is present. The Java version is JDK 1.5.0_10. When I run the command I am getting following error:
uwc$ /bin/bash run_cmdline.sh -e conf/exporter.mediawiki.properties
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.security.AccessController.doPrivileged(Native Method)
Can anyone help me out with this issue?
This error will be thrown when you try and load a class thats been compiled with an incompatible (usually future) version of Java.
From your question it looks like the class you're trying to run was compiled using Java 6 and you're using Java 5 to run it. Try upgrading your JVM to 6 and give it another go.
Thanks for your reply.
I have downloaded the uwc.zip from https://studio.plugins.atlassian.com/wiki/display/UWC/Universal+Wiki+Converter and its mentioned in the documentation that any version of Java 5 or higher should be fine for the installation and running UWC. So I was wondering why it didn't work when I have JDK 1.5.0_10 installed on my m/c.
I downloaded the converter, extracted the starting point class and confirmed its been compiled without java 5 support:
$ file ./com/atlassian/uwc/ui/UWCCommandLineInterface.class
./com/atlassian/uwc/ui/UWCCommandLineInterface.class: compiled Java class data, version 50.0 (Java 1.6)
I'm going to do some investigating as to why this is the case or if its just an oversight.
Yeah, that's my bad. I've updated the doc to say it requires Java 6 now. It's not so much that we couldn't support Java 5. It's just that at this point, I'm using Java 6, and when I build the UWC and one of the dependencies (confluence remote java wrapper), I happen to be using 6. So, if you need it to support 5, and you're willing to build from source, it _should_ be possible, but you have to not only build the UWC against 5, but also the CRJW library and update the lib directory with the resulting jar.
Good morning All, First of all, Happy early Thanksgiving from the NOVA AUG Leaders! I am anticipating no one will be looking at the group on Thanksgiving Day 😊 Today's topic will be different th...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs