JDBC load problem -thanks Sanjay

JDBC load problem -thanks Sanjay

Post by el_squid_2.. » Sun, 31 Dec 1899 09:00:00



Now I'm getting the following:SQLException from the following connect
statement.

 Connection conn = DriverManager.getConnection(

Below is the stack trace. I'm just using the SID, port number and
service name from Net 8 Assistant. Any help appreciated.

java.sql.SQLException: Io exception: The Network Adapter could not
establish the connection at
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114) at
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156) at
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269) at
oracle.jdbc.driver.OracleConnection.(OracleConnection.java:210) at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:
251) at
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:224) at
java.sql.DriverManager.getConnection(Compiled Code) at
java.sql.DriverManager.getConnection(DriverManager.java:159) at
DBServlet.doPost(DBServlet.java:45) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:521) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:588) at
org.apache.jserv.JServConnection.processRequest(JServConnection.java) at
org.apache.jserv.JServConnection.run(JServConnection.java) at
java.lang.Thread.run(Thread.java:479) A problem occured in Oracle.
Please try again.

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

1. Problem loading jdbc.sqlserver.SQLServerDriver from a servlet

I have written a Java program that uses JDBC to access my SQL Server
Database.  I load the
appropriate driver using
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver") and I have
CLASSPATH set up to include C:\Program Files\Microsoft SQL Server 2000
Driver for JDBC\lib\msbase.jar;
C:\Program Files\Microsoft SQL Server 2000 Driver for
JDBC\lib\mssqlserver.jar;
C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\msutil.jar
This all works fine.
The problem is when I move this into a Servlet running under Apache/Tomcat
4.0.  It always says
"java.lang.ClassNotFoundException:
com.microsoft.jdbc.sqlserver.SQLServerDriver" on the Tomcat console.

I start #Tomcat using the following script :-
set CLASSPATH=%CLASSPATH%;C:\Program Files\Microsoft SQL Server 2000 Driver
for JDBC\lib\msbase.jar;
set CLASSPATH=%CLASSPATH%;C:\Program Files\Microsoft SQL Server 2000 Driver
for JDBC\lib\mssqlserver.jar;
set CLASSPATH=%CLASSPATH%;C:\Program Files\Microsoft SQL Server 2000 Driver
for JDBC\lib\msutil.jar
set CATALINA_HOME=C:\jakarta-tomcat-4.0
%CATALINA_HOME%\bin\startup

The startup script does not appear to change CLASSPATH.

Why can't the Servlet find the Class but the java program can ?

2. sql agent jobs don't run

3. JDBC Gurus ....I need help with Loading JDBC Drivers

4. Stored Procedures - Can they be exported?

5. Problem loading JDBC-ODBC driver

6. access to mdb over odbc from vb

7. JDBC thin driver loading problem

8. A Little Confused

9. SPATIAL:SDO_GEOMETRY:JDBC: problems loading large geometry objects into the database

10. OODBs - message for Sanjay Agrawal

11. Thank you (how to load data to a text file

12. (JDBC, Oracle) Connection problem with JDBC - sqlplus no problem

13. thanks for jdbc-mysql