cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Berin Loritsch" <blorit...@apache.org>
Subject RE: PostgreSQL won't work - any ideas appreciated
Date Thu, 30 May 2002 17:06:43 GMT
> From: Skip Carter [mailto:skip@taygeta.com] 
> 
> > 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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message