You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jed Koops <jk...@calvin.edu> on 2000/12/30 13:02:42 UTC

Postgresql driver - esq

Hello, all,

I'm trying to get the esql sample (samples/esql.xml) working on my
system (Debian Linux, Apache,Jserv, Cocoon 1.8, Postgresql database).  I
edited the sample file to point to my local Postgresql database. Here
are the relevant xml lines:
<esql:execute-query>
<esql:driver>posgresql.Driver</sql:driver>
<esql:dburl>jdbc:postgresql://localhost/addresses</esql:dburl>
etc...

It complains that it can't find the postgresql driver: 
<<postgresql.Driverjava.lang.ClassNotFoundException: postgresql.Driver
at java.lang.ClassNotFoundException.<init>(Compiled Code) at
org.apache.cocoon.processor.xsp.language.java.XSPClassLoader.loadClass
(compiled Code) ... etc.>>

I downloaded a postgresql.jar file, and put it in my classpath (in
jserv.properties), but that didn't seem to help.  What should I do to
get cocoon to see the postgresql driver?

Thanks,
Jed Koops


Re: Postgresql driver - esq

Posted by Roman Zamorski <ra...@tenbit.pl>.
Hello Jed,

Saturday, December 30, 2000, 1:02:42 PM, you wrote:

JK> Hello, all,

JK> I'm trying to get the esql sample (samples/esql.xml) working on my
JK> system (Debian Linux, Apache,Jserv, Cocoon 1.8, Postgresql database).  I
JK> edited the sample file to point to my local Postgresql database. Here
JK> are the relevant xml lines:
JK> <esql:execute-query>
JK> <esql:driver>posgresql.Driver</sql:driver>
JK> <esql:dburl>jdbc:postgresql://localhost/addresses</esql:dburl>
JK> etc...

JK> It complains that it can't find the postgresql driver: 
JK> <<postgresql.Driverjava.lang.ClassNotFoundException: postgresql.Driver
JK> at java.lang.ClassNotFoundException.<init>(Compiled Code) at
JK> org.apache.cocoon.processor.xsp.language.java.XSPClassLoader.loadClass

that's an easy mistake and has already been addressed on the list: the
correct name of the driver is "org.postgresql.Driver" not
"postgresql.Driver". change it and it'll [hopefully ;)] work.

on the other hand I have different kind of problem with postgresql
driver which I hope someone has already fixed. in simple terms I
cannot use "table.field" syntax in <esql:get-* column="table.field"/>
as I get an error "unknown field: 'table.field' blah blah".
when I use "table.field AS TF1" and then <esql:get-int column="TF1"/>
it magically works... ideas anyone?

-- 
Best regards,
 Roman                            mailto:ramzam@tenbit.pl



Re: Postgresql driver - esq

Posted by Michele Bianchi <mi...@pow2.com>.
On Sat, 30 Dec 2000, Jed Koops wrote:

> Hello, all,
> 
> I'm trying to get the esql sample (samples/esql.xml) working on my
> system (Debian Linux, Apache,Jserv, Cocoon 1.8, Postgresql database).  I
> edited the sample file to point to my local Postgresql database. Here
> are the relevant xml lines:
> <esql:execute-query>
> <esql:driver>posgresql.Driver</sql:driver>
> <esql:dburl>jdbc:postgresql://localhost/addresses</esql:dburl>

the last version of postgres the driver is org.posgresql.Driver, try to check
it!  anyway consider the connection pooling option through turbine-pool, really
a boost in the performace.

mic

-------------------------------------------------------------------------------
dott. michele bianchi                                       power of two s.r.l.
phone +39 335 5384700                                      http://www.pow2.com