Index
  Home
  Manuals
  Samples

solidDB(TM) 6.0
Development Kit for Linux glibc2

Version 06.00.1046
22 September 2008
SDK Build 0038

JDBC Readme

CONTENTS

  • Product Information
  • System Requirements
  • Installation Instructions
  • Testing the Installation with the Sample Application
  • Troubleshooting with the Sample Application

PRODUCT INFORMATION

Solid JDBC Driver 2.0 is a Solid implementation of the JDBC 2.1 standard. It requires solidDB 6.0 server (or later) to operate.

The driver supports the JDBC 2.0 Optional Package (known before as Standard Extension), namely the features:

  • Connection pooling (class solid.jdbc.ConnectionPoolDataSource)
  • Connected RowSet (class solid.jdbc.rowset.SolidJDBCRowSet)
  • JDBC data sources:
    • solid.jdbc.DataSource (implements javax.sqlDataSource)
    • solid.jdbc.SolidConnectionPoolDataSource (implements javax.sql.ConnectionPoolDataSource)

Non-implemented features of the JDBC 2.0 Optional Package are:

  • JTA (Java Transaction API)
  • Cached RowSet

The driver is written in 100% pure Java.

SYSTEM REQUIREMENTS

  • solidDB 6.0 or later.
  • Java runtime or development environment supporting JDBC API specification release 2.0, such as JavaSoft's JDK 1.3 or above.

INSTALLATION INSTRUCTIONS

Before getting started with Solid JDBC Driver, we recommend obtaining some basic knowledge about the following:

  • The Java language
  • Java environment issues, how to build Java applications
  • Relational databases in general, solidDB in particular

Prerequisites

Before you install the JDBC Driver jar file, please check that the following prerequisites are met:

  • Make sure you have a working Java Virtual Machine environment. If not, you may locate one through the JavaSoft JDK 1.3 (or later) download pages. Install and test the environment according to its specific instructions.
  • Make sure you have a working solidDB installation.
  • Check from your Java environment documentation whether it can use compressed bytecode. The SolidDriver2.0.jar contains the Solid JDBC Driver classes in compressed bytecode format usable by most Java Virtual Machines.  However, some environments, such as Microsoft J++, require uncompressed bytecode.  If your environment belongs to this group, you must unzip the installation file using a tool that supports long filenames.

Installing Solid JDBC Driver on Unix

When you untar the Solid Development Kit, the SolidDriver2.0.jar file is automatically put into the appropriate directory.

  1. Set your CLASSPATH environment variable to include this .jar file. For example, in C shell, use the following command:
         set CLASSPATH = (soliddb-6.0/jdbc/SolidDriver2.0.jar . $CLASSPATH)

    If the jar file is not in /soliddb-6.0/jdbc, replace soliddb-6.0/jdbc in the above command with the correct directory name.

    If you are using a Unix shell other than C shell, modify this command to make it appropriate for your shell.
  2. Test your installation by running sample application sample1.java according to the instructions in "Testing the Installation with the Sample Application" in these Release Notes.

TESTING THE INSTALLATION WITH THE SAMPLE APPLICATION

Description of the Sample Application

The sample application for validating the installation, sample1.java, performs the following actions:

  1. Registers the Solid JDBC Driver using JDBC Driver Manager services.
  2. Asks for the connect string for a running solidDB process.
  3. Connects to solidDB using Solid JDBC Driver.
  4. Creates a statement for one query:
        SELECT TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE
               FROM TABLES
        for retrieving data from one of the solidDB system tables.
  5. Executes the query.
  6. Fetches all the rows of a result set.
  7. An empty BoostEngine 4.0 database dictionary contains approximately 76 rows.

Running the Sample Application

Your "path" environment variable should already contain the directories that hold the Java compiler and JRE.

  1. If you do not already have a solidDB process running, start it now and create an empty database.
  2. Change your working directory to soliddb-6.0/samples/jdbc, which is the directory that contains the sample Java program.
  3. Compile the Java sample program:
    javac sample1.java
  4. Start the sample application with the command:
    java sample1
  5. The application prompts for a valid connect string. The connect string format is:
        jdbc:solid://<hostname>:<port>/<username>/<password>
       For example,
        jdbc:solid://mymachine:1315/dba/dba
       attempts to connect to a solidDB server in host mymachine listening to TCP/IP protocol at port 1315.
  6. After entering the connect string, sample1 outputs the query results.

TROUBLESHOOTING THE SAMPLE APPLICATION

Possible problems in running sample1.java and solutions for them are listed below.

  1. The driver cannot be successfully registered
    1. The Java environment does not support java.sql classes.
    2. SolidDriver2.0.jar is not in the CLASSPATH definition.
  2. Unable to connect to solidDB process
    1. The version of the solidDB server should be 6.0 or later
    2. Older Solid versions may refuse connections from JDBC Driver.
    3. The connect string may be wrong or solidDB may not be listening to TCP/IP.
    4. Check that solidDB is running and verify the listening information. Use solidDB administration utilities, such as Solid Remote Control, to ensure that a connection can be established through the network. Note that the connect string format elsewhere than in JDBC is "tcp <host> <port>".
    5. Make sure that the port number that you used in the solid.ini file matches the port number used by the sample.

MORE INFORMATION ABOUT USING Solid JDBC DRIVER

Please refer to the solidDB Programmer Guide for detailed information about Solid JDBC Driver.

Copyright (c) 2008 Solid Information Technology, Ltd.  All Rights Reserved.