OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

The JDBC driver could not be loaded
Goto page 1, 2  Next
 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
theking2
Newbie
Newbie


Joined: 12 Apr 2006
Posts: 2

PostPosted: Wed Jul 05, 2006 12:51 am    Post subject: The JDBC driver could not be loaded Reply with quote

Trying to connect to a MySQL database in OOo Base. Upon Test class I get "JDBC Driver Test", "The JDBC driver could not be loaded."
What does this mean?

1) OOo cannot load the appropriate class(es)? SUN JRE not installed correctly?
2) Wrong JRE selected? SUN felt the need to install at least a dozen JREs on my PC.
2) Cannot connect to the database?

Many thanks for an understandable anser.
Back to top
View user's profile Send private message MSN Messenger
r4zoli
Super User
Super User


Joined: 17 May 2005
Posts: 570
Location: Budapest, Hungary

PostPosted: Wed Jul 05, 2006 1:56 am    Post subject: Reply with quote

if you want to connect to database outside of Base you must have a Mysql JDBC drivers (mysql-connector-java-3.xxxx ) installed on your machine, and registered Under Tools>Options>OpenOffice.org>Java.
Click on the ClassPath button.Then the button Add Archive.
After that you could connect to database, create new database
Under dataabase URL (the line that already says JDBC:) enter mysql://localhost/yourdatabse
use JDBC driver class: com.mysql.jdbc.Driver, test driver
check the Password Required box
and finish.
you could use ODBC driver too.
Bests,
Zoltan
Back to top
View user's profile Send private message
rowland
Newbie
Newbie


Joined: 26 Sep 2006
Posts: 3

PostPosted: Wed Sep 27, 2006 8:21 am    Post subject: Connecting to mySQL via JDBC Reply with quote

r4zoli wrote:

Under dataabase URL (the line that already says JDBC:) enter mysql://localhost/yourdatabse
use JDBC driver class: com.mysql.jdbc.Driver, test driver


This works for me, on Linux, running OO 2.0

But oy, this is not intuitive!

I notice on the first page of the wizars, the 'connect to existing' dropdown list has an option for MySQL. This leads to a fork - ODBC or JDBC. The JDBC fork has the driver class filled in already. That looks like a better route to take.
Back to top
View user's profile Send private message Visit poster's website
keithclark1966
OOo Enthusiast
OOo Enthusiast


Joined: 18 Jan 2007
Posts: 189

PostPosted: Fri Jun 20, 2008 6:15 am    Post subject: Reply with quote

r4zoli wrote:
if you want to connect to database outside of Base you must have a Mysql JDBC drivers (mysql-connector-java-3.xxxx ) installed on your machine, and registered Under Tools>Options>OpenOffice.org>Java.
Click on the ClassPath button.Then the button Add Archive.
After that you could connect to database, create new database
Under dataabase URL (the line that already says JDBC:) enter mysql://localhost/yourdatabse
use JDBC driver class: com.mysql.jdbc.Driver, test driver
check the Password Required box
and finish.
you could use ODBC driver too.
Bests,
Zoltan


Where can one get that driver file? I am using PCLinuxOS and I cannot find it in the repositories.

Thanks,

Keith
_________________
Open Office 3.0 under Ubuntu 9.04, XP and Vista
Back to top
View user's profile Send private message
r4zoli
Super User
Super User


Joined: 17 May 2005
Posts: 570
Location: Budapest, Hungary

PostPosted: Fri Jun 20, 2008 6:30 am    Post subject: Reply with quote

From MySQL page:
http://dev.mysql.com/downloads/connector/j/5.1.html

or try http://forge.mysql.com/wiki/Connector_OpenOffice , it in development phase, it works with 2.4.x now, not stable.
Back to top
View user's profile Send private message
keithclark1966
OOo Enthusiast
OOo Enthusiast


Joined: 18 Jan 2007
Posts: 189

PostPosted: Fri Jun 20, 2008 6:57 am    Post subject: Reply with quote

r4zoli wrote:
From MySQL page:
http://dev.mysql.com/downloads/connector/j/5.1.html

or try http://forge.mysql.com/wiki/Connector_OpenOffice , it in development phase, it works with 2.4.x now, not stable.


Perfect, thanks!

Keith
_________________
Open Office 3.0 under Ubuntu 9.04, XP and Vista
Back to top
View user's profile Send private message
keithclark1966
OOo Enthusiast
OOo Enthusiast


Joined: 18 Jan 2007
Posts: 189

PostPosted: Sun Jun 29, 2008 6:30 pm    Post subject: Reply with quote

r4zoli wrote:
From MySQL page:
http://dev.mysql.com/downloads/connector/j/5.1.html

or try http://forge.mysql.com/wiki/Connector_OpenOffice , it in development phase, it works with 2.4.x now, not stable.


This worked for my under Linux, but in Windows I get the following error when trying to connect still:

Cannot connect driver class com.mysql.jdbc.driver could not be loaded.

Keith
_________________
Open Office 3.0 under Ubuntu 9.04, XP and Vista
Back to top
View user's profile Send private message
r4zoli
Super User
Super User


Joined: 17 May 2005
Posts: 570
Location: Budapest, Hungary

PostPosted: Sun Jun 29, 2008 9:25 pm    Post subject: Reply with quote

JDBC driver addad to classpath?
Back to top
View user's profile Send private message
keithclark1966
OOo Enthusiast
OOo Enthusiast


Joined: 18 Jan 2007
Posts: 189

PostPosted: Mon Jun 30, 2008 4:49 am    Post subject: Reply with quote

Yes, classpath driver added. Even stranger. I got it to work successfully, in Linux, for one user. I then switched users, installed the classpath driver but it will not work for that user. Same computer, same jdbc driver.

I tried everything on my XP machine to get it to work and I finally gave up with no luck.

Keith
_________________
Open Office 3.0 under Ubuntu 9.04, XP and Vista
Back to top
View user's profile Send private message
danorton
Newbie
Newbie


Joined: 10 Jul 2008
Posts: 1

PostPosted: Thu Jul 10, 2008 3:43 pm    Post subject: Reply with quote

Well, no one mentioned it here, so hopefully this solves it for all of you.

When Open Office tells you to exit and reload, it fails to tell you that you have to exit all Open Office applications, even the ones that don't show up in the main task bar.

In my case, it was the "Quickstarter" applet. When I killed that and reloaded, all worked fine.

Reviewing, step-by-step:
1) Put mysql-connector-java-5.1.6-bin.jar anywhere you like
2) Load OpenOffice.org Writer and select Tools / Options / OpenOffice.org / Java
3) Select "Class Path"
4) Select "Add Archive"
5) Point to mysql-connector-java-5.1.6-bin.jar
6) Exit OpenOffice.org Writer/Base/Quickstarter &c &c
7) Load Base
8) Make sure class is com.mysql.jdbc.Driver
(you don't really need to specify the URL, yet)
9) Select "Test Class"
Back to top
View user's profile Send private message Send e-mail
seanoc5
Newbie
Newbie


Joined: 28 Jul 2008
Posts: 1

PostPosted: Mon Jul 28, 2008 11:29 am    Post subject: Wonderful: full restart solved the problem Reply with quote

Thanks to OP for the hint about killing/restarting the OpenOffice activator on Windows (Vista). I suppose if I were not so lazy, or impatient, a full reboot would have also gotten me where I needed to be.

Sean
Back to top
View user's profile Send private message
pizzipie
General User
General User


Joined: 31 Jul 2008
Posts: 9

PostPosted: Thu Jul 31, 2008 11:07 am    Post subject: JDBC connection to Mysql - Error message - making me crazy Reply with quote

I have tried to connect to a mysql database with no success. Here is what I did.

1. Connect to existing database => MYSQL .. next
2. Connect using JDBC .. next
3. Name of database => pizzi_db
Server URL => mysql://localhost
Port Number | 3306 | default: 3306
Mysql JDBC driver class => com.mysql.jdbc.Driver
Test class => The JDBC driver was loaded sucessfully ... next
4. User name => rick
Password => required ... next
5. Yes - Register database
Yes - Open the database for editing ... Finish
6. Name => pizzi_db or any other
ODF database ... save
7. Tables => rick
password => rick ... ok

THEN the Problem: Receive following message.

"The connection to data source pizzi_db could not be established. Must specify port after ':' in connection string"

Can anyone help to solve this? Would greatly appreciate a solution.

Rick P
Back to top
View user's profile Send private message
r4zoli
Super User
Super User


Joined: 17 May 2005
Posts: 570
Location: Budapest, Hungary

PostPosted: Fri Aug 01, 2008 3:48 am    Post subject: Reply with quote

Solution:
Server URL: localhost
Back to top
View user's profile Send private message
pizzipie
General User
General User


Joined: 31 Jul 2008
Posts: 9

PostPosted: Fri Aug 01, 2008 8:21 am    Post subject: error message - specify port after ":" Reply with quote

r4zoli wrote:
Solution:
Server URL: localhost


I knew the answer was simple.

Thanks very much r4zoli, you made my day!!!!
Back to top
View user's profile Send private message
milooo
Newbie
Newbie


Joined: 25 Oct 2008
Posts: 1

PostPosted: Sat Oct 25, 2008 5:03 am    Post subject: connecting to mysql on external server Reply with quote

found this thread with similar problems, could advance to create oo-database conncting file.
Thanks!
But... wanting to connect to an external database (http://www.keramikforum.info...)
What do I have to fill in
database name? (filled in its name on server)
dateabase url (filled in (http://www.keramikforum.info, like the hoster says)
portnumber (unchanged)
result:The connection to data source ... could not be established. Must specify port after ':' in connection string

the tooltip for the portnumber field says in german: specify url jdbc:mysql://servername/databasename, but I think this is ment for dB url. When I tried this there was an error message illegal: connection port value 'mysql:'

What has to be done??
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group