Java DB

Apache Derby

Derby Tools and Utilities Guide

Derby Getting Started
Derby Reference Manual
Derby Developer's Guide
Derby Performance Tuning
Derby Server and Admin Guide
Derby Tools and Utilities
Derby Tools and Utilities
-Copyright
-License
-About this guide
-What are the Derby tools and utilities?
-Using ij
-ij properties reference
-ij commands and errors reference
-ij commands
-Absolute command
-After Last command
-Async command
-Autocommit command
-Before First command
-Close command
-Commit command
-Connect command
-Describe command
-Disconnect command
-Driver command
-Elapsedtime command
-Execute command
-Exit command
-First command
-Get Cursor command
-Get Scroll Insensitive Cursor command
-Help command
-Last command
-LocalizedDisplay command
-MaximumDisplayWidth command
-Next command
-Prepare command
-Previous command
-Protocol command
-Readonly command
-Relative command
-Remove command
-Rollback command
-Run command
-Set Connection command
-Show command
-Wait For command
-Syntax for comments in ij commands
-Syntax for identifiers in ij commands
-Syntax for strings in ij commands
-ij errors
-Using the bulk import and export procedures
-Storing jar files in a database
-sysinfo
-dblook
-SignatureChecker
-Trademarks

 

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.
 

javadb@jdbcurl.com