Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mysql driver fails on connection

 
Adithya NN
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using the following piece of code for establishing the connectivity



However i am getting the following exception when i run the program

I tried to print the SQL error code and it comes to be 0.
I am not using any query or anything this exception occurs when i call Drivermanager.getCnnection().

Can any one help me and tell me where i am going wrong
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Adithya Neurons", please check your private messages for an important administrative matter.
 
Campbell Ritchie
Sheriff
Pie
Posts: 48954
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Paul Clapham:
"Adithya Neurons", please check your private messages for an important administrative matter.
I am afraid you will have to check your private messages again, Adithya.
 
Adithya NN
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
We generally dont use our last name in india since its most of the time our fathers name So i wud still be preffered to call Adithya NN. If it still violates your naming policy I am afraid i will have to leave JavaRanch.I dint expect this kind of insensitivity from your end

Thanks & regards
Adithya N N
 
arulk pillai
Author
Ranch Hand
Posts: 3387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at


http://www.coderanch.com/t/307219/JDBC/java/Connecting-MySQL
[ August 15, 2008: Message edited by: arulk pillai ]
 
Adithya NN
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have added the connector jar downloaded into the class path and have also tried using the code present in the above link none of them work.I keep getting the Exception. Its not the ClassNotFoundException its some other kind of exception as i have posted above
 
arulk pillai
Author
Ranch Hand
Posts: 3387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
28.4.5.3.9: When using gcj an java.io.CharConversionException is raised when working with certain character sequences.

This is a known issue with gcj which raises an exception when it reaches an unknown character or one it cannot convert. You should add useJvmCharsetConverters=true


http://dev.mysql.com/doc/refman/5.0/en/connector-j-usagenotes-troubleshooting.html#qandaitem-28-4-5-3-9


Google for - MySQL Caused by: java.io.CharConversionException
 
Adithya NN
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks it worked.I changed the JRE to Sun. And the it worked with gcj upon passing the VM argument
 
Campbell Ritchie
Sheriff
Pie
Posts: 48954
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not a case of insensitivity, but of bitter experience with fora where people use pseudonyms only. The atmosphere can become unpleasant and we have found that enforcing the naming policy strictly helps maintain a friendly atmosphere here, even though (and we are sorry about that) it may inconvenience a few people.

It would not be appropriate to continue discussing the naming policy here, but you are welcome to go through the "Javaranch" forum where that sort of thing is normally discussed.
 
Campbell Ritchie
Sheriff
Pie
Posts: 48954
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And well done getting your problem sorted out
[ August 15, 2008: Message edited by: Campbell Ritchie ]
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As to the display name, note that you're free to choose any name you like. It doesn't have to be your real name, it just has to sound like a real name, and have a full first and last name.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic