Ok. Summary time.

Martin reflects my experience - I dumped tyrex and used DBCP as well. But
aren't we trying to go direct without a pool? Having said that I've only
ever managed to get datasources working when DBCP is being used...

Check that your driver jarfile does not contain the javax.sql extension
classes. If it does, delete them and rejar. Some versions of Tomcat will
ignore any jar that has these classes present. Be careful with this thought
- I work with jdk1.4 which has these built in.

Also, you don't specify a DataSourceFactory in your server.xml - see below.


Here's a known (well as far as I know...) good postgres solution using DBCP.
See
http://marc.theaimsgroup.com/?l=tomcat-user&m=102225547106556&w=2
for my original mysql post as well.



<Resource name="jdbc/postgres" auth="Container"
          type="javax.sql.DataSource"/> 

<ResourceParams name="jdbc/postgres">
  <parameter>
    <name>factory</name>
    <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
  </parameter>
  <parameter>
    <name>driverClassName</name>
    <value>org.postgresql.Driver</value>
  </parameter>
  <parameter>
    <name>url</name>
    <value>jdbc:postgresql://127.0.0.1:5432/mydb</value>
  </parameter>
  <parameter>
    <name>username</name>
    <value>myuser</value>
  </parameter>
  <parameter>
    <name>password</name>
    <value>mypasswd</value>
  </parameter>
  <parameter>
    <name>maxActive</name>
    <value>20</value>
  </parameter>
  <parameter>
    <name>maxIdle</name>
    <value>10</value>
  </parameter>
  <parameter>
    <name>maxWait</name>
    <value>-1</value>
  </parameter>
</ResourceParams> 




> -----Original Message-----
> From: Przemyslaw Kowalczyk [mailto:[EMAIL PROTECTED]]
> Sent: 02 July 2002 14:53
> To: Tomcat Users List
> Subject: Re: Tomcat 4.0.4, jndi, jdbc and postgresql [long]
> 
> 
> On Tuesday 02 July 2002 15:43, [EMAIL PROTECTED] wrote:
> > Do you have already connected to a postgresql db using a 
> java app? Are you
> > sure the parameters are correct? What is "public"? Where 
> did you put the
> > postgresql.jar?
> 
> Yes, without any problems from 'standalone' application. I'm 
> able to query and 
> update database, so parameters (url, username and password) are ok.
> 
> There is no postgresql.jar, only pgjdbc2.jar. I put it in 
> ${tomcat-root}/lib 
> directory.  I tried first to add a link named postgresql.jar 
> and then I've 
> renamed it but it didn't help :-(
> 
> > Do you have a file named hsql.jar? Can you remove it?
> 
> I don't have such file.
> 
> 
> przem
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

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

Reply via email to