tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikola Milutinovic <Nikola.Milutino...@ev.co.yu>
Subject Re: Tomcat 4.1.9 beta, Postgresql jndi / jdbc problem
Date Fri, 23 Aug 2002 19:22:42 GMT
Peter Yellman wrote:

> I would be interested in any comments on the following problem I 
> encountered setting up a jdbc datasource to Postgresql on Tomcat 4.1.9 
> beta.
> 
> os - RedHat Linux 7.1 i386
> db - Postgresql 7.1.3
> driver - jdbc7.1-1.2.jar (jdbc driver for pg 7.1, java2)
> tc - Tomcat 4.1.9 beta.
> 
> The problem arose after I used the new web admin interface to set up a 
> jdbc datasource to my Postgresql database (although the web admin 
> doesn't seem to be the problem). I received the error:
> 
> "org.apache.jasper.JasperException: The user property is missing. It is 
> mandatory."
> 
> However, the user property was not in fact missing.
> 
> The web admin inserted the following resource parameters into my 
> server.xml (abridged):
> <parameter>
>   <name>user</name>
>   <value>postgres</value>
> </parameter>
> <parameter>
>   <name>url</name>
>   <value>jdbc:postgresql:testdb1</value>
> </parameter>
> <parameter>
>   <name>password</name>
>   <value>password_here</value>
> </parameter>
> 
> The part above is identical to the corresponding parts in my 4.0.x 
> jndi/jdbc setup(s), which work fine.
> 
> I discovered the following workarounds in server.xml:
> (1) attach the user parameter to the end of the jdbc url (e.g., 
> jdbc:postgresql:testdb1?user=postgres), or
> (2) change the parameter named "user" to "username", as in
> <parameter>
>   <name>username</name>
>   <value>postgres</value>
> </parameter>
> 
> The Postgresql documentation clearly states that the property in 
> questions is "name".

But this is not PostgreSQL you're setting up, it is JNDI in Tomcat. 4.1.x 
brought a "slight" change in JNDI. Apart from abandoning Tyrex and moving to 
Jakarta DBCP, JNDI in server.xml has changed *that* particular parameter, fron 
"name" to "username". So, the second example in your mail should do it.

Nix.


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message