Error Messages

The error messages that SQLUnit will generate if there is a problem are listed below, along with possible corrective actions:

Table 1. SQLUnit Error Messages

Error MessageCorrective Action
  
Input Test File not specified, specify testfile or fileset. {usage}Neither the test file or a fileset (in the sqlunit Ant task) was specified to SQLUnit. This is a usage issue and the usage message that follows will indicate how to supply the XML file to SQLUnit
Test File {filename} not found. {usage}The test file specified could not be found by SQLUnit. Check to see if the test file exists as specified on your operating system
Input Test File specified twice, specify either file or filesetThe test file name was specified both in the testfile attribute as well as the fileset nested element. Use one or the other, not both
Cannot read Test File {filename}SQLUnit does not have sufficient permissions to read the specified test file. Fix the permissions on the file at the operating system level
Cannot build Connection (id={id}) because {reason}SQLUnit could not build the Connection object with the properties supplied. Verify that the properties for building the Connection are valid.
{resource} not found in specified ContextSQLUnit could not find the named class or resource in the specified Context. The Context could be the system classpath, the path specified by the jarfile-url attribute if that is specified, or the Naming Context if Connection is being looked up from a JNDI server.
Included file {filename} not foundThe include file specified in the include tag in either the setup or teardown tags could not be found. Check to see if the file exists at the specified location on your operating system.
System Error: Element {element} is nullThis is a system error and means that there is a problem with the code. Log a bug against the SQLUnit project with details on how to reproduce it.
System Error: Connection {id} is null or incorrectly specifiedThis is a system error and means that there is a problem with the code. Log a bug against the SQLUnit project with details on how to reproduce it.
Match Exception in class: {classname}, message: {exception_message}This error message may be encountered when using a User-defined matcher class in conjunction with the diff tag. A Matcher class always throws this type of exception if it did not get the inputs it expected or if it encounters an unexpected exception at runtime. The exception_message provides more information as to what the problem is. Usually, it can be fixed by passign arguments correctly to the Matcher class.
Cannot parse match pattern: {pattern}The values for the resultset-id, row-id and col-id attributes to the Match tag can either be specified as exact numbers, a comma-separated enumeration or a range. It can also be omitted altogether or be specified as a *, both of which imply not to match against the particular filter. The error message means that the pattern was incorrectly specified or could not be parsed for some reason. The pattern will need to be modified to conform to the rules described above.
Matcher class {className} not available in CLASSPATHSome simple matchers are supplied as part of the SQLUnit package. Matchers can also be written by users in their own package and be referenced from the SQLUnit tests provided the user-written Matcher exists in the user's CLASSPATH. The message indicates that it is not. Modify the CLASSPATH to include the user-defined Matcher class.
No match on variable at [rset,row,col]=[ {rset},{row},{col}] using class {matcher_class_name} expected: {expected_result} but got {actual_result}This is a variation of the standard message reported in case of test failures. This message is reported only by the Diff tag since that is the only tag which allows user-defined matching. In addition to the information reported by the test failure, it also reports the class name of the Matcher class currently being used. Corrective action is to fix the test.
Partial Match impossible at {position}: {reason}Partial match at the specified position could not be done because of the reason specified.
At {position}, could not convert {actual_value} to {java_class_name} for {SQL_Type_Name}({SQL_Type})The String value supplied in the param element could not be converted to the appropriate class dictated by the datatype mapping for that variable. You will most likely need to provide an override mapping specific to your database, or, if there is no suitable mapping, you/we could write a mapping class to handle this type.
At {position}, could not convert {java_class_name} returned from database to {SQL_Type_Name}({SQL_Type})The Object returned from the database is not of the same class that the class mapped to the SQL Type SQL_Type wraps. You will most likely need to provide an override mapping for your database, or, if there is no suitable mapping, you/we could write a mapping class to handle this type.
At {position}, datatype {SQL_Type_Name}({SQL_Type}) is not supportedThe specified datatype is one of the standard java.sql.Types but does not have an explicit mapping to a class. You will most likely need to provide an override mapping for your database based on your knowledge of the type, or, if there is no suitable mapping, you/we could write a mapping class to handle this type.
No type mapping found for (server.)type {{server_name}.{datatype}}SQLUnit could not find a mapping type for this specified type name. This is a non-standard (not in java.sql.Types) datatype, for which an override needs to be set in the mapping file for your database in usertypes.properties. If none of the existing mapping classes seem suitable, then you/we may have to write a new mapping class and map this to the datatype.
Parsing of {text} failed because {reason}SQLUnit could not find the variable defined in the symbol table. If you do not mind missing variables, then you should set partialOk to true.
The symbol could not be found in the symbol tableThe named symbol could not be found. Check your logic and verify that you have set the symbol before trying to use it.
Parameter {parameter_name} is not definedThe named parameter appears in the subdef as unspecified, but was not specified in the corresponding sub.
Statement {statement} ({number}) in include file {filename} returned result {error_code}A SQL Statement in the include file referenced by the file name failed with the given error code. The SQL statements are indexed starting at 1.
Variable {variable_name} is invalid, should be in the format \${variable_name}SQLUnit only accepts variables in the format ${variable_name}. Fix the name in the XML input file.
Value at outparam id={id} is a CURSOR, not a {supplied_type}The type specified in the param declaration for a stored procedure or SQL statement was incorrect. Fix the type in the XML input file.
Value at outparam id={id} is a STRUCT, not a {supplied_type}The type specified in the param declaration for a stored procedure or SQL statement was incorrect. Fix the type in the XML input file.
Value {supplied_value} for {variable} could not be converted to a numeric valueSQLUnit expects a numeric value at the location indicated, but parsing it from its String value to the appropriate numeric value resulted in a NumberFormatException.
Could not convert to digest because {reason}The reason will give more information as to why the digestion process failed. Large Objects such as BLOBs and CLOBs are digested and then compared with specified MD5 Checksums of files or the MD5 Checksum itself. If Java Object Support is enabled, and the large object represents a Serializable Java Object, or the datatype of the LOB is JAVA_OBJECT, then the object's toString() method will be called and the results returned.
Cannot invoke method {className}.{methodName}This will usually be encountered when using the methodinvoker or dynamicsql tags, which depend on the results of invoking a specified method in a specified class in the CLASSPATH. The error will identify where the problem is happening, and will also include the error stack trace within the exception. To get the stack trace, rerun the test with debug set to true, and fix the problem that is causing this error to appear.
Assertion {assert} is not supportedThe assertion provided in the assert attribute for this test element is not supported. Please check the documentation for a list of supported assertions.
Assertion {assert} failed ({reason}), expected {expected_result}, but got {actual_result}, {failure_message}The specified assertion failed.
Expected to complete in {expected-duration} ms +/- {percent-tolerance}%, but took {actual_duration}msThe test took either too little or too much time compared with the specified expected time. If the percent tolerance is provided for the test, then SQLUnit will check for specified time +/- the tolerance, else it will use a default tolerance of 10%. If it is taking too much time, it is possible that your new implementation is not using all the optimizations that your old implementation was taking advantage of. If it is taking too little time, it is possible that your stored procedure is using better optimizations or not doing everything it should. It could also be that your expected durations are now incorrect because of server-level tuning, or that the JVM is overloaded. There could be other causes for this discrepancy which are not covered here, which may be related to your site.
SQLUnit Tests failed, file {filename}, run: {total_tests_run}, failures: {number_of_failed_tests}, errors: {number_of_errors_encountered}This message is reported at the end of each SQLUnit test file if there was an error or failure running the tests in the file.
One or more SQLUnit Tests failed, see the {console|logfile} for detailsThis message is reported at the end of an SQLUnit run, spanning one or more test files, if there was a failure or an error in any one of the tests. The output will describe the exact nature of the failure(s).
{Type} error ({Exception_Class}): {message}The entire error message is returned, usually from the JVM. The exception class specifies the Exception class name. Log a bug against the SQLUnit project if the meaning is not clear enough, otherwise take the necessary action to fix the condition that is causing it. Turning on the debug attribute for the sqlunit ant task will also show the stack trace for reporting or for analysis.