# Using SignatureChecker

Before you run the `SignatureChecker` tool, make sure that your classpath contains the Derby jar files, including derbytools.jar.

On a Java SE platform, run the `SignatureChecker` tool as follows, where connection-url-to-database is the connection URL you would use in order to obtain a connection by calling DriverManager.getConnection():

    java org.apache.derby.tools.SignatureChecker connection-url-to-database

Alternatively, you can invoke the tool using derbyrun.jar. For example:

    java -jar derbyrun.jar SignatureChecker "jdbc:derby:myDB"

On a Java ME platform, run the `SignatureChecker` tool as follows, where database-name is the database name you would set by calling EmbeddedSimpleDataSource.setDatabaseName():

    java org.apache.derby.tools.SignatureChecker database-name

The tool examines every routine registered in the database and displays results like the following:

    Found a matching method for: "APP"."DOINSERT"( )
    Found a matching method for: "APP"."DOINSERTANDCOMMIT"( )
    Found a matching method for: "APP"."APPENDFOOANDBAR"( VARCHAR )
    Unresolvable routine: "APP"."IDONTEXIST"( VARCHAR , INTEGER ).
    Detailed reason: No method was found that matched the method call
     z.iDontExist(java.lang.String, int),
    tried all combinations of object and primitive types and any possible
     type conversion for any parameters the method call may have.
    The method might exist but it is not public and/or static, or the
     parameter types are not method invocation convertible.
    Found a matching method for: "APP"."RUNDDL"( VARCHAR )
    Unresolvable routine: "APP"."TABFUNCDOESNTEXIST"( VARCHAR , BIGINT ).
    Detailed reason: No method was found that matched the method call
     org.apache.derbyTesting.functionTests.tests.lang.TableFunctionTest.
     appendFooAndBar(java.lang.String, long),
    tried all combinations of object and primitive types and any possible
     type conversion for any parameters the method call may have.
    The method might exist but it is not public and/or static, or the
     parameter types are not method invocation convertible.

In the example above, the `SignatureChecker` tool found matches for all routines except for the functions app.iDontExist and app.tabFuncDoesntExist. If the tool cannot find a match for one of your functions or procedures, it tells you what signature it expected to find. You need to adjust your application in one of the following ways:

- Method: Change the signature of your Java method to match the signature suggested by the `SignatureChecker` tool.
- Routine: Drop and recreate your function or procedure so that its arguments and return type match your Java method according to the SQL Standard rules described in "Argument matching" in the Derby Reference Manual.

Parent topic: SignatureChecker