473,473 Members | 1,739 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Connector/J not working with MySQL5.0?

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

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

Should I expect to be able to connect to MySQL5.0 alpha with JDBC?
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 MySQL 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 3252

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

Similar topics

0
by: Google Mike | last post by:
I just found out from someone named Frank M. Kromann in one of the other PHP forum websites that I don't have to recompile PHP on Linux in order to add a database connector. I've been pulling my...
12
by: Sarah Tanembaum | last post by:
Though I installed MySQL5 and PHP5, how come my phpinfo() shows as follow: MySQL Support enabled Active Persistent Links 0 Active Links 0 Client API version 3.23.57 <<<<<<<<<<<<<<< ...
0
by: Ruud vd Velden | last post by:
Hello, We're using Office XP on Windows 2000 SP4. After installing the Oracle Connector for Outlook the following problem occurs: Emails sent by Outlook, in HTML format, do have a strange...
0
by: MS | last post by:
Hi, My application uses J Connector's 'mysql-connector-java-3.1.6-bin.jar' file with jdk 1.5 on my Win 2000 system to connect to MySQL running on a Linux machine on my LAN and it works fine from...
1
by: plank | last post by:
Hey, I have MySql 5.0.18 and Connector/net 1.0.7 installed and am using c# to connect to a remote database. If I execute the EXE in the debug folder (or choose start without debugging from the...
0
by: JJ | last post by:
I've managed to get the .net connector working in VS Web Developer Express so that I can use the mySQL 5.0.22 database as a Membership provider. So I can now (if I wanted to) use the web admin tool...
2
by: Vague | last post by:
Hello There, I've recently been working on a large project, very database driven, in C# on windows systems, calling a MySQL database on a linux box. The project is going very well. Except that...
3
by: Vague | last post by:
Hello There, I've recently been working on a large project, very database driven, in C# on windows systems, calling a MySQL database on a linux box. The project is going very well. Except that...
3
by: toyin | last post by:
hi, am having problem connecting to MYSQL5.1 from VS.Net.the error is database reeor:System.Data.SqlClient.SqlException:An error occur while establishnig a connection to the server. Am Using Visual...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.