Hi Steven:

If this example helps, our servlets connect to DB2 v6 from WebSphere v3 on
Windows 2000 Server like so:

        //from .props file
        fConnectionPool.fJDBCdriver = fJDBCdriver;
        fConnectionPool.fDatabase = fDatabase;
        fConnectionPool.fDBUser = fDBUser;
        fConnectionPool.fDBUserPassword = fDBUserPassword;
      ...

#
#    JDBC
#
#JDBCdriver=COM.ibm.db2.jdbc.app.DB2Driver
JDBCdriver=COM.ibm.db2.jdbc.app.DB2Driver
#Database(or "JDBCConnectionURL")=jdbc:db2:SAMPLE
Database=jdbc:db2:TFHDEV
#UserId
User=<UserID>
#password
Using=<password>
        ...

        //check properties
        if(fJDBCdriver == null)
            throw new Exception( iTimeStamp.getString() + " JDBCDriver property not
found.");

        if(fDatabase == null)
            throw new Exception( iTimeStamp.getString() + " Database
(JDBCConnectionURL) property not found.");
      ...

        //echo our settings
        trace("JDBCdriver = " + fJDBCdriver);
        trace("Database (JDBCConnectionURL) = " + fDatabase);
      ...

        // when instantiated, driver registers with the DriverManager
        trace("Registering " + fJDBCdriver);
        Class.forName(fJDBCdriver).newInstance();

      PooledConnection pooledConnection = new PooledConnection();
        pooledConnection.fConnection =
java.sql.DriverManager.getConnection(fDatabase,fDBUser,fDBUserPassword);
      ...

John Hicks
ceriumworks.com
XMLOutline XMLdb XMLServlet

-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
Stephen Casey
Sent: Wednesday, September 13, 2000 2:59 PM
To: [EMAIL PROTECTED]
Subject: JDBC desperation


I am fighting a war here to introduce Java Servlets as an alternative to
CGI/Active Server Pages.

I am desperate to get my java servlet to connect to our Oracle database. My
environment is as follows:

Oracle 8.16 on IBM RS6000 (Unix) (with TCP/IP listner)
Microsoft Win2000 Adv Server running IIS 5 web server
JRun 3.0 Servlet engine
JRE 1.2 (from JRun 3 install)
Visual Cafe 3c IDE

Can you tell me what JDBC driver (OCI/Thin?) I should use in my servlets to
connect to Oracle 8i? I have tried using the 8.16 thin driver. I have placed
both zipped and unzipped paths in my CLASSPATH and PATH environmental
variables.
I have tried both DriveManager.registerDriver and Class.forName.

DriveManager.registerDriver( new oracle.jdbc.driver.OracleDriver()); will
produce the following error:

500 Internal Server Error
javax.servlet.ServletException: oracle/jdbc/driver/OracleDriver
java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver

Any ideas or anyplace you can recommend for help?

?'s - Stephen 1-907-263-4315

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to