hey all,
Has anyone successfully used oracle oci driver in iplanet
web container?
this is what I am trying to do:
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
<%
String db_driver = "oracle.jdbc.driver.OracleDriver";
String username = "blah";
String password = "blah";
//String db_url = "jdbc:oracle:thin:@10.94.2.8:1521:icsprd2";
String db_url = "jdbc:oracle:oci8:@ICSPRD.WORLD";
out.println(System.getProperty("java.library.path"));
Connection dbConn;
Class.forName(db_driver);
try {
dbConn = DriverManager.getConnection(db_url, username, password);
} catch (Exception e) {
out.println(e.getMessage());
e.printStackTrace();
}
%>
and when I go to the jsp, I got:
/opt/oracle/product/8.1.7/lib:/opt/oracle/product/8.1.7/jdbc/lib/classes12.zip:/usr/java/j2se1.3/jre/lib/sparc:/usr/java/j2se1.3/jre/lib/sparc/server:/usr/java/j2se1.3/jre/lib/sparc/classic:/usr/java/j2se1.3/jre/lib/sparc/native_threads:/opt/oracle/product/8.1.7/lib:/usr/iplanet/webservers/6.0sp2/bin/https/lib:/opt/oracle/product/8.1.7/lib:/usr/lib:/usr/dt/lib:/usr/openwin/lib:/opt/gnu/lib:/usr/local/lib:/usr/lib
ORA-12545: Connect failed because target host or object does not exist
looks like the tnsname look up failed!
I can't figure out why, everything works in my shell programs. :(
thanks in advance.
yan
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com