Product Documentation

FairCom Java Stored Procedures

Previous Topic

Next Topic

GUI Execution Using FairCom DB SQL Explorer - Windows

To execute the Stored Procedures and Triggers samples using FairCom DB SQL Explorer on Microsoft Windows, follow the steps below.

  • The Java JDK is required for submitting stored procedures as this requires the Java compiler. The Java Runtime Engine (JRE) is required to execute stored procedures and triggers. In addition, the FairCom SQL stored procedure class is required for accessing the necessary Java classes, and should be a part of your CLASSPATH. For details see the note titled Java Requirements for Stored Procedures.
  • If the FairCom Database Engine is not already running on your machine, start the server as explained in Starting the FairCom Database Engine.

  1. Start FairCom DB SQL Explorer (use the Windows Start menu > FairCom > Tools > gui > c-treeSqlExplorer.exe (or by double-clicking c-treeSqlExplorer.exe in the <faircom>\tools\gui\ folder).
  2. Connect to FairCom DB SQL installed on your computer:

  3. Once you are connected (you will see a confirmation dialog) move to the "Scripts" tab and click the Load button from the tool bar:

  4. Move to the drivers\java.sql.storedprocs\tutorials directory and open SPTTutorial1.sql

  5. Click the Run button to execute the tutorial.

    Do not use the Single Step button for these tutorials, because stored procedures are not currently supported by the FairCom DB SQL Explorer single-step function.

  • To run the other tutorials, repeat these steps for the other tutorials in the drivers\java.sql.storedprocs\tutorials directory.

Note that tutorial #4 will print the following error messages several times: “Error : -20148 Error Description : Trigger Execution Failed”. This is expected, correct behavior, and indicates that the system is running correctly.

Troubleshooting

This section lists some of the errors that can occur when running these tutorials:

Creating procedure Define...
error(-20141): error in compiling the stored procedure

The most common cause of this error is the three Java-related “SETENV” lines in your FairCom ctsrvr.cfg file not being set correctly. Refer to the Java Requirements for Stored Procedures note.

error(-20160): Java SP/T Feature not supported

This can be caused by the path to ctreeSQLSP.jar being incorrect in the “SETENV CLASSPATH” line in your FairCom ctsrvr.cfg file. Refer to the Java Requirements for Stored Procedures note.

Error : -30031 Error Description : error in transmission of packet

The most common cause of this runtime error is the FairCom Database Engine is not running on your machine. The most likely cause is that the c-tree evaluation license times out after 3 hours and shuts down the server. The solution is to restart the server. See Starting the FairCom Database Engine.

TOCIndex