cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurent <laur...@levesinet.net>
Subject Re: cocoon postgresql help needed
Date Thu, 30 Nov 2000 21:25:07 GMT
try org.postgresql.Driver instead of postgresql.Driver.
and make sure your CLASSPATH contains the jdbc postgres driver file (.jar file)

laurent


At 15:21 30/11/00 -0500, you wrote:
>Please can you help I have got the a postgresql database I would like to
>access. I have managed to
>get cocoon to output html when XML is requested from the browser. I have
>carefully followed the example of "esql.xml" in the samples directory, but
>when I try to access the database I keep getting the following message:
>
><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
>"http://www.w3.org/TR/REC-html40/strict.dtd">
><page>
>
><message>postgresql.Driver</message><stacktrace>java.lang.ClassNotFoundException:
>postgresql.Driver
>at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>at java.security.AccessController.doPrivileged(Native Method)
>at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
>at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
>at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
>at org.apache.cocoon.processor.xsp.language.java.XSPClassLoader.loadClass
>(XSPClassLoader.java:87)
>at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
>at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
>at java.lang.Class.forName0(Native Method)
>at java.lang.Class.forName(Class.java:120)
>at
>_home._apache._htdocs._cocoon_1_8._samples._sql._test._esql_execute_query_N63bbd7
>(_test.java:85)
>at
>_home._apache._htdocs._cocoon_1_8._samples._sql._test.populateDocument(_test.java:273)
>at org.apache.cocoon.processor.xsp.XSPPage.getDocument(XSPPage.java:96)
>at
>org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:494)
>at org.apache.cocoon.Engine.handle(Engine.java:359)
>at org.apache.cocoon.Cocoon.service(Cocoon.java:167)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
>at org.apache.jserv.JServConnection.processRequest(JServConnection.java:317)
>at org.apache.jserv.JServConnection.run(JServConnection.java:188)
>at java.lang.Thread.run(Thread.java:484)
></stacktrace>
>
></page>
>
>Here is my XML:
>
><?xml version="1.0"?>
><?cocoon-process type="xsp"?>
><?xml-logicsheet
>href="resource://org/apache/cocoon/processor/xsp/library/sql/esql.xsl"?>
><xsp:page
>language="java"
>xmlns:esql="http://apache.org/cocoon/SQL/v2"
>xmlns:xsp="http://www.apache.org/1999/XSP/Core"
> >
><page>
><esql:execute-query>
><esql:driver>postgresql.Driver</esql:driver>
><esql:dburl>jdbc:postgresql://localhost/forms</esql:dburl>
><esql:username>mattr</esql:username>
><esql:password></esql:password>
><esql:query>select * from groups</esql:query>
><esql:results>
><Groups>
><Name><esql:get-string column="Name"/></Name>
><Phone><esql:get-string column="Phone"/></Phone>
></Groups>
></esql:results>
><esql:no-results>
><error>no results were found</error>
></esql:no-results>
><esql:error-results>
><message><esql:get-message/></message>
><stacktrace><esql:get-stacktrace/></stacktrace>
></esql:error-results>
></esql:execute-query>
></page>
></xsp:page>
>
>(I have not set a password on my database, and have tried it without the
><esql:password> line) but I have a feeling that it not finding the database.
>I have gone through the instalation and added the necessary lines to the
>.properties files.
>
>Please can you tell me what I am doing wrong.
>
>
>-----------------------------------------------
>FREE! The World's Best Email Address @email.com
>Reserve your name now at http://www.email.com
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message