OpenOffice 2.0.2 Base crashes while trying to load JDBC driver

Bug #50063 reported by अशोक कुमार
12
Affects Status Importance Assigned to Milestone
openoffice.org (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I was using OpenOffice 1.9.129 on Ubuntu 5.10 with the included JDBC driver com.mysql.jdbc.Driver to connect mysql-server 4.0.24 either on localhost and on other servers without any problem.

After upgrading to Ubuntu 6.06, and installing mysql-server-5.0.21-3ubuntu1 from server distribution, I tried to do the same. OpenOffice 2.0.2 Base crashed while loading the driver. Then based on suggestion, I downloaded JDBC driver mysql-connector-java-3.1.13-bin-jar and included in the classpath, as I was told that Ubuntu 6.06 does not ship with java driver. This loaded the driver successfully.

But when I clicked on the Tables to get list of my Tables, it did not display the list of tables and gave following error (phase5_local is the name of database on localhost with utf-8 encoding): -

The connection to the data source "phase5_local" could not be established.

Error during query: Unexpected Exception:
java.io.CharCenversionException message given: null

Nested Stack Trace:

** BEGIN NESTED EXCEPTION **

java.io.CharConversionException

STACKTRACE:

java.io.CharConversionException
   at gnu.gcj.convert.input_iconv.read(libgcj.so.7)
   at java.lang.String.init(libgcj.so.7)
   at java.lang.String.<init>(libgcj.so.7)
   at
com.mysql.jdbc.SingleByteCharsetConverter.<init>(SingleByteCharsetConverter.java:153)
   at
com.mysql.jdbc.SingleByteCharsetConverter.initCharset(SingleByteCharsetConverter.java:108)
   at
com.mysql.jdbc.SingleByteCharsetConverter.getinstance(SingleByteCharsetConverter.java:86)
   at com.mysql.jdbc.StringUtils.getBytes(StringUtils.java:600)
   at
com.mysql.jdbc.ByteArrayBuffer.writeStringNoNull(ByteArrayBuffer.java:544)
   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1660)
   at
com.mysql.jdbc.Connection.configureClientCharacterSet(Connection.java:2998)
   at
com.mysql.jdbc.Connection.configureClientCharacterset(Connection.java:2343)
   at
com.mysql.jdbc.Connection.initializePropsFromServer(Connection.java:3723)
   at
com.mysql.jdbc.Connection.createNewIO(Connection.java:2583)
   at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
   at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)

** END NESTED EXCEPTION **

I tried to change utf-8 encoding to system, but the result was same.

description: updated
Revision history for this message
अशोक कुमार (ashok-kumar) wrote : Screenshot after loading JDBC driver for MySQL and clicking on Tables

This is related to Bug No.50063

Revision history for this message
अशोक कुमार (ashok-kumar) wrote :

On 22-Jun-2006, I finished with a long list of updates available. It included MySQL-server also. The result is same. Still I am unable to connect MySQL database from OpenOffice 2.0.2 using JDBC driver. No change in status.

Revision history for this message
अशोक कुमार (ashok-kumar) wrote :

Recently I updated my OpenOffice as part of regular updates, which stated that that it tackles issues related to xml to utf-8 conversions. Later on I found file mysql-connector-java-3.0.17-ga-bin.jar in ~/.openoffice/user/java directory, which I included in my classpath.

The tables opened in OpenOffice Base. But when I clicked last record button after opening a table having 500+ records, OpenOffice Base crashed again.

Thereafter, I went to Add/Remove Programs, searched for Sun Java and installed JRE 1.5.0_06. I changed my java environment from the one provided with distribution 1.4.2 by Free Software Foundation.

It seems to work for me now!!!!!

Revision history for this message
John Vivirito (gnomefreak) wrote :

User needed to install java. If this happens again with the new java you installed please reopen this bug. Thank you for your bug report.

Changed in openoffice.org:
status: Unconfirmed → Rejected
Revision history for this message
don hardaway (don-hardaway) wrote :

Could you please tell me how to change the java environment and classpath. I have installed the Sun JRE.

Revision history for this message
अशोक कुमार (ashok-kumar) wrote :

Load OpenOffice. Go to Tools -> Options -> OpenOffice.org -> java -> Class Path -> Add Archive. Then browse to the java driver mysql-connector-java-3.0.17-ga-bin.jar as indicated above. This will include the driver in your class path.

I hope it is useful.

Revision history for this message
Matthias Klose (doko) wrote :

is this fixed with 2.2.0? note that you find the driver in the libmysql-java package as well.

Changed in openoffice.org:
status: Rejected → Needs Info
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for openoffice.org (Ubuntu) because there has been no activity for 60 days.]

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.