| From: | Kris Jurka <books(at)ejurka(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Chris Baty <batymohn(at)yahoo(dot)com>, pgsql-jdbc(at)postgresql(dot)org |
| Subject: | Re: JDBC driver works in ccommand line, not in Tomcat5 |
| Date: | 2007-09-05 17:31:25 |
| Message-ID: | Pine.BSO.4.64.0709051328051.30413@leary.csoft.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
On Wed, 5 Sep 2007, Tom Lane wrote:
> Kris Jurka <books(at)ejurka(dot)com> writes:
>> Turns out this is pretty easy to do, I'm just not sure what the best text
>> to report to the user is, so far I have:
>
>> Your security policy has prevented the connection from being
>> attempted. You must grant the connect java.net.SocketPermission
>> to the database server host and port that you wish to connect to.
>
> Can you really tell for sure that it's security policy and not something
> else? A message as specific as this would be downright
> counterproductive if it's wrong.
We can be pretty sure by checking if the connection setup failed because
of an AccessControlException:
http://java.sun.com/j2se/1.5.0/docs/api/java/security/AccessControlException.html
> FWIW, the backend's style guide would suggest dividing that into an
> ERROR and a HINT, particularly if the HINT could be mistaken.
>
We don't have separate fields, but I agree it's a little strong, perhaps
"You probably need to" instead of "You must".
Kris Jurka
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dave Cramer | 2007-09-05 17:33:19 | Re: Caching driver on pgFoundry? |
| Previous Message | Kris Jurka | 2007-09-05 17:27:44 | Re: Caching driver on pgFoundry? |