Book Image

JDBC 4.0 and Oracle JDeveloper for J2EE Development

Book Image

JDBC 4.0 and Oracle JDeveloper for J2EE Development

Overview of this book

Table of Contents (20 chapters)
JDBC 4.0 and Oracle JDeveloper for J2EE Development
Credits
About the Author
About the Reviewer
Preface

JDBC Configuration Errors


You might get errors while configuring a JDBC connection. If you are using MySQL, and the connection URL is incorrect, or the MySQL database is not running, the following error message is generated:

Communications link failure

If you are using Oracle database, some possible connection configuration errors are listed below:

IO exception: The Network Adapter could not establish the connection
IO exception: Connection refused

The The Network Adapter could not establish the connection exception is caused by one or more of the following configuration errors:

  1. 1. The database host name, port number, or database instance name is wrong.

  2. 2. The database TNSListener has not been started. The TNSListener may be started with the lsnrctl utility.

C:\>lsnrctl start

The Connection refused exception is caused by one or more of the following configuration errors:

  1. 1. The database SID specified is incorrect.

  2. 2. The database instance has not been started. To start the database instance...