IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New OpenOffice.org/PostgreSQL/JDBC
I'm trying to set up a data source in OpenOffice.org to access my local PostgreSQL database using JDBC. (This is a learning experience, not a production system.)

I can access the database ('company') from psql as user tsinclai just fine. I can also send queries from a Java app using JDBC. So far so good.

However, I'm trying to set up a new data source in OpenOffice.org like so:

- In Tools->Data Sources:

Name: Company
Database Type: JDBC
URL: jdbc:postgresql://localhost/company

In the JDBC tab:

JDBC Driver Class: org.postgresql.Driver (This is the same as in my Java app)
URL: Same as above
User: tsinclai
Password Required

The classpath is set correctly. (At least it works when I use plain old Java.)

However, when I try to access the tables, I get the error message:

No connection could be established for the URL jdbc:postgresql://localhost/company

I've also tried using the URL jdbc:postgresql:company (what my Java code sends to JDBC), same problem.

I've checked what online documentation I've been able to Google and snooped through the JDBC and PostgreSQL sites as well as the OpenOffice.org documentation. It seems that it should work, but it doesn't.

Any ideas?

Tom Sinclair

"Everybody is someone else's weirdo."
- E. Dijkstra
New Synchronicity
Just saw [link|http://www.linuxworld.com/2003/0207.barr.html|this] today. He's talking about MySQL and ODBC, but it might have some pointers wrt OpenOffice.
===
Microsoft offers them the one thing most business people will pay any price for - the ability to say "we had no choice - everyone's doing it that way." -- [link|http://z.iwethey.org/forums/render/content/show?contentid=38978|Andrew Grygus]
New That's where I got the idea
There are actually a lot of resources for hooking up MySQL to OOo, but very few for doing the same with PostgreSQL.

As a result, some of the settings I'm using are based at least partially on guesswork.

My current suspicion is that the URL or classpath settings may be at fault.

The hunt continues....
Tom Sinclair

"Everybody is someone else's weirdo."
- E. Dijkstra
New Re: That's where I got the idea
In your personal OpenOffice.org1.0/user/config directory, there is a file named javarc. Have you tried putting your jdbc jar filename in the CLASSPATH defined there?

Sorry if you've already tried this as this is just a guess.

-Mike
New I set the class path in Tools->Options->Security
But I'll check on javarc to be sure.

No offense taken. After all, I'm just trying to learn more about this.

Tom Sinclair

"Everybody is someone else's weirdo."
- E. Dijkstra
New Got another clue
By digging into the error logs, I found that OOo thinks that Java isn't installed.

Yeah, that would do it.

The problem is that this is on OS X and it doesn't run the setup like the Windows or Linux versions do. I'll try running the setup manually.


More news as it happens...
Tom Sinclair

"Everybody is someone else's weirdo."
- E. Dijkstra
New That'd do it...
I had to put 5 different versions on my linux box and keep switching the jvm until it saw it... ick.
b4k4^2
[link|mailto:curley95@attbi.com|greg] - Grand-Master Artist in IT
[link|http://www.iwethey.org/ed_curry/|REMEMBER ED CURRY!]   [link|http://pascal.rockford.com:8888/SSK@kQMsmc74S0Tw3KHQiRQmDem0gAIPAgM/edcurry/1//|ED'S GHOST SPEAKS!]
[link|http://www.eweek.com/article2/0,3959,857673,00.asp|Writing on wall, Microsoft to develop apps for Linux by 2004]
Heimatland Geheime Staatspolizei reminds:
These [link|http://www.whitehouse.gov/pcipb/cyberstrategy-draft.html|Civilian General Orders], please memorize them.
"Questions" will be asked at safety checkpoints.
New All righty now...
I ran the setup utility and tried to get it to setup Java support for me. Unfortunately, it looks like that piece is only supported in Solaris, HP-UX , Linux and others. OS X puts them in a non-standard location so OOo can't find it.

I think I'll try setting the classpath manually in a javarc file.

Meanwhile, I'm using Fink to install unixODBC so I can get some kind of connection going here. Besides, it's always good to learn something new.

Tom Sinclair

"Everybody is someone else's weirdo."
- E. Dijkstra
     OpenOffice.org/PostgreSQL/JDBC - (tjsinclair) - (7)
         Synchronicity - (drewk) - (6)
             That's where I got the idea - (tjsinclair) - (5)
                 Re: That's where I got the idea - (morganek) - (4)
                     I set the class path in Tools->Options->Security - (tjsinclair) - (3)
                         Got another clue - (tjsinclair) - (2)
                             That'd do it... - (folkert) - (1)
                                 All righty now... - (tjsinclair)

Oh, for the love of cheese.
144 ms