You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Peter Yellman <py...@webformation.com> on 2002/08/23 19:21:08 UTC

Tomcat 4.1.9 beta, Postgresql jndi / jdbc problem

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".

Any comments are appreciated.

Thanks,
Peter Yellman


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat 4.1.9 beta, Postgresql jndi / jdbc problem

Posted by Nikola Milutinovic <Ni...@ev.co.yu>.
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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat 4.1.9 beta, Postgresql jndi / jdbc problem

Posted by Peter Yellman <py...@webformation.com>.
Jacob,

Thank you for the notice.  I tried to search the bug database before 
posting, but my Cox "always on" connection has only been working 50% of 
the time, and that hour it wasn't.

Peter Yellman

Jacob Kjome wrote:
> Hello Peter,
> 
> I reported this bug earlier this week and it was fixed the same day.
> Current CVS and Tomcat-4.1.10 will have the fix.
> 
> <user> is the old syntax.  It is supposed to be <username> for the
> DBCP stuff.  The admin was still assuming that it was "user".
> 
> Here's the bug report:
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11775
> 
> 
> Jake
> 
> Friday, August 23, 2002, 12:21:08 PM, you wrote:
> 
> PY> I would be interested in any comments on the following problem I 
> PY> encountered setting up a jdbc datasource to Postgresql on Tomcat 4.1.9 beta.
> 
> PY> os - RedHat Linux 7.1 i386
> PY> db - Postgresql 7.1.3
> PY> driver - jdbc7.1-1.2.jar (jdbc driver for pg 7.1, java2)
> PY> tc - Tomcat 4.1.9 beta.
> 
> PY> The problem arose after I used the new web admin interface to set up a 
> PY> jdbc datasource to my Postgresql database (although the web admin 
> PY> doesn't seem to be the problem). I received the error:
> 
> PY> "org.apache.jasper.JasperException: The user property is missing. It is 
> PY> mandatory."
> 
> PY> However, the user property was not in fact missing.
> 
> PY> The web admin inserted the following resource parameters into my 
> PY> server.xml (abridged):
> PY> <parameter>
> PY>    <name>user</name>
> PY>    <value>postgres</value>
> PY> </parameter>
> PY> <parameter>
> PY>    <name>url</name>
> PY>    <value>jdbc:postgresql:testdb1</value>
> PY> </parameter>
> PY> <parameter>
> PY>    <name>password</name>
> PY>    <value>password_here</value>
> PY> </parameter>
> 
> PY> The part above is identical to the corresponding parts in my 4.0.x 
> PY> jndi/jdbc setup(s), which work fine.
> 
> PY> I discovered the following workarounds in server.xml:
> PY> (1) attach the user parameter to the end of the jdbc url (e.g., 
> PY> jdbc:postgresql:testdb1?user=postgres), or
> PY> (2) change the parameter named "user" to "username", as in
> PY> <parameter>
> PY>    <name>username</name>
> PY>    <value>postgres</value>
> PY> </parameter>
> 
> PY> The Postgresql documentation clearly states that the property in 
> PY> questions is "name".
> 
> PY> Any comments are appreciated.
> 
> PY> Thanks,
> PY> Peter Yellman
> 
> 
> PY> --
> PY> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> PY> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat 4.1.9 beta, Postgresql jndi / jdbc problem

Posted by Jacob Kjome <ho...@visi.com>.
Hello Peter,

I reported this bug earlier this week and it was fixed the same day.
Current CVS and Tomcat-4.1.10 will have the fix.

<user> is the old syntax.  It is supposed to be <username> for the
DBCP stuff.  The admin was still assuming that it was "user".

Here's the bug report:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11775


Jake

Friday, August 23, 2002, 12:21:08 PM, you wrote:

PY> I would be interested in any comments on the following problem I 
PY> encountered setting up a jdbc datasource to Postgresql on Tomcat 4.1.9 beta.

PY> os - RedHat Linux 7.1 i386
PY> db - Postgresql 7.1.3
PY> driver - jdbc7.1-1.2.jar (jdbc driver for pg 7.1, java2)
PY> tc - Tomcat 4.1.9 beta.

PY> The problem arose after I used the new web admin interface to set up a 
PY> jdbc datasource to my Postgresql database (although the web admin 
PY> doesn't seem to be the problem). I received the error:

PY> "org.apache.jasper.JasperException: The user property is missing. It is 
PY> mandatory."

PY> However, the user property was not in fact missing.

PY> The web admin inserted the following resource parameters into my 
PY> server.xml (abridged):
PY> <parameter>
PY>    <name>user</name>
PY>    <value>postgres</value>
PY> </parameter>
PY> <parameter>
PY>    <name>url</name>
PY>    <value>jdbc:postgresql:testdb1</value>
PY> </parameter>
PY> <parameter>
PY>    <name>password</name>
PY>    <value>password_here</value>
PY> </parameter>

PY> The part above is identical to the corresponding parts in my 4.0.x 
PY> jndi/jdbc setup(s), which work fine.

PY> I discovered the following workarounds in server.xml:
PY> (1) attach the user parameter to the end of the jdbc url (e.g., 
PY> jdbc:postgresql:testdb1?user=postgres), or
PY> (2) change the parameter named "user" to "username", as in
PY> <parameter>
PY>    <name>username</name>
PY>    <value>postgres</value>
PY> </parameter>

PY> The Postgresql documentation clearly states that the property in 
PY> questions is "name".

PY> Any comments are appreciated.

PY> Thanks,
PY> Peter Yellman


PY> --
PY> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
PY> For additional commands, e-mail: <ma...@jakarta.apache.org>



-- 
Best regards,
 Jacob                            mailto:hoju@visi.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>