Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

exception giving as No more data to read from socket for jsp to connect oracle 9i on jboss 4.5

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<%@ page language="java" import="java.sql.*,java.io.*" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>accessing database</title>
</head>
<body>
<%Connection con=null;
Statement st=null;
ResultSet rs=null;
try{

Class.forName("oracle.jdbc.driver.OracleDriver");
con=DriverManager.getConnection("jdbc:oracle:thin:@ho-ud5x6m32km3l:1521:PLSExtProc","scott","tiger");
st=con.createStatement();
rs=st.executeQuery("select * from student");
while(rs.next()){%>
<%=rs.getInt(1)%>
<%=rs.getString(2) %>


<%}
}
catch(ClassNotFoundException e){
out.print("exception" +e);
}
%>


</body>
</html>
HTTP Status 500 -
________________________________________
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: An exception occurred processing JSP page /bkfamo.jsp at line 16

13: try{
14:
15: Class.forName("oracle.jdbc.driver.OracleDriver");
16: con=DriverManager.getConnection("jdbc:oracle:thin:@ho-ud5x6m32km3l:1521:PLSExtProc","scott","tiger");
17: st=con.createStatement();
18: rs=st.executeQuery("select * from student");
19: while(rs.next()){%>


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:397)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
javax.servlet.ServletException: java.sql.SQLException: No more data to read from socket
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.bkfamo_jsp._jspService(bkfamo_jsp.java:104)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
java.sql.SQLException: No more data to read from socket
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:222)
oracle.jdbc.dbaccess.DBError.check_error(DBError.java:944)
oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:741)
oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:700)
oracle.jdbc.ttc7.TTIpro.receive(TTIpro.java:141)
oracle.jdbc.ttc7.v8TTIpro.receive(v8TTIpro.java:101)
oracle.jdbc.ttc7.TTC7Protocol.connect(TTC7Protocol.java:1273)
oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:215)
oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:307)
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:442)
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:321)
java.sql.DriverManager.getConnection(DriverManager.java:582)
java.sql.DriverManager.getConnection(DriverManager.java:185)
org.apache.jsp.bkfamo_jsp._jspService(bkfamo_jsp.java:69)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
note The full stack trace of the root cause is available in the JBossWeb/2.0.1.GA logs.
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ami, please format your code and exception stacktrace while posting.
 
I can't take it! You are too smart for me! Here is the tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic