Search code examples
javaxmljakarta-eexml-parsingvtd-xml

in java using vtd-xml throws java.lang.UnsupportedClassVersionError


I have an ear app with two EJB and one WEB (war) projects all using compiler compliance 1.5. In my web project I created a utility Class file that takes a byte array of an xml file and returns some string values using the vtd-xml library v2.10 and I instantiate an object of this class in a servlet. At the call of the constructor of the object (that takes a byte array) I get the error:

java.lang.UnsupportedClassVersionError: Bad version number in .class file

When I remove all vtd-xml related objects from the class I do not get this error. Any advice would be appreciated.

Regards


Solution

  • you can recompile using the build.bat file (included with vtd-xml.zip) to obtain a new vtd-xml.jar.