DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 13th October 2008
disappearedng disappearedng is offline
Shell Scout
 
Join Date: May 2008
Posts: 128
Thanked 0 Times in 0 Posts
Default Java + Eclipse + JDBC failure

Hi everyone,
I wrote a java file that implemented sucessfully on my laptop but then it failed to establish on my FreeBSD box. I am currently using eclispe 3.4 and mysql and jdk 1.6 and mysql-connector 5.16.

This is the error that i am getting when I am try to compile in eclipse:
Code:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

Last packet sent to the server was 0 ms ago.
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
	at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2103)
	at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:718)
	at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
	at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
	at java.sql.DriverManager.getConnection(DriverManager.java:582)
	at java.sql.DriverManager.getConnection(DriverManager.java:185)
	at com.sun.rowset.JdbcRowSetImpl.connect(JdbcRowSetImpl.java:642)
	at com.sun.rowset.JdbcRowSetImpl.prepare(JdbcRowSetImpl.java:654)
	at com.sun.rowset.JdbcRowSetImpl.execute(JdbcRowSetImpl.java:551)
	at example2532.JdbcRowSetTest.<init>(JdbcRowSetTest.java:32)
	at example2532.JdbcRowSetTest.main(JdbcRowSetTest.java:67)
Caused by: java.net.ConnectException: Connection refused
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
	at java.net.Socket.connect(Socket.java:519)
	at java.net.Socket.connect(Socket.java:469)
	at java.net.Socket.<init>(Socket.java:366)
	at java.net.Socket.<init>(Socket.java:209)
	at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:253)
	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:280)
	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2026)
	... 16 more
Note that I have tried compiling this program with the port mysql-connector-java installed and uninstalled but got the same message. This caused me to manually download the clean version of mysql connector 5.16 from sun and reference it into eclipse.

Any idea what went wrong?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Eclipse-cdt in Freebsd 7.1 rex FreeBSD General 3 10th January 2009 08:45 AM
Eclipse can't update ? disappearedng FreeBSD General 1 7th November 2008 01:03 AM
Using CDT on eclipse maxrussell Programming 0 4th November 2008 09:58 PM
n00b Eclipse question disappearedng FreeBSD General 3 3rd November 2008 05:29 PM
Eclipse install maxrussell FreeBSD Ports and Packages 27 30th October 2008 07:13 PM


All times are GMT. The time now is 06:50 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick