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.
- 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.
- 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:
- Registers the Solid JDBC Driver using JDBC Driver Manager
services.
- Asks for the connect string for a running solidDB process.
- Connects to solidDB using Solid JDBC Driver.
- 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.
- Executes the query.
- Fetches all the rows of a result set.
- 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.
- If you do not already have a solidDB process
running, start it now and create an empty database.
- Change your working directory to
soliddb-6.0/samples/jdbc, which is the
directory that contains the sample Java program.
- Compile the Java sample program:
javac sample1.java
- Start the sample application with the command:
java sample1
- 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.
- 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.
- The driver cannot be successfully registered
- The Java environment does not support java.sql classes.
- SolidDriver2.0.jar is not in the CLASSPATH definition.
- Unable to connect to solidDB process
- The version of the solidDB server should be 6.0 or later
- Older Solid versions may refuse connections from JDBC Driver.
- The connect string may be wrong or solidDB may not be listening to TCP/IP.
- 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>".
- 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.
|