• 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 connection using eclipse (ubuntu)

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello i am trying to connect to mysql database, but somehow i cant get it it to work
thanks in advance. By the way i am using ubuntu as my operating system

code and the errors are below






java.sql.SQLException: Unexpected exception encountered during query.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2593)
at com.mysql.jdbc.ConnectionImpl.configureClientCharacterSet(ConnectionImpl.java:1768)
at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3444)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2062)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:723)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:298)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
at java.sql.DriverManager.getConnection(libgcj.so.81)
at java.sql.DriverManager.getConnection(libgcj.so.81)
at baran.main(baran.java:13)
Caused by: java.io.CharConversionException
at gnu.gcj.convert.Input_iconv.read(libgcj.so.81)
at java.lang.String.init(libgcj.so.81)
at java.lang.String.<init>(libgcj.so.81)
at com.mysql.jdbc.SingleByteCharsetConverter.<init>(SingleByteCharsetConverter.java:152)
at com.mysql.jdbc.SingleByteCharsetConverter.initCharset(SingleByteCharsetConverter.java:107)
at com.mysql.jdbc.SingleByteCharsetConverter.getInstance(SingleByteCharsetConverter.java:85)
at com.mysql.jdbc.ConnectionImpl.getCharsetConverter(ConnectionImpl.java:2773)
at com.mysql.jdbc.StringUtils.getBytes(StringUtils.java:679)
at com.mysql.jdbc.Buffer.writeStringNoNull(Buffer.java:663)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2049)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2548)
...9 more

 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Get rid of that terrible GNU JDK and install Sun JDK.
 
baran tamer
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks a lot it works,
can you tell me what the problem was ?
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is no problem. It's just a fact. GNU JDK is terrible.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic