• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Mysql driver fails on connection

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 28399
100
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Adithya Neurons", please check your private messages for an important administrative matter.
 
Marshal
Posts: 80652
476
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author
Posts: 3473
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look at


https://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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 3473
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 80652
476
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 80652
476
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And well done getting your problem sorted out
[ August 15, 2008: Message edited by: Campbell Ritchie ]
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic