> From: Skip Carter [mailto:[EMAIL PROTECTED]] 
> 
> > Once I get this figured out I PROMISE TO CREATE DOCUMENTATION :)
> 
>       I have PostgreSQL working just fine here.  I had to add the
>         location of postgres.jar to the classpath in catalina.sh
>         since it is not normally in the default classpath on 
> my system.
> 
> The line in catalina.sh:
> 
> CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/bootstrap.jar
> 
> was changed to:
> 
> CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/bootstrap.jar:/usr
> /local/java/postg
> resql.jar
> 
> 
>    The <dburl> element of cocoon.xconf is just a reference to 
> the database URL for that particular data source:
> 
>    <dburl>jdbc:postgresql://dbserver.example.com:5432/books</dburl>


Having written the datasource pooling code, I am aware of what the
<dburl/> entry is supposed to be.  I was saying that you might want
to include the <driver/> element with the classname to that entry
in cocoon.xconf.

Regarding the location of the Driver jars, there are three solutions:

1) Include it in the WEB-INF/lib directory in your webapp
   * It is always included with the webapp
   * No additional install step is necessary
   * Not all servlet containers respect the WEB-INF/lib contract
     (IBM WebSPhere moves the libs, but most current containers
     work properly now).

2) Include it in the $JAVA_HOME/jre/lib/ext directory
   * It is available to all Java applications on the machine
   * It is an additional install step, but simple to do.
   * If the webapp is moved, you have to make sure the driver
     exists on the new machine or new JVM.

3) Do what you did and alter the Servlet Container's default
   CLASSPATH.
   * It is available to all webapps in the contianer
   * It is an additional install step, and in some cases not trivial
   * Each servlet container has a different method of doing this,
     and some don't allow it at all.

Of the three, 1 or 2 is preferred.  2 should only be considered for
jars that are not likely to cause a conflict like a database driver.
While the first option works 90% of the time, you do end up with
duplicate drivers.  It is not the end of the world though.


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to