[求助]jdbc相关问题求助
出现异常:type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: ORA-01722: ????
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:673)
org.apache.jsp.class_jsp._jspService(class_jsp.java:611)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
root cause
java.sql.SQLException: ORA-01722: ????
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java:1198)
oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2400)
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
oracle.jdbc.driver.OracleStatement.doScrollStmtExecuteQuery(OracleStatement.java:7030)
oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:578)
org.apache.jsp.class_jsp._jspService(class_jsp.java:82)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
我是新手请大家帮忙看看是什么问题。不知道是不是jdbc驱动的问题。我已经将oracle92\jdbc\lib下的classes12.jar复制到tomcat_home\common\lib下,并且在classpath下添加了相应路径。可是仍然出现问题
我的数据库连接文件的代码如下:
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.sql.*"%>
<%Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
String url="jdbc:oracle:thin:@localhost:1521:download";
//orcl为你的数据库的SID
String user="system";
String password="m4b7y7w8";
Connection conn= DriverManager.getConnection(url,user,password);
Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
%>
请大家帮助看看是什么问题。多谢。本人是新手对java,jsp等非常感兴趣,希望能多交些朋友。qq:64639370 msn:lyons_hui@hotmail.com