472,961 Members | 2,151 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,961 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 4179

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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.