OracleApplicationサーバー10.1.2.0.2を使用しています。Oracleデータベースをjspログインページに接続しようとしています。後でフォームにリダイレクトされます。今のところ、自分のページをデータベースに接続しようとしています。
私の「connect.jsp」はディレクトリ「C:\ DevSuiteHome2 \ forms \ j2ee \ formsapp\formsweb」にあります
http:// p --- w0--4.lo ----- a.com:8889 / forms /helloworld.jsp [作業中のjspファイル]からjspファイルにアクセスできます
connect.jspのソースコード:
<%@ page import="java.sql.*" %>
<HTML>
<HEAD>
<TITLE>Simple JSP/Oracle Query Example</TITLE>
</HEAD>
<BODY>
<%
Class.forName("oracle.jdbc.OracleDriver");
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@p---w0--4.lo---a.com:8889:xii", "i----er", "i----er");
// @//machineName:port:SID, userid, password
%>
</BODY>
</HTML>
http://p --- w0--4.lo ----- a.com:8889 / forms / connect.jspにアクセスしようとすると、次のエラーが発生します。
500内部サーバーエラーjava.sql.SQLException:Io例外:oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:137)の不正なパケットタイプoracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:174) oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:286)at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:327)at oracle.jdbc.driver.PhysicalConnection。(PhysicalConnection.java:433) oracle.jdbc.driver.T4CConnection。(T4CConnection.java:150)at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:31)at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:571) java.sql.DriverManager.getConnection(DriverManager.java:512)at java.sql.DriverManager.getConnection(DriverManager.java:171)at _loginbox._check1._jspService(_check1.java:50)[SRC:/LOGINBOX/check1.jsp:12] at com.orionserver [Oracle Application Server Containers for J2EE 10g(10.1.2.0.2)]。http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)atoracle。 jsp.runtimev2.JspPageTable.service(JspPageTable.java:350)at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)at javax .servlet.http.HttpServlet.service(HttpServlet.java:853)at com.evermind [Oracle Application Server Containers for J2EE 10g(10.1.2.0.2)]。server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824) at com.evermind [Oracle Application Server Containers for J2EE 10g(10.1.2.0.2)]。server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)at com.evermind [Oracle Application Server Containers for J2EE 10g(10.1。 2.0.2)]。server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)at com.evermind [Oracle Application Server Containers for J2EE 10g(10.1.2.0.2)]。server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)at com.evermind [Oracle Application Server Containers for J2EE 10g(10.1.2.0.2)]。server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)at com.evermind [Oracle Application Server Containers for J2EE 10g(10.1.2.0) .2)]。util.ReleasableResourcePooledExecutor $ MyWorker.run(ReleasableResourcePooledExecutor.java:186)at java.lang.Thread.run(Thread.java:534)evermind [Oracle Application Server Containers for J2EE 10g(10.1.2.0.2)]。server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)at com.evermind [Oracle Application Server Containers for J2EE 10g(10.1.2.0.2) )]。util.ReleasableResourcePooledExecutor $ MyWorker.run(ReleasableResourcePooledExecutor.java:186)at java.lang.Thread.run(Thread.java:534)evermind [Oracle Application Server Containers for J2EE 10g(10.1.2.0.2)]。server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)at com.evermind [Oracle Application Server Containers for J2EE 10g(10.1.2.0.2) )]。util.ReleasableResourcePooledExecutor $ MyWorker.run(ReleasableResourcePooledExecutor.java:186)at java.lang.Thread.run(Thread.java:534)
ご返信いただければ幸いです。私は初心者なので、初心者の質問はご容赦ください