Click here to Skip to main content
15,897,704 members
Home / Discussions / Java
   

Java

 
QuestionXMPP (Building an Instant Messaging Application Using Jabber/XMPP) Pin
Ireland.ir2-Apr-10 8:45
Ireland.ir2-Apr-10 8:45 
QuestionGenerate color scales in java please help!! Pin
codonneem1-Apr-10 5:05
codonneem1-Apr-10 5:05 
AnswerRe: Generate color scales in java please help!! Pin
David Skelly5-Apr-10 22:29
David Skelly5-Apr-10 22:29 
QuestionUnable to start the Tomcat v6.0 Server Pin
Ram Bonala26-Mar-10 3:59
Ram Bonala26-Mar-10 3:59 
AnswerRe: Unable to start the Tomcat v6.0 Server Pin
Richard MacCutchan26-Mar-10 5:03
mveRichard MacCutchan26-Mar-10 5:03 
AnswerRe: Unable to start the Tomcat v6.0 Server Pin
xxyyjoke26-Mar-10 15:03
xxyyjoke26-Mar-10 15:03 
AnswerRe: Unable to start the Tomcat v6.0 Server Pin
nguyencdoan12-Jan-11 21:14
nguyencdoan12-Jan-11 21:14 
QuestionWhat's Wrong With JDBC Connectivity? Pin
sujan.vb.net25-Mar-10 6:21
sujan.vb.net25-Mar-10 6:21 
Platform: Ubuntu Jaunty 9.04
Java: Open JDK 1.6.0.x
Mysql Connector: mysql-connector-5.1.12.jar

The code below works fine on Windows But whats wrong with the code that it generates the following error :

Driver Loaded..<br />
SQLException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '????????????????' at line 1<br />
SQLState: 42000<br />
VendorError: 1064



import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Connection;

public class TestException {
	static{
		try{
			DriverManager.registerDriver(new com.mysql.jdbc.Driver());
			System.out.println("Driver Loaded..");
		}catch(Exception e){
			System.out.println("Driver Not Loaded!");
		}
	}
	public static void main(String[] args) {
		try{
		Connection conn = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/phpmyadmin","root","*******");
		System.out.println("Connection is Ready");
		conn.close();
		}catch(SQLException ex){
			System.out.println("SQLException: " + ex.getMessage());
			System.out.println("SQLState: " + ex.getSQLState());
			System.out.println("VendorError: " + ex.getErrorCode());
		}
	}

}

AnswerRe: What's Wrong With JDBC Connectivity? Pin
TorstenH.26-Mar-10 3:28
TorstenH.26-Mar-10 3:28 
GeneralRe: What's Wrong With JDBC Connectivity? Pin
sujan.vb.net26-Mar-10 14:31
sujan.vb.net26-Mar-10 14:31 
Questionjsp project Pin
wgjamafu5824-Mar-10 23:56
wgjamafu5824-Mar-10 23:56 
AnswerRe: jsp project Pin
Cedric Moonen25-Mar-10 0:06
Cedric Moonen25-Mar-10 0:06 
GeneralRe: jsp project Pin
wgjamafu5825-Mar-10 0:13
wgjamafu5825-Mar-10 0:13 
GeneralRe: jsp project Pin
Cedric Moonen25-Mar-10 0:50
Cedric Moonen25-Mar-10 0:50 
GeneralRe: jsp project Pin
Richard MacCutchan25-Mar-10 2:32
mveRichard MacCutchan25-Mar-10 2:32 
AnswerRe: jsp project Pin
David Skelly25-Mar-10 2:53
David Skelly25-Mar-10 2:53 
QuestionUseful Java site for reporting Pin
capnrandy24-Mar-10 11:07
capnrandy24-Mar-10 11:07 
QuestionJava projects Pin
dilanka_perera23-Mar-10 4:11
dilanka_perera23-Mar-10 4:11 
AnswerRe: Java projects Pin
Richard MacCutchan23-Mar-10 4:17
mveRichard MacCutchan23-Mar-10 4:17 
QuestionSeam build-file failure Pin
sunil150822-Mar-10 1:26
sunil150822-Mar-10 1:26 
AnswerRe: Seam build-file failure Pin
TorstenH.22-Mar-10 3:35
TorstenH.22-Mar-10 3:35 
Questionsorted [modified] Pin
salemmohamed19-Mar-10 2:40
salemmohamed19-Mar-10 2:40 
AnswerRe: sorted Pin
Richard MacCutchan19-Mar-10 2:57
mveRichard MacCutchan19-Mar-10 2:57 
AnswerRe: sorted Pin
Richard MacCutchan19-Mar-10 3:03
mveRichard MacCutchan19-Mar-10 3:03 
AnswerRe: sorted Pin
Gwenio19-Mar-10 5:16
Gwenio19-Mar-10 5:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.