#4 How to use SQLUnit in Build?

closed
nobody
None
5
2006-08-18
2006-08-18
Deepali
No

After installing SQLUnit as per instructions provided,
added all the required jar files (sqlunit, junit
etc) in the lib folder under bulddirectory.

Then I have included following in the existing build
xml:
<!-- Setting up the taskdef for the sqlunit ant task -
->

<target name="def">

<taskdef name="sqlunit"
classname="net.sourceforge.sqlunit.ant.SqlunitTask">

<classpath>

<pathelement
location="${builddir}/lib/sqlunit.jar"/>

</classpath>

</taskdef>

</target>

And subsequent target to run sqlunit call.

However, I am getting following error when build is
run-
def:

BUILD FAILED

java.lang.UnsupportedClassVersionError:
net/sourceforge/sqlunit/ant/SqlunitTask (Unsupported
major.minor version 49.0)

Have I missed anything ? The version of all the
required jars seem to be correct.

Pl. help.

Discussion

  • Sujit Pal
    Sujit Pal
    2006-08-18

    Logged In: YES
    user_id=184803

    I have seen this happen when there is a mismatch between JDK
    version and the code. I think you may be running JDK 1.4.
    Since SQLUnit version 5.0, we have built it using JDK 1.5. I
    dont think I actually went in and used any JDK 1.5 features
    in the code, so it may still be possible to run it using JDK
    1.4 if you build it from source.

    Alternatively, I would suggest upgrading to JDK 1.5.

    -sujit

     
  • Sujit Pal
    Sujit Pal
    2006-08-18

    • status: open --> closed