473,396 Members | 2,140 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

MySQL 5.0 and jdbc - unexpected end of input stream

MySQL 5.0 alpha (binary install) on
Solaris 9 -or- RedHat 8.0

mysql-connector-java-3.0.8-stable
-----------------------

Is there something different going on with JDBC and the alpha version
of MySQL 5.0? When trying to connect I am getting:

** BEGIN NESTED EXCEPTION **

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

The client machine trying to connect to the server *CAN* connect via
the mysql command line client (ie. is has permission to the servers).
I have tried connecting to version 5.0 installs on both Linux and
Solaris with the same result. If I point the driver back to a 3.23.57
install, it works fine as always.

Here is more of the error, and code to connect further below:
------------------------------
java.sql.SQLException: 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(DriverManager .java:517)
at java.sql.DriverManager.getConnection(DriverManager .java:177)
at sffcrm.ConnectionHelper.getConnection(ConnectionHe lper.java:40)
at sffcrm.UtilityMan.loginCheck(UtilityMan.java:127)
at _0002fcontrol_0002ejspcontrol_jsp_0._jspService(_0 002fcontrol_0002ejspcontrol_jsp_0.java:126)
at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWra pper.service(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at org.apache.tomcat.core.ServletWrapper.doService(Se rvletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.jav a:286)
at org.apache.tomcat.core.ServletWrapper.service(Serv letWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalServ ice(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(Cont extManager.java:743)
at org.apache.tomcat.service.http.HttpConnectionHandl er.processConnection(HttpConnectionHandler.java:21 0)
at org.apache.tomcat.service.TcpWorkerThread.runIt(Po olTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable. run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)
** END NESTED EXCEPTION **
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:69 9)
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(DriverManager .java:517)
at java.sql.DriverManager.getConnection(DriverManager .java:177)
at sffcrm.ConnectionHelper.getConnection(ConnectionHe lper.java:40)
at sffcrm.UtilityMan.loginCheck(UtilityMan.java:127)
at _0002fcontrol_0002ejspcontrol_jsp_0._jspService(_0 002fcontrol_0002ejspcontrol_jsp_0.java:126)
at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWra pper.service(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at org.apache.tomcat.core.ServletWrapper.doService(Se rvletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.jav a:286)
at org.apache.tomcat.core.ServletWrapper.service(Serv letWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalServ ice(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(Cont extManager.java:743)
at org.apache.tomcat.service.http.HttpConnectionHandl er.processConnection(HttpConnectionHandler.java:21 0)
at org.apache.tomcat.service.TcpWorkerThread.runIt(Po olTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable. run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)
-------------------------------
code to connect:

String url=("jdbc:mysql://192.168.0.6/testdata");

String user=("myuser");
String password=("mypassword");

try {
//for mm.mysql 2.0.4 or less
//Class.forName("org.gjt.mm.mysql.Driver").newInstan ce();

//for Connector/J-3.0.8
Class.forName("com.mysql.jdbc.Driver").newInstance ();

Connection conn = DriverManager.getConnection(url, user,
password);

}
catch <snip..., etc.>
Jul 19 '05 #1
0 4220

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: sridhar nagabhurshana | last post by:
hello I am trying to connect to mysql database using connector/J jdbc driver this is my code import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException;
6
by: Fraser Ross | last post by:
Algorithms cannot be used with input stream iterators? Is copying the range to a temporary container before using the algorithm the usual thing to do? Fraser.
0
by: Roy Epperson | last post by:
I just upgraded to MySQL to 4.1.9 and JDBC mysql-connector-java-3.1.6-bin.jar and now getting the following Exception: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data truncated for...
9
by: kernelxu | last post by:
hi,everybody. I calling function setbuf() to change the characteristic of standsrd input buffer. some fragment of the progrem is: (DEV-C++2.9.9.2) #include <stdio.h> #include <stdlib.h> int...
16
by: lovecreatesbeauty | last post by:
/* When should we worry about the unwanted chars in input stream? Can we predicate this kind of behavior and prevent it before debugging and testing? What's the guideline for dealing with it? ...
3
by: Nobody | last post by:
I'm trying to put together code to deal with a SOAP with attachements response, and I'd like to process the response in a single pass. The SOAP with attachments specification returns XML in a MIME...
2
by: jith87 | last post by:
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver Ths s the error i get whn i try to connect to mysql using jdbc driver.....Can u help me out...
27
by: =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= | last post by:
I have a fully-portable C program (or at least I think I do). It works fine on Windows, but malfunctions on Linux. I suspect that there's something I don't know about the standard input stream...
2
by: Josephsrm | last post by:
I have the web Application in Spring and Hibernate which is connected to the MySql database through the Jboss Server. I am getting the following error. com.mysql.jdbc.CommunicationsException:...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.