Advertisement

05.07.2008 at 11:06AM PDT, ID: 23383702 | Points: 500
[x]
Attachment Details

Urgent

Tags: IBM, Webphere Studio, 6.0.1, WSAD data prospective error.
I am trying to create a database connection using WSAD 6.0.1 and Db2 9.0 Express using
Database Explorer feature. I am getting following Error

Connection to TEST failed IWASS0126E problems encountered while trying to establish connection :Reason Unknown

Steps
Open database prospective
Right click in Database Explorer
New Connection : Choose database manager and JDBC driver click next
JDBC DRIVER :  IBM DB2 Universal
database :TEST
Host : Localhost
port Number : 50000
JDBC driver class: com.ibm.db2.jcc.DB2Driver
Class Location :C:\Program Files\IBM\SQLLIB\java\db2jcc.jar;C:\Program Files\IBM\SQLLIB\java\db2jcc_license_cisuz.jar
Connection URL :jdbc:db2://localhost:50000/SAL301R
User ID: 32001
Password : password


Note When I use a java program to connect to Test Database it works :

/*
 * Created on May 6, 2008
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package itso.bank.client;


      import java.sql.Statement;
      import java.sql.Connection;
      import java.sql.DriverManager;
      import java.sql.ResultSet;
      import java.sql.SQLException;
      import java.sql.*;

      public class testjdbc {
          public static void main(String[] args) {
              System.out.println("Connection/SQL test starting in TestSQL.java...");

              String driver = "com.ibm.db2.jcc.DB2Driver";
              String url = "jdbc:db2://localhost:50000/TEST";
              String userid = "32001";
              String password = "password";

              Connection connection = null;

              try { // load the driver
                  Class.forName(driver);
              } catch (Exception e) {
                  System.out.println("error loading driver");
                  e.printStackTrace();
                  return;
              }

              try {
                  connection = DriverManager.getConnection(url, userid, password);
                  System.out.println("Connection successful!");

                  DatabaseMetaData databaseMetaData  = connection.getMetaData();

               String databaseProductName =
               databaseMetaData.getDatabaseProductName();
               String databaseProductVersion =
                  databaseMetaData.getDatabaseProductVersion();

               System.out.println("Database Product Name: " + databaseProductName);
               System.out.println("Database Product Version: " + databaseProductVersion);



              } catch (SQLException e) {
                  System.out.println("Caught SQLException: " + e.getMessage());
                  e.printStackTrace();
              } finally {
                  try {
                      connection.close();
                  } catch (SQLException e) {
                      e.printStackTrace();
                  }
              }
          }
      }  

Attachments:
null
Error in WSAD attached
Error in WSAD attached
 
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: pkesarwani
Question Asked On: 05.07.2008
Participating Experts: 2
Points: 500
Views: 0
Translate:
Loading Advertisement...
05.07.2008 at 11:18AM PDT, ID: 21518980

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.07.2008 at 11:24AM PDT, ID: 21519033

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.07.2008 at 11:37AM PDT, ID: 21519165

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.07.2008 at 12:33PM PDT, ID: 21519632

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.07.2008 at 02:11PM PDT, ID: 21520386

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.29.2008 at 07:18PM PDT, ID: 21674794

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.12.2008 at 09:06AM PDT, ID: 21770962

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29 / EE_QW_2_20070628