jdbc driver load failure

dBase, Calc, CSV, MS ACCESS, MySQL, PostgrSQL, OTHER
Post Reply
rene
Posts: 68
Joined: Wed Jan 23, 2008 12:50 pm

jdbc driver load failure

Post by rene »

With a postgresql datasource, the jdbc driver (verson 82504) fails to load, during the wizard process of creating a new base database with the postgresql database source. Should this occurrence be considered a bug?
ooo 321; gnome 220; ibm java jre 160; gnu linux mandrake 2008
ooo 2319238; postgresql 826; gnome 220; ibm java jre 150; gnu linux mandriva 2007
openoffice<at>conference.jabber.org
User avatar
DrewJensen
Volunteer
Posts: 1734
Joined: Sat Oct 06, 2007 9:01 pm
Location: Cumberland, MD - USA

Re: jdbc driver load failure

Post by DrewJensen »

You need to be sure and include the driver in the class path for OO.o.

Tools>Options>Java
Click on class path
Add archive
Brose to the driver and select it

That should take care of your problem.
Former member of The Document Foundation
Former member of Apache OpenOffice PMC
LibreOffice on Ubuntu 18.04
rene
Posts: 68
Joined: Wed Jan 23, 2008 12:50 pm

Re: jdbc driver load failure

Post by rene »

Had already done that; the driver was retrieved as a zip file which base recognised.

Since then I have tried the sdbc driver (version 82504) which is recognised and works. Reading the documentation, it is not yet fully ready, so I will be continuing to use pgadmin3 for now.

I notice that even though I changed the connection to sdbc, when I start the pc and open base, the default driver remains jdbc, which continues to fail.
ooo 321; gnome 220; ibm java jre 160; gnu linux mandrake 2008
ooo 2319238; postgresql 826; gnome 220; ibm java jre 150; gnu linux mandriva 2007
openoffice<at>conference.jabber.org
User avatar
DrewJensen
Volunteer
Posts: 1734
Joined: Sat Oct 06, 2007 9:01 pm
Location: Cumberland, MD - USA

Re: jdbc driver load failure

Post by DrewJensen »

rene wrote:Had already done that; the driver was retrieved as a zip file which base recognised.

Since then I have tried the sdbc driver (version 82504) which is recognised and works. Reading the documentation, it is not yet fully ready, so I will be continuing to use pgadmin3 for now.

I notice that even though I changed the connection to sdbc, when I start the pc and open base, the default driver remains jdbc, which continues to fail.
Well I would not give up pgadmin for Base - period. Two different applications that are not geared to do the same thing at all.
Former member of The Document Foundation
Former member of Apache OpenOffice PMC
LibreOffice on Ubuntu 18.04
wurzel
Volunteer
Posts: 145
Joined: Sun Dec 09, 2007 10:39 am

Re: jdbc driver load failure

Post by wurzel »

rene wrote:With a postgresql datasource, the jdbc driver (verson 82504) fails to load, during the wizard process of creating a new base database with the postgresql database source. Should this occurrence be considered a bug?
You're using very old and very buggy versions of OOo (especially the Base module in the 2.0.x series) with an IBM JRE ?? Frankly, I would update OOo to the latest stable, and install the Sun JVM/JRE.

Alex
rene
Posts: 68
Joined: Wed Jan 23, 2008 12:50 pm

Re: jdbc driver load failure

Post by rene »

Like the latest version of all the software you are using is totally bug free? What a pointless reply.
ooo 321; gnome 220; ibm java jre 160; gnu linux mandrake 2008
ooo 2319238; postgresql 826; gnome 220; ibm java jre 150; gnu linux mandriva 2007
openoffice<at>conference.jabber.org
wurzel
Volunteer
Posts: 145
Joined: Sun Dec 09, 2007 10:39 am

Re: jdbc driver load failure

Post by wurzel »

rene wrote:Like the latest version of all the software you are using is totally bug free? What a pointless reply.
That isn't what I said, and I'm rather surprised at your reaction. OOo 2.0.x had known db stability and functionality issues which have since been corrected for the most part. It is also known that Base functions much better with a Sun JDK/JVM/JRE than any of the others that the Linux/Unix distros have managed to integrate into their systems. I've been down that road on several occasions and so speak from my own experience. You are of course entitled to your own opinions, and are free to take or leave the suggestions we make, but my comment was not glib and off the cuff.

Alex

PS : FWIW, I'm running MacOSX, postgres 8.2, postgresql-jdbc 8.2-507.jdbc3 and Apple's Sun JVM 1.5.07 and I don't encounter the problem you reported. Oh yes, and OOo 2.4 native Aqua dev m243, and OOo X11 680Hm4.
Three_Palms
Posts: 1
Joined: Wed Jan 30, 2008 10:38 pm

Re: jdbc driver load failure

Post by Three_Palms »

I'm having the same problem. Can anyone give me a step by step fix? I'm not a programer or developer. I'm just a guy trying to start his own business.

Craig.

iBook G3 (PPC)
OS 10.4.11
OO 2.3
wurzel
Volunteer
Posts: 145
Joined: Sun Dec 09, 2007 10:39 am

Re: jdbc driver load failure

Post by wurzel »

Three_Palms wrote:I'm having the same problem. Can anyone give me a step by step fix? I'm not a programer or developer. I'm just a guy trying to start his own business.

Craig.

Hi Craig,

Assuming that you have your pg db set up correctly, you should copy the JDBC driver (the jar file) to somewhere on your disk where OOo can read it.
Mine is in /Library/Java/Extensions

You should check that OOo recognizes your existing Java JVM. To do this, from within OOo, go to :
Tools > Options > Java

A short amount of time should elapse before it finds your Apple provided JVM. It may be useful to let us know which version of the JVM you have. Having just checked mine again, I can see I have Java 1.5.0_13.

Now click on the Classpath button and the Add Archive button and then navigate to the /Library/Java/Extensions folder and click on the JAR file to select it, then click on Open and it should appear in the list of Archives. A message will probably tell you that you need to stop OOo completely and restart it. I usually quit OOo and the X11 session, then restart OOo.


When you create your ODB document from within OOo, you need to enter the following in the URL datasource field of the db creation wizard, after having selected Create to an existing database, and then chosen "JDBC" as the driver.

jdbc:postgresql://localhost/name_of_my_pg_db
The jdbc part is already prefilled in for you. Change "localhost" to the IP address or the machine name on the network of where your postgresql db is located.

Check that the class of driver is :
org.postgresql.Driver

if nothing is entered (which was what happened in my case) then enter the above string

You can also test the driver connection here. If things go wrong at this point then there is something wrong either with your Java setup, or the place where you stuck the driver on the disk.


Alex
Ricardo33
Posts: 3
Joined: Fri Feb 01, 2008 7:33 pm

configure open office to run Java

Post by Ricardo33 »

DrewJensen wrote:You need to be sure and include the driver in the class path for OO.o.

Tools>Options>Java
Click on class path
Add archive
Brose to the driver and select it

That should take care of your problem.

Hello, I think I'm having the same problem... when I add the JRE with the class path in the Java options, everything seems to be ok. But when I close the options, leave scalc open, and reopen the options, the ''use a JRE'' checkbox is unchecked and there's no more JRE. I work with the following versions: windows XP, jdk1.6.0_04 and Open office 2.3.1 (latest versions...). I suspect a bug in OO and would like to try with an older version. Does someone ever encoutered a problem like this? Does anyone know where I could get an older version of OO?

I have followed exactly the steps defines in the following link... but seem to have a problem with OO
http://rpbouman.blogspot.com/2006/12/my ... ceorg.html

thanks
User avatar
DrewJensen
Volunteer
Posts: 1734
Joined: Sat Oct 06, 2007 9:01 pm
Location: Cumberland, MD - USA

Re: jdbc driver load failure

Post by DrewJensen »

I apologize - I thought I had posted this already...but had not

Yes that is a known problem -
Can not connect to embedded Base fle and HSQLdb server w/ same configuration

The fix has been integrated into the current 2.4 developer snapshot builds already.
Former member of The Document Foundation
Former member of Apache OpenOffice PMC
LibreOffice on Ubuntu 18.04
Ricardo33
Posts: 3
Joined: Fri Feb 01, 2008 7:33 pm

Re: configure open office to run Java

Post by Ricardo33 »

Ricardo33 wrote:
DrewJensen wrote:You need to be sure and include the driver in the class path for OO.o.

Tools>Options>Java
Click on class path
Add archive
Brose to the driver and select it

That should take care of your problem.
This is what I do. But when I come back in the java options, I have a clean page with nothing on it. Am I suppose to do something in the ''parameters...''?
Thanks a lot,
Remi

Hello, I think I'm having the same problem... when I add the JRE with the class path in the Java options, everything seems to be ok. But when I close the options, leave scalc open, and reopen the options, the ''use a JRE'' checkbox is unchecked and there's no more JRE. I work with the following versions: windows XP, jdk1.6.0_04 and Open office 2.3.1 (latest versions...). I suspect a bug in OO and would like to try with an older version. Does someone ever encoutered a problem like this? Does anyone know where I could get an older version of OO?

I have followed exactly the steps defines in the following link... but seem to have a problem with OO
http://rpbouman.blogspot.com/2006/12/my ... ceorg.html

thanks
darrelln09
Posts: 2
Joined: Fri Jul 04, 2008 9:25 pm

Re: jdbc driver load failure

Post by darrelln09 »

I cannot get the MySQL JDBC driver to load. Here is what I am doing:

1. select Tools>Options
2. expand OpenOffice.org and click on: Java
3. wait for JREs to be found ---> 1.6.0_05
4. click on button: Class Path...
5. click on button: Add Archive...
6. browse to find archive file ---> C:\Program Files\MySQL\MySQL-Connector-for-Java-5.1.6\mysql-connector-java-5.1.6-bin.jar
7. close OOo
8. start OOo Database
9. in Database Wizard select radio button: Connect To Existing Database
10. select in dropdown box: MySQL
11. Next>>
12. select radio button: Connect using JDBC
13. Next>>
14. driver class is preloaded with ---> com.mysql.jdbc.Driver
15. select button: Test Class
16. result: "The JDBC driver could not be loaded."

Help!
OOo 2.4.X on Ms Windows XP
darrelln09
Posts: 2
Joined: Fri Jul 04, 2008 9:25 pm

Re: jdbc driver load failure

Post by darrelln09 »

I even tried copying the archive directly into the OOo classes folder ...

C:\Program Files\OpenOffice.org 2.4\program\classes\mysql-connector-java-5.1.6-bin.jar

... but still no luck with the classloader finding the com.mysql.jdbc.Driver! Help!
OOo 2.4.X on Ms Windows XP
gerke
Posts: 2
Joined: Wed Sep 17, 2008 2:50 pm

Re: jdbc driver load failure

Post by gerke »

Hi darelln09, did you find/get a solution?
I have exactly the same problem
OOo 2.4.X on Ms Windows XP + ubuntu
gerke
Posts: 2
Joined: Wed Sep 17, 2008 2:50 pm

Re: jdbc driver load failure

Post by gerke »

I just gave it a chance and tried once more.
Now the database was registered.
Was the solution that I shut down my PC yesterday? I have read that one should restart OO after registering the db. May be that wasn't enough?
Confirmation on this point would make me feel a bit more confident...
OOo 2.4.X on Ms Windows XP + ubuntu
User avatar
r4zoli
Volunteer
Posts: 2882
Joined: Mon Nov 19, 2007 8:23 pm
Location: Budapest, Hungary

Re: jdbc driver load failure

Post by r4zoli »

Restart of OOo needed after adding jar file in classpath, on win quit from OOo and quickstarter, too.
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
oiuytre
Posts: 2
Joined: Sat Jan 23, 2010 4:53 pm

Re: jdbc driver load failure

Post by oiuytre »

I am using OpenOffice Portable (from PortableApps.com). When I tried to add an item to the java classpath, as described above, and restarted, nothing happened--there was still nothing in the classpath. Looking at the ini files, I figured out how to register the mysql-connector-java-5.1.11-bin.jar I downloaded from MySQL (also described above):

I edited the file "fundamentalbasis.ini" (in \App\openoffice\Basis\program\) so that the 4th line read URE_MORE_JAVA_CLASSPATH_URLS=${BRAND_BASE_DIR}/javaclasspath/mysql-connector-java-5.1.11-bin.jar

Then I created the folder "javaclasspath" in \App\openoffice\ and put mysql-connector-java-5.1.11-bin.jar in that directory.

I don't know if it solves everything, but at least now when I click the "Test class" button it says "The JDBC driver was loaded successfully" (the "MySQL JDBC driver class:" field reads "com.mysql.jdbc.Driver")

I hope that helps someone
OpenOffice 3.1.0 PORTABLE (from PortableApps.com) on Windows XP/7
DBTech
Posts: 3
Joined: Sun Apr 04, 2010 9:04 pm

Re: jdbc driver load failure

Post by DBTech »

Many thanks oiuytre! Your advice really helped me in accessing HSQLDB using JDBC. I entered
URE_MORE_JAVA_CLASSPATH_URLS=${BRAND_BASE_DIR}/program/classes/hsqldb.jar
in fundamentalbasis.ini and my 2 days struggle with the problem was over.
OpenOffice 3.1 on Windows XP
aurelius
Posts: 7
Joined: Sat Nov 27, 2010 10:04 pm

Re: jdbc driver load failure

Post by aurelius »

what should be the driver class for Postgresql jdbc driver?
I tried with "org.postgresql.Driver", but it seems it can't be loaded.... :(
OpenOffice 3.2 on Windows XP
User avatar
r4zoli
Volunteer
Posts: 2882
Joined: Mon Nov 19, 2007 8:23 pm
Location: Budapest, Hungary

Re: jdbc driver load failure

Post by r4zoli »

aurelius wrote:what should be the driver class for Postgresql jdbc driver?
I tried with "org.postgresql.Driver", but it seems it can't be loaded.... :(
It must be working, this driver class works for me.
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
aurelius
Posts: 7
Joined: Sat Nov 27, 2010 10:04 pm

Re: jdbc driver load failure

Post by aurelius »

Right, it works. I just had to reboot...
OpenOffice 3.2 on Windows XP
ossolemio
Posts: 1
Joined: Sun Feb 28, 2021 1:53 am

Re: jdbc driver load failure

Post by ossolemio »

Actually, I first went to
Tools >> Options>> OpenOfficeBase>> Connections checkout "connecction pooling enabled

Then go to https://www.filehorse.com/download-java-runtime-32 and download the jre 32-bit (Note: it doesn't matter whether you have 64 bit, just do it. And it is ok even if you have other versions of JDKs. )

As long as it is installed you don't need to add it to the environment settings to the Path.

now go to tools> options> OpenOffice>Java (now you will see the related jre is identified automatically)
check out use a java runtime environment
and now select the jre inside the window.
click ok.
so that click file>>new
then rest is related opening a new db>>Database>>(in my case) select connect to an existing database>>select Oracle JDBC>>now you can see that as you select oracle JDBC
Oracle driver has been pooled from Connection Pooling>> just provide Database name in case of Oracle give it xe >>enter server IP address >>click next
>>enter username and check if there is password for sure there wşll be>>ckick Test Connection>>if it passes successfully>>push finish.
OpenOffice 4.1.9
Windows 10 Pro
Post Reply