F
fallwind68
Unregistered / Unconfirmed
GUEST, unregistred user!
JSP 高手请指点迷津:上火
同样的脚本在oracle客户端调用同样的数据库表,都正常
而我自己的oracle服务器端,同样的脚本在oracle客户端调用同样的数据库表,却报错
调用网页时:
出错:SQL_Operate()racle.jdbc.driver.OracleDriver java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
出错:java.sql.SQLException: No suitable driver
----
而我已经在JSP脚本
.......
try{ Class.forName("oracle.jdbc.driver.OracleDriver");}
catch(ClassNotFoundException event)
{ out.print("<BR>出错:");
out.println("SQL_Operate():"+event.getMessage());
out.print(event);}
try{ con=DriverManager.getConnection("jdbcracle:thinlocalhost:ORAFW","sysf","sysf");
sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
String condition="SELECT * FROM userinfo WHERE userid="+"'"+UserNo+"'";
rs=sql.executeQuery(condition);
........
-------环境变量定义如下----
用户变量CLASSPATH
C:/j2sdk1.4.1_01/lib:.;
系统变量CLASSPATH
C:/j2sdk1.4.1_01/lib/classes12.zip
系统变量JAVA_HOME
C:/j2sdk1.4.1_01
系统变量Path
C:/j2sdk1.4.1_01/bin;C:/Program Files/Apache Tomcat 4.0/bin;D:/Oracle/Ora81/orb/bin
系统变量TOMCAT_HOME
C:/Program Files/Apache Tomcat 4.0
同样的脚本在oracle客户端调用同样的数据库表,都正常
而我自己的oracle服务器端,同样的脚本在oracle客户端调用同样的数据库表,却报错
调用网页时:
出错:SQL_Operate()racle.jdbc.driver.OracleDriver java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
出错:java.sql.SQLException: No suitable driver
----
而我已经在JSP脚本
.......
try{ Class.forName("oracle.jdbc.driver.OracleDriver");}
catch(ClassNotFoundException event)
{ out.print("<BR>出错:");
out.println("SQL_Operate():"+event.getMessage());
out.print(event);}
try{ con=DriverManager.getConnection("jdbcracle:thinlocalhost:ORAFW","sysf","sysf");
sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
String condition="SELECT * FROM userinfo WHERE userid="+"'"+UserNo+"'";
rs=sql.executeQuery(condition);
........
-------环境变量定义如下----
用户变量CLASSPATH
C:/j2sdk1.4.1_01/lib:.;
系统变量CLASSPATH
C:/j2sdk1.4.1_01/lib/classes12.zip
系统变量JAVA_HOME
C:/j2sdk1.4.1_01
系统变量Path
C:/j2sdk1.4.1_01/bin;C:/Program Files/Apache Tomcat 4.0/bin;D:/Oracle/Ora81/orb/bin
系统变量TOMCAT_HOME
C:/Program Files/Apache Tomcat 4.0