Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
|
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 5th, 2006, 04:49 AM
Registered User
 
Join Date: Mar 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to murali_vijaya
Default Database Connection Problem

Hi
I am trying to connect MySQL from JSP page (Tomcat 5.1 server).

I am getting the following exception.

Note: The same connection statement executes fine in a Java standalone Program.


SQLException caught: Communication link failure: java.io.IOException, underlying cause: Unexpected end of input stream

** BEGIN NESTED EXCEPTION **

java.io.IOException
MESSAGE: Unexpected end of input stream

STACKTRACE:

java.io.IOException: Unexpected end of input stream
    at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:109 6)
    at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:62 6)
    at com.mysql.jdbc.Connection.createNewIO(Connection.j ava:1562)
    at com.mysql.jdbc.Connection.<init>(Connection.java:4 91)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonReg isteringDriver.java:346)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at org.apache.jsp.sample_jsp._jspService(sample_jsp.j ava:97)
    at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:133)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:856)
    at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:311)
    at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:301)
    at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:248)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:856)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter

Can you please help me out.
 
Old August 5th, 2006, 10:10 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 146
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to aadz5
Default

Hi,

could you please put in the code that you are executing?

Thanks

Adz - Its all about the JSPs baby!





Similar Threads
Thread Thread Starter Forum Replies Last Post
[?] A database connection problem Aritra ASP.NET 1.0 and 1.1 Basics 3 August 26th, 2008 02:19 AM
Database Connection Problem vinyl-junkie Classic ASP Databases 2 June 2nd, 2008 03:18 AM
access database connection problem shaileshk ADO.NET 6 July 5th, 2005 03:30 AM
database connection problem farsfar2 BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 1 March 14th, 2005 06:52 AM
Database Connection Problem Wolfgang_nl Crystal Reports 0 July 19th, 2004 01:38 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.