[lug] Segmentation Fault.

John Starkey jstarkey at advancecreations.com
Sat Nov 18 11:30:22 MST 2000


> If i recall right there are two (icompatible) postgresql java
> drivers. You need to use the one that matches your version of
> the jdk and your version of postgresql.

Yeah. When you compile the jdbc interface it asks for the version but it
still seems to have it's problems. The binary I d-loaded was named
jdbc7.1-1.2. Which is supposed to be for jdk1.2.2.

> Which driver do you load? There should be a statement like
> 'Class.forName("org.postgresql.Driver");' somewhere in the
> source.

I tried org.postgresql.Driver and simply postgresql.Driver. I'm a little
confused on this issue. What is the org supposed to represent? If
CLASSPATH points to postgresql.jar then it doesn't seem that the org is
necessary. But I've seen org in several tutorials.

I also tried passing both via commandline. 

> That looks like the default place of the postgres libraries. Did
> you compile postgresqlyourself or is this an 'out-of-the-box'
> installation? 

I compiled it.

> You can set LD_LIBRARY_PATH to add extra directories to the
> dynamic loaders load path (export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/my/dir).
> Some postgres programs also check PGLIB for extra places to search for
> postgres specific libraries).

Adding /usr/lib to PGLIB seems to have fixed it. strace's output is down
to 100 lines :} I can see where it's checking the two dirs and finding it
in the second.









More information about the LUG mailing list