Hi Shapira Yoav,

The Stack Trace Shows:

[STDOUT] java.sql.SQLException: IO Exception: The Network Adapter could not establish the connection

Any hints for this trace???


Thanks!


From: "Shapira, Yoav" <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Subject: RE: JDBC Drivers Exception ...
Date: Wed, 19 Feb 2003 15:17:48 -0500


Howdy,
A few things.

>I installed JDBC Drivers ojdbc14.jar, classes12.jar, nls_charset111.jar
on

Why both ojdbc14.jar and classes12.jar?  If you're connecting to an
Oracle 9.1 database, you don't want classes12.jar in there.  These two
jars have some overlapping classnames which will cause problems.

>my APPLICATION Server and SET the CLASSPATH accordingly.

Tomcat ignores the CLASSPATH environment variable.  You need to make
sure the JDBC driver distribution is in the proper place.  Usually, this
is inside the /WEB-INF/lib directory of your web application OR the
common/lib (or equivalent) directory on the server.

>When I run my Simple Web Applicatin which Access my DB Server: I get
>Exception at following Line:
>-----------------------------------------------------------------------
----
>-------------------
>try
>{
>	Class.forName("oracle.jdbc.OracleDriver");
>	con = DriverManager.getConnection(url,"user","pass");
>	stmt = con.createStatement();
>............
>
>}
>catch (Exception e)
>{	System.out.println("Exceptino raised at Clas.forname....."); }
>-----------------------------------------------------------------------
----
>-------------------

Which line generates the exception?  All three lines above, not to
mention you "...........", can generate exceptions.  Break up the code
into multiple try-catch blocks.

Also, what is the exception?  You didn't give details.  Please give the
full stack trace and message for the exception.

In addition, I thought the Oracle docs said to use
oracle.jdbc.driver.OracleDriver to load the driver, not the shorter
oracle.jdbc.OracleDriver.  Check the Oracle JDBC driver docs on that.

>Also, my APP SERVER has just moved to JDK1.4 whereas my DB Server still
has
>JDK 1.3. Do you think this is an issues?

Probably not an issue.  But then again, I haven't even seen your stack
trace yet.

Yoav Shapira
Millennium ChemInformatics
_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to